You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 rivejä
1.5 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. cy.findByPlaceholderText('Search or type a command (Ctrl + G)').clear();
  10. });
  11. it('navigates to doctype list', () => {
  12. cy.findByPlaceholderText('Search or type a command (Ctrl + G)').type('todo', { delay: 700 });
  13. cy.get('.awesomplete').findByRole('listbox').should('be.visible');
  14. cy.findByPlaceholderText('Search or type a command (Ctrl + G)').type('{enter}', { delay: 700 });
  15. cy.get('.title-text').should('contain', 'To Do');
  16. cy.location('pathname').should('eq', '/app/todo');
  17. });
  18. it('find text in doctype list', () => {
  19. cy.findByPlaceholderText('Search or type a command (Ctrl + G)')
  20. .type('test in todo{enter}', { delay: 700 });
  21. cy.get('.title-text').should('contain', 'To Do');
  22. cy.findByPlaceholderText('ID')
  23. .should('have.value', '%test%');
  24. cy.clear_filters();
  25. });
  26. it('navigates to new form', () => {
  27. cy.findByPlaceholderText('Search or type a command (Ctrl + G)')
  28. .type('new blog post{enter}', { delay: 700 });
  29. cy.get('.title-text:visible').should('have.text', 'New Blog Post');
  30. });
  31. it('calculates math expressions', () => {
  32. cy.findByPlaceholderText('Search or type a command (Ctrl + G)')
  33. .type('55 + 32{downarrow}{enter}', { delay: 700 });
  34. cy.get('.modal-title').should('contain', 'Result');
  35. cy.get('.msgprint').should('contain', '55 + 32 = 87');
  36. });
  37. });