The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/e2e/storybook/verify.spec.ts

14 lines
677 B

// very basic test to verify that the button story loads correctly
// this is only intended to catch some basic build errors with storybook
// NOTE: storybook must already be running (`yarn storybook`) for this test to work
describe('Verify storybook', () => {
it('Loads the button story correctly', () => {
cy.visit('?path=/story/buttons-button--basic');
getIframeBody().find('button:contains("Example button")').should('be.visible');
});
});
// see https://www.cypress.io/blog/2020/02/12/working-with-iframes-in-cypress
function getIframeBody() {
return cy.get('#storybook-preview-iframe').its('0.contentDocument.body').should('not.be.empty').then(cy.wrap);
}