hotKeys.spec.js 777 B

1234567891011121314151617181920212223
  1. describe('hotKeys', () => {
  2. it('BasicUsage', () => {
  3. cy.visit('http://127.0.0.1:6006/iframe.html?path=/story/hotkeys--demo')
  4. cy.wait(1000)
  5. cy.get('body').click().type('{control}{k}')
  6. cy.get('pre#pre').should('exist').and('have.text', '1')
  7. });
  8. it('Combine', () => {
  9. cy.visit('http://127.0.0.1:6006/iframe.html?path=/story/hotkeys--combine')
  10. cy.get('body').click().type('{meta}{alt}{k}').type('{meta}{shift}{k}')
  11. cy.get('pre#pre').should('exist').and('have.text', '2')
  12. });
  13. it('Target', () => {
  14. cy.visit('http://127.0.0.1:6006/iframe.html?path=/story/hotkeys--target')
  15. cy.get('input#test').type('{meta}{s}')
  16. cy.get('pre#pre').should('exist').and('have.text', '1')
  17. });
  18. });