navigation_create_thread.js 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. describe('navigate :: workspace > create_new > thread', 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. })
  9. it ('dashboard > button', function() {
  10. var titre1='thread1'
  11. cy.get('.dashboard__calltoaction div:nth-child(2) .dashboard__calltoaction__button__text').click()
  12. cy.get('.createcontent .createcontent__contentname').should('be.visible')
  13. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'placeholder')
  14. cy.get('.createcontent .createcontent__form__input').type(titre1)
  15. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'value', titre1)
  16. cy.get('.cardPopup__container .cardPopup__close').click()
  17. cy.get('.createcontent .createcontent__contentname').should('not.be.visible')
  18. })
  19. it ('header button', function () {
  20. var titre1='thread1'
  21. cy.get('#dropdownCreateBtn.workspace__header__btnaddcontent__label').click()
  22. cy.get('.show .subdropdown__link__thread__icon').click()
  23. cy.get('.createcontent .createcontent__contentname').should('be.visible')
  24. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'placeholder')
  25. cy.get('.createcontent .createcontent__form__input').type(titre1)
  26. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'value', titre1)
  27. cy.get('.cardPopup__container .cardPopup__close').click()
  28. cy.get('.createcontent .createcontent__contentname').should('not.be.visible')
  29. })
  30. it ('content button', function () {
  31. var titre1='thread1'
  32. cy.get('.workspace__content__button.dropdownCreateBtn .btn-primary').click()
  33. cy.get('.show .subdropdown__link__thread__icon').click()
  34. cy.get('.createcontent .createcontent__contentname').should('be.visible')
  35. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'placeholder')
  36. cy.get('.createcontent .createcontent__form__input').type(titre1)
  37. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'value', titre1)
  38. cy.get('.cardPopup__container .cardPopup__close').click()
  39. cy.get('.createcontent .createcontent__contentname').should('not.be.visible')
  40. })
  41. })