Преглед на файлове

test: sync for cypress test script of hotKeys (#2488)

Co-authored-by: yanzhuoran <[email protected]>
Co-authored-by: pointhalo <[email protected]>
Nathon2Y преди 1 година
родител
ревизия
ff810ec47d
променени са 1 файла, в които са добавени 4 реда и са изтрити 12 реда
  1. 4 12
      cypress/e2e/hotKeys.spec.js

+ 4 - 12
cypress/e2e/hotKeys.spec.js

@@ -1,11 +1,10 @@
 describe('hotKeys', () => {
-    it('Clickable', () => {
-        cy.visit('http://127.0.0.1:6006/iframe.html?path=/story/hotkeys--clickable')
+    it('BasicUsage', () => {
+        cy.visit('http://127.0.0.1:6006/iframe.html?path=/story/hotkeys--demo')
         cy.wait(1000)
 
-        cy.get('body').click().type('{alt}{k}')
-        cy.get('div.semi-hotKeys').click()
-        cy.get('pre#pre').should('exist').and('have.text', '2')
+        cy.get('body').click().type('{control}{k}')
+        cy.get('pre#pre').should('exist').and('have.text', '1')
     });
 
     it('Combine', () => {
@@ -21,11 +20,4 @@ describe('hotKeys', () => {
         cy.get('input#test').type('{meta}{s}')
         cy.get('pre#pre').should('exist').and('have.text', '1')
     });
-
-    it('Disabled', () => {
-        cy.visit('http://127.0.0.1:6006/iframe.html?path=/story/hotkeys--disabled')
-
-        cy.get('body').click().type('{meta}{k}')
-        cy.get('pre#pre').should('exist').and('have.text', '0')
-    });
 });