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

37 行
1.4 KiB

  1. context('List View Settings', () => {
  2. beforeEach(() => {
  3. cy.login();
  4. cy.visit('/app#workspace/Website');
  5. });
  6. it('Default settings', () => {
  7. cy.visit('/app/List/DocType/List');
  8. cy.get('.list-count').should('contain', "20 of");
  9. cy.get('.sidebar-stat').should('contain', "Tags");
  10. });
  11. it('disable count and sidebar stats then verify', () => {
  12. cy.wait(300);
  13. cy.visit('/app/List/DocType/List');
  14. cy.wait(300);
  15. cy.get('.list-count').should('contain', "20 of");
  16. cy.get('button').contains('Menu').click();
  17. cy.get('.dropdown-menu li').filter(':visible').contains('Settings').click();
  18. cy.get('.modal-dialog').should('contain', 'Settings');
  19. cy.get('input[data-fieldname="disable_count"]').check({force: true});
  20. cy.get('input[data-fieldname="disable_sidebar_stats"]').check({force: true});
  21. cy.get('button').filter(':visible').contains('Save').click();
  22. cy.reload();
  23. cy.get('.list-count').should('be.empty');
  24. cy.get('.list-sidebar .sidebar-stat').should('not.exist');
  25. cy.get('button').contains('Menu').click({force: true});
  26. cy.get('.dropdown-menu li').filter(':visible').contains('Settings').click();
  27. cy.get('.modal-dialog').should('contain', 'Settings');
  28. cy.get('input[data-fieldname="disable_count"]').uncheck({force: true});
  29. cy.get('input[data-fieldname="disable_sidebar_stats"]').uncheck({force: true});
  30. cy.get('button').filter(':visible').contains('Save').click();
  31. });
  32. });