Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

43 Zeilen
876 B

  1. context('Control Rating', () => {
  2. before(() => {
  3. cy.login();
  4. cy.visit('/desk');
  5. });
  6. function get_dialog_with_rating() {
  7. return cy.dialog({
  8. title: 'Rating',
  9. fields: [{
  10. 'fieldname': 'rate',
  11. 'fieldtype': 'Rating',
  12. }]
  13. });
  14. }
  15. it('click on the star rating to record value', () => {
  16. get_dialog_with_rating().as('dialog');
  17. cy.get('div.rating')
  18. .children('i.fa')
  19. .first()
  20. .click()
  21. .should('have.class', 'star-click');
  22. cy.get('@dialog').then(dialog => {
  23. var value = dialog.get_value('rate');
  24. expect(value).to.equal(1);
  25. dialog.hide();
  26. });
  27. });
  28. it('hover on the star', () => {
  29. get_dialog_with_rating();
  30. cy.get('div.rating')
  31. .children('i.fa')
  32. .first()
  33. .invoke('trigger', 'mouseenter')
  34. .should('have.class', 'star-hover')
  35. .invoke('trigger', 'mouseleave')
  36. .should('not.have.class', 'star-hover');
  37. });
  38. });