operation_create_thread.js 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. describe('operation :: 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 ('dashborad > button', function(){
  10. var titre1='thread1'
  11. cy.url().should('include', '/workspaces/1/dashboard')
  12. cy.get('.dashboard__calltoaction div:nth-child(2) .dashboard__calltoaction__button__text').should('be.visible')
  13. cy.get('.dashboard__calltoaction div:nth-child(2) .dashboard__calltoaction__button__text').click()
  14. cy.get('.createcontent .createcontent__contentname').should('be.visible')
  15. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'placeholder')
  16. cy.get('.createcontent .createcontent__form__input').type(titre1)
  17. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'value', titre1)
  18. cy.get('.createcontent button.createcontent__form__button').click()
  19. cy.get('.createcontent .createcontent__contentname').should('not.be.visible')
  20. cy.get('.thread.visible').should('be.visible')
  21. cy.get('#appFeatureContainer .wsContentGeneric__header__title').contains(titre1)
  22. // Problem to write text in iframe
  23. // cy.get('#wysiwygNewVersion_ifr').click()
  24. // cy.get('body').type('Ceci est le début du document')
  25. // cy.get('.html-document__editionmode__submit.editionmode__button__submit').click()
  26. // cy.get('.html-document__contentpage__textnote__text span').contains('Ceci est le début du document')
  27. cy.get('.thread__contentpage__header__close').click()
  28. cy.get('.thread.visible').should('not.be.visible')
  29. // Need improvement to verified new content is in list
  30. // cy.get('.workspace__content__fileandfolder .content__name__text').find(titre1)
  31. })
  32. it ('all content > header button ', function () {
  33. var titre1='thread1'
  34. cy.url().should('include', '/workspaces/1/contents')
  35. cy.get('#dropdownCreateBtn.workspace__header__btnaddcontent__label').should('be.visible')
  36. cy.get('#dropdownCreateBtn.workspace__header__btnaddcontent__label').click()
  37. cy.get('.show .subdropdown__link__thread').click()
  38. cy.get('.createcontent .createcontent__contentname').should('be.visible')
  39. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'placeholder')
  40. cy.get('.createcontent .createcontent__form__input').type(titre1)
  41. cy.get('.createcontent .createcontent__form__input').should('have.attr', 'value', titre1)
  42. cy.get('.createcontent button.createcontent__form__button').click()
  43. cy.get('.createcontent .createcontent__contentname').should('not.be.visible')
  44. cy.get('.thread.visible').should('be.visible')
  45. cy.get('#appFeatureContainer .wsContentGeneric__header__title').contains(titre1)
  46. // Problem to write text in iframe
  47. // cy.get('#wysiwygNewVersion_ifr').click()
  48. // cy.get('body').type('Ceci est le début du document')
  49. // cy.get('.html-document__editionmode__submit.editionmode__button__submit').click()
  50. // cy.get('.html-document__contentpage__textnote__text span').contains('Ceci est le début du document')
  51. cy.get('.thread__contentpage__header__close').click()
  52. cy.get('.thread.visible').should('not.be.visible')
  53. // Need improvement to verified new content is in list
  54. // cy.get('.workspace__content__fileandfolder .content__name__text').find(titre1)
  55. })
  56. })