Hey team , customer Am-I is looking to add some tests to for their embed app such as
Ensuring the Liveboard loads successfully in the embedded iframe.
Verifying that all visualizations on the Liveboard are rendered correctly.
Confirming that filters applied on the Liveboard work as expected and update the data correctly.
I initially recommended them using following events -
-- for testing liveboard rendering , you can use
https://developers.thoughtspot.com/docs/Enumeration_EmbedEvent#_liveboardrendered
For ex.
.on(EmbedEvent.LiveboardRendered, (payload) => {
console.log('....
-- To verify visuals rendered correctly use For
https://developers.thoughtspot.com/docs/Enumeration_HostEvent#_download
const renderedVizs = [];
.on(EmbedEvent.Data, (payload) => ...
-- To confirm visuals are loaded correctly use-
https://developers.thoughtspot.com/docs/Enumeration_EmbedEvent#_filterchanged
.on(EmbedEvent.FilterChanged, (payload) => {...
In response they said ,
`We use Playwright to write end-to-end tests for our web application, and we're looking for guidance on the best way to test ThoughtSpot Liveboards embedded in our host app. Since the Liveboard is rendered inside an iframe, we want to understand the recommended testing approach and best practices. Specifically, we'd like to know which parts of the embedded Liveboard are stable enough to rely on in E2E tests. For example, are there stable selectors or test IDs we can depend on, and can we reliably verify whether each visualization has rendered correctly?
At the moment, we are thinking of using Playwright's frameLocator() to access and interact with the iframe, so any guidance on whether that is the recommended approach would also be helpful.'
I have convyed that using selector is subject to change, and events is the most reliable option . What they want is some documented approach around this.
Have we helped customer in the past with any documented approach around , if yes please let me know.