notification.spec.js 853 B

12345678910111213141516
  1. // Start writing your Cypress tests below!
  2. // If you're unfamiliar with how Cypress works,
  3. // check out the link below and learn how to write your first test:
  4. // https://on.cypress.io/writing-first-test
  5. describe('notification', () => {
  6. it('useNotification', () => {
  7. cy.visit("http://localhost:6006/iframe.html?id=notification--use-notification-demo&args=&viewMode=story");
  8. cy.get('.semi-button').click();
  9. cy.get('[data-cy=notice-container] .semi-notification-notice').should("have.length", 5);
  10. // addNotice 返回 id 是固定的,等待代码修改
  11. // cy.wait(1000);
  12. // cy.get('[data-cy=notice-container] .semi-notification-notice .semi-notification-notice-icon-close').first().click();
  13. // cy.get('[data-cy=notice-container] .semi-notification-notice').should("have.length", 4);
  14. });
  15. });