Skip to content

Commit

Permalink
chore: refactored test dashboard-smoketest.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
iamayushdas committed May 6, 2021
1 parent b1e66a2 commit 11b3d63
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions web/cypress/integration/dashboard/dashboard-smoketest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@
/* eslint-disable no-undef */

context('dashboard page smoke test', () => {
const selector = {
pageContent: '.ant-pro-page-container',
}
beforeEach(() => {
cy.login();

cy.fixture('selector.json').as('domSelector');
});

it('should visit dashboard page', function () {
cy.visit('/');
cy.contains('Dashboard').click();
cy.url().should('contains', '/dashboard');
cy.get(this.domSelector.pageContent)
cy.get(selector.pageContent)
.children()
.should('contain', 'Dashboard')
.and('contain', 'You have not configured Grafana')
Expand Down

0 comments on commit 11b3d63

Please sign in to comment.