Expand my Community achievements bar.

Join us for an upcoming in-person Adobe Target Skill Builders event ~~> We're hosting these live learning opportunities to equip you with the knowledge and skills to leverage Target successfully. Learn more to see if we'll be coming to a city near you!

How to write Dynamic tests with React and Chakra UI without going server side - Please help!

Avatar

Level 1

Normally we will write tests with vanilla JS utilising the DOM. All our HTML elements are module based, in that we have a 'basic' HTML mark-up and if it's dynamic (show/hide, tabbed content, modals etc), our framework will see a new module added from Target and will generate and update the HTML so it works. We have another website that has been written by an external company and they write the pages in JS and then React JS and Chakra UI will generate "on the fly" the HTML and CSS server side. They don't have a basic HTML that we could inject like our main sites, so whilst we can interrogate the DOM and add static content, any dynamic content we can't just copy and paste from an existing generated DOM as it would need injected CSS, JS to deal with the specific class names and IDS. We don't seem to have a ready recommendation in the company to handle React objects without going server-side. There is a concept of trigger states that let us hook into events client-side, but that again defaults to the developers having to code those in on the app for Target to be able to see them.

Is there something we can do client-side?

0 Replies