소스 검색

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')
-    });
 });