Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

47 linhas
1.4 KiB

  1. context('Awesome Bar', () => {
  2. before(() => {
  3. cy.visit('/login');
  4. cy.login();
  5. cy.visit('/app/website');
  6. });
  7. beforeEach(() => {
  8. cy.get('.navbar .navbar-home').click();
  9. });
  10. it('navigates to doctype list', () => {
  11. cy.findByPlaceholderText('Search or type a command (Ctrl + G)').type('todo', { delay: 200 });
  12. cy.findByRole('listbox').should('be.visible');
  13. cy.findByPlaceholderText('Search or type a command (Ctrl + G)').type('{downarrow}{enter}', { delay: 100 });
  14. cy.get('.title-text').should('contain', 'To Do');
  15. cy.location('pathname').should('eq', '/app/todo');
  16. });
  17. it('find text in doctype list', () => {
  18. cy.findByPlaceholderText('Search or type a command (Ctrl + G)')
  19. .type('test in todo{downarrow}{enter}', { delay: 200 });
  20. cy.get('.title-text').should('contain', 'To Do');
  21. cy.findByPlaceholderText('Name')
  22. .should('have.value', '%test%');
  23. });
  24. it('navigates to new form', () => {
  25. cy.findByPlaceholderText('Search or type a command (Ctrl + G)')
  26. .type('new blog post{downarrow}{enter}', { delay: 200 });
  27. cy.get('.title-text:visible').should('have.text', 'New Blog Post');
  28. });
  29. it('calculates math expressions', () => {
  30. cy.findByPlaceholderText('Search or type a command (Ctrl + G)')
  31. .type('55 + 32{downarrow}{enter}', { delay: 200 });
  32. cy.get('.modal-title').should('contain', 'Result');
  33. cy.get('.msgprint').should('contain', '55 + 32 = 87');
  34. });
  35. });