1
|
|
|
describe('operation :: workspace > delete > thread', function () { |
2
|
|
|
before(() => { |
3
|
|
|
cy.resetDB() |
|
|
|
|
4
|
|
|
cy.setupBaseDB() |
5
|
|
|
}) |
6
|
|
|
|
7
|
|
|
beforeEach(function () { |
8
|
|
|
cy.login('administrators') |
|
|
|
|
9
|
|
|
}) |
10
|
|
|
it('all content > delete thread', function () { |
11
|
|
|
cy.visit('/ui/workspaces/1/dashboard') |
|
|
|
|
12
|
|
|
cy.get('.dashboard__workspace__detail').should('be.visible') |
13
|
|
|
cy.get('.dashboard__calltoaction .fa-comments-o').should('be.visible') |
14
|
|
|
cy.get('.dashboard__calltoaction .fa-comments-o').click() |
15
|
|
|
var titre1 = 'createthread' |
16
|
|
|
cy.get('.cardPopup__container .createcontent .createcontent__contentname').should('be.visible') |
17
|
|
|
cy.get('.cardPopup__container .createcontent .createcontent__form__input').should('have.attr', 'placeholder') |
18
|
|
|
cy.get('.cardPopup__container .createcontent .createcontent__form__input').type(titre1) |
19
|
|
|
cy.get('.cardPopup__container .createcontent .createcontent__form__input').should('have.attr', 'value', titre1) |
20
|
|
|
cy.get('.cardPopup__container .createcontent button.createcontent__form__button').click() |
21
|
|
|
cy.get('.cardPopup__container .createcontent .createcontent__contentname').should('not.be.visible') |
22
|
|
|
cy.get('.thread.visible').should('be.visible') |
23
|
|
|
cy.get('.thread.visible .wsContentGeneric__header__title').contains(titre1) |
24
|
|
|
cy.get('.thread.visible .thread__contentpage__header__close').click() |
25
|
|
|
cy.get('.thread.visible').should('not.be.visible') |
26
|
|
|
cy.visit('/ui/workspaces/1/contents') |
27
|
|
|
cy.get('.pageTitleGeneric__title__icon').should('be.visible') |
28
|
|
|
var titre1 = 'createthread' |
|
|
|
|
29
|
|
|
cy.get('.content__name').each(($elm) => { |
30
|
|
|
cy.wrap($elm).invoke('text').then((text) => { |
|
|
|
|
31
|
|
|
if (text === titre1) { |
32
|
|
|
cy.get('.content__name').contains(titre1).click() |
|
|
|
|
33
|
|
|
cy.get('.thread.visible').should('be.visible') |
34
|
|
|
cy.get('.thread.visible .wsContentGeneric__header__title').contains(titre1) |
35
|
|
|
cy.get('.thread.visible .align-items-center button:nth-child(2)').click() |
36
|
|
|
cy.get('.thread.visible .timeline__info__btnrestore').should('be.visible') |
37
|
|
|
cy.get('.thread.visible .thread__contentpage__header__close').click() |
38
|
|
|
cy.get('.thread.visible').should('not.be.visible') |
39
|
|
|
} |
40
|
|
|
}) |
41
|
|
|
}) |
42
|
|
|
}) |
43
|
|
|
}) |
44
|
|
|
|
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.