input.spec.js 956 B

123456789101112131415161718192021
  1. // input.spec.js created with Cypress
  2. //
  3. // Start writing your Cypress tests below!
  4. // If you're unfamiliar with how Cypress works,
  5. // check out the link below and learn how to write your first test:
  6. // https://on.cypress.io/writing-first-test
  7. describe('input', () => {
  8. it('trigger password button', () => {
  9. cy.visit('http://localhost:6006/iframe.html?id=input--input-a-11-y&args=&viewMode=story');
  10. cy.get('[data-cy=password]').click();
  11. cy.get('[data-cy=password]').tab();
  12. cy.get('.semi-input-modebtn').eq(0).should('be.focused');
  13. cy.get('.semi-input-modebtn').eq(0).type('{ }');
  14. cy.get('[data-cy=password]').should('have.value', 'Semi Design');
  15. cy.get('[data-cy=password]').tab();
  16. cy.get('.semi-input-modebtn').eq(0).should('be.focused');
  17. cy.get('.semi-input-modebtn').eq(0).type('{enter}');
  18. cy.get('[data-cy=password]').should('have.value', 'Semi Design');
  19. });
  20. });