content_account.js 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. describe('content :: account', function () {
  2. before(function () {
  3. //login
  4. cy.visit('/login')
  5. cy.get('input[type=email]').type('admin@admin.admin')
  6. cy.get('input[type=password]').type('admin@admin.admin')
  7. cy.get('form').find('button').get('.connection__form__btnsubmit').click()
  8. cy.get('#dropdownMenuButton').click()
  9. cy.get('a.setting__link[href="/account"]').click()
  10. })
  11. it('content :: account exist', function () {
  12. // account__title
  13. cy.get('.account__title').should('be.visible')
  14. // account__userinformation
  15. cy.get('.account__userinformation').should('be.visible')
  16. // account__userpreference
  17. cy.get('.account__userpreference').should('be.visible')
  18. })
  19. it('content :: account > resume', function () {
  20. // account__userinformation
  21. cy.get('.account__userinformation').should('be.visible')
  22. cy.get('.account__userinformation__name').should('be.visible')
  23. cy.get('.account__userinformation__email').should('be.visible')
  24. cy.get('.account__userinformation__avatar > img').should('be.visible')
  25. })
  26. it('content :: account > menu', function() {
  27. // account userpreference menu
  28. cy.get('.account__userpreference__menu__list__disabled').should('be.visible')
  29. cy.get(':nth-child(3) > .account__userpreference__menu__list__item__link').should('be.visible')
  30. cy.get(':nth-child(4) > .account__userpreference__menu__list__item__link').should('be.visible')
  31. cy.get(':nth-child(5) > .account__userpreference__menu__list__item__link').should('be.visible')
  32. cy.get(':nth-child(6) > .account__userpreference__menu__list__item__link').should('be.visible')
  33. /*cy.get(':nth-child(7) > .account__userpreference__menu__list__item__link').should('be.visible')*/
  34. })
  35. it('content :: account > profile ', function() {
  36. // account userpreference profile
  37. cy.get('.personaldata__sectiontitle').should('be.visible')
  38. /*cy.get('.personaldata__form > :nth-child(1)').should('be.visible')*/
  39. cy.get(':nth-child(2) > .personaldata__form__txtinput').should('be.visible')
  40. cy.get(':nth-child(2) > .personaldata__form__txtinput').should('have.attr','placeholder')
  41. /*cy.get('.personaldata__form > :nth-child(3)').should('be.visible')*/
  42. cy.get(':nth-child(4) > .personaldata__form__txtinput').should('be.visible')
  43. cy.get(':nth-child(4) > .personaldata__form__txtinput').should('have.attr','placeholder')
  44. cy.get('.personaldata__form__button').should('be.visible')
  45. cy.get('.personaldata__form__button').should('have.attr','type','submit')
  46. })
  47. it('content :: account > password ', function() {
  48. // account userpreference password
  49. cy.get(':nth-child(5) > .account__userpreference__menu__list__item__link').click()
  50. cy.get('.personaldata__sectiontitle').should('be.visible')
  51. cy.get('.mr-5 .personaldata__form__title').should('be.visible')
  52. cy.get('.mr-5 .personaldata__form__txtinput').should('be.visible')
  53. cy.get('.mr-5 .personaldata__form__txtinput').should('have.attr','placeholder')
  54. cy.get('.mr-5 .personaldata__form__txtinput.mt-4').should('be.visible')
  55. cy.get('.mr-5 .personaldata__form__txtinput.mt-4').should('have.attr','placeholder')
  56. cy.get('.mr-5 .personaldata__form__button').should('be.visible')
  57. cy.get('.mr-5 .personaldata__form__button').should('have.attr','type','submit')
  58. })
  59. it('content :: account > timezone ', function() {
  60. // account userpreference timezone
  61. cy.get(':nth-child(6) > .account__userpreference__menu__list__item__link').click()
  62. cy.get('.timezone__title').should('be.visible')
  63. cy.get('#react-select-2--value .Select-placeholder').should('be.visible')
  64. })
  65. /*Not in Tracim_V2.0*/
  66. /*it('content :: account > calendar ', function() {
  67. // account userpreference personal calendar
  68. cy.get(':nth-child(7) > .account__userpreference__menu__list__item__link').click()
  69. cy.get('.account__userpreference__setting__calendar').should('be.visible')
  70. cy.get('.calendar__title.subTitle').should('be.visible')
  71. cy.get('.calendar__title').should('be.visible')
  72. cy.get('.calendar__link').should('be.visible')
  73. })*/
  74. })