您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

30 行
805 B

  1. context('Theme Switcher Shortcut', () => {
  2. before(() => {
  3. cy.login();
  4. cy.visit('/app');
  5. });
  6. beforeEach(() => {
  7. cy.reload();
  8. });
  9. it('Check Toggle', () => {
  10. cy.open_theme_dialog('{ctrl+shift+g}');
  11. cy.get('.modal-backdrop').should('exist');
  12. cy.get('.theme-grid > div').first().click();
  13. cy.close_theme('{ctrl+shift+g}');
  14. cy.get('.modal-backdrop').should('not.exist');
  15. });
  16. it('Check Enter', () => {
  17. cy.open_theme_dialog('{ctrl+shift+g}');
  18. cy.get('.theme-grid > div').first().click();
  19. cy.close_theme('{enter}');
  20. cy.get('.modal-backdrop').should('not.exist');
  21. });
  22. });
  23. Cypress.Commands.add('open_theme_dialog', (shortcut_keys) => {
  24. cy.get('body').type(shortcut_keys);
  25. });
  26. Cypress.Commands.add('close_theme', (shortcut_keys) => {
  27. cy.get('.modal-header').type(shortcut_keys);
  28. });