summaryrefslogtreecommitdiffstats
path: root/public/cypress/integration/mocks/errorDialog-spec.ts
blob: 9141ab26383e6c8c7589f5d01f6ac566f61aa496 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
describe('Dialog error - E2E test flow with mock', () => {
  describe('Simulate errors', () => {
    beforeEach(() => {
      cy.getMCListEmpty();
      cy.getTemplateApiError();
    });

    it('Simulate error dialog is visible', () => {
      cy.get('.ui-dialog').should('be.visible');
    });

    it('Simulate error dialog is close by cancel button', () => {
      cy.get('button[data-tests-id="error-cancel"]').click();
      cy.get('.ui-dialog').should('not.be.visible');
    });

    it('Simulate error dialog is close by X button', () => {
      cy.get('.ui-dialog-titlebar-icon').click();
      cy.get('.ui-dialog').should('not.be.visible');
    });
  });
});