1
|
|
|
describe('content :: account', () => { |
2
|
|
|
before(() => { |
3
|
|
|
cy.resetDB() |
|
|
|
|
4
|
|
|
cy.setupBaseDB() |
5
|
|
|
}) |
6
|
|
|
|
7
|
|
|
beforeEach(() => { |
8
|
|
|
cy.login('users') |
|
|
|
|
9
|
|
|
cy.visit('/ui/account') |
10
|
|
|
}) |
11
|
|
|
|
12
|
|
|
it('content :: account exist', () => { |
13
|
|
|
cy.get('.account__title').should('be.visible') |
|
|
|
|
14
|
|
|
cy.get('.userinfo').should('be.visible') |
15
|
|
|
cy.get('.account__userpreference').should('be.visible') |
16
|
|
|
}) |
17
|
|
|
it('content :: account > resume', () => { |
18
|
|
|
// account__userinformation |
19
|
|
|
cy.get('.userinfo').should('be.visible') |
|
|
|
|
20
|
|
|
cy.get('.userinfo__name').should('be.visible') |
21
|
|
|
cy.get('.userinfo__email').should('be.visible') |
22
|
|
|
cy.get('.userinfo__avatar > img').should('be.visible') |
23
|
|
|
}) |
24
|
|
|
it('content :: account > menu', () => { |
25
|
|
|
// account userpreference menu |
26
|
|
|
cy.get('.menusubcomponent__list').should('be.visible') |
|
|
|
|
27
|
|
|
cy.get(':nth-child(1) > .menusubcomponent__list__item__link').should('be.visible') |
28
|
|
|
cy.get(':nth-child(2) > .menusubcomponent__list__item__link').should('be.visible') |
29
|
|
|
cy.get(':nth-child(3) > .menusubcomponent__list__item__link').should('be.visible') |
30
|
|
|
// @philippe 26/09/2018 timezone deactivated |
31
|
|
|
// cy.get(':nth-child(4) > .menusubcomponent__list__item__link').should('be.visible') |
32
|
|
|
}) |
33
|
|
|
it('content :: account > profile ', () => { |
34
|
|
|
// account userpreference profile |
35
|
|
|
cy.get(':nth-child(1) > .menusubcomponent__list__item__link').click() |
|
|
|
|
36
|
|
|
cy.get('.personaldata__sectiontitle').should('be.visible') |
37
|
|
|
cy.get('.personaldata__form div:nth-child(1) > .personaldata__form__txtinput').should('be.visible') |
38
|
|
|
cy.get('.personaldata__form div:nth-child(1) > .personaldata__form__txtinput').should('have.attr', 'placeholder') |
39
|
|
|
cy.get('.personaldata__form div:nth-child(3) > .personaldata__form__txtinput.withAdminMsg').should('be.visible') |
40
|
|
|
cy.get('.personaldata__form div:nth-child(3) > .personaldata__form__txtinput.withAdminMsg').should('have.attr', 'placeholder') |
41
|
|
|
cy.get('.personaldata__form div:nth-child(4) > .personaldata__form__txtinput.checkPassword').should('be.visible') |
42
|
|
|
cy.get('.personaldata__form div:nth-child(4) > .personaldata__form__txtinput.checkPassword').should('have.attr', 'placeholder') |
43
|
|
|
cy.get('.personaldata__form .personaldata__form__button').should('be.visible') |
44
|
|
|
cy.get('.personaldata__form .personaldata__form__button').should('have.attr', 'type', 'button') |
45
|
|
|
}) |
46
|
|
|
it('content :: account > password ', () => { |
47
|
|
|
// account userpreference password |
48
|
|
|
cy.get(':nth-child(3) > .menusubcomponent__list__item__link').click() |
|
|
|
|
49
|
|
|
cy.get('.personaldata__sectiontitle').should('be.visible') |
50
|
|
|
cy.get('.mr-5 div:nth-child(1) > .personaldata__form__txtinput').should('be.visible') |
51
|
|
|
cy.get('.mr-5 div:nth-child(1) > .personaldata__form__txtinput').should('have.attr', 'placeholder') |
52
|
|
|
cy.get('.mr-5 div:nth-child(2) > .personaldata__form__txtinput').should('be.visible') |
53
|
|
|
cy.get('.mr-5 div:nth-child(2) > .personaldata__form__txtinput').should('have.attr', 'placeholder') |
54
|
|
|
cy.get('.mr-5 div:nth-child(3) > .personaldata__form__txtinput').should('be.visible') |
55
|
|
|
cy.get('.mr-5 div:nth-child(3) > .personaldata__form__txtinput').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', 'button') |
58
|
|
|
}) |
59
|
|
|
// @philippe 26/09/2018 timezone deactivated |
60
|
|
|
// it('content :: account > timezone ', function() { |
61
|
|
|
// // account userpreference timezone |
62
|
|
|
// cy.get(':nth-child(4) > .menusubcomponent__list__item__link').click() |
63
|
|
|
// cy.get('.timezone__title').should('be.visible') |
64
|
|
|
// cy.get('#react-select-2--value .Select-placeholder').should('be.visible') |
65
|
|
|
// }) |
66
|
|
|
// Not in Tracim_V2.0*/ |
67
|
|
|
// it('content :: account > calendar ', function() { |
68
|
|
|
// // account userpreference personal calendar |
69
|
|
|
// cy.get(':nth-child(7) > .menusubcomponent__list__item__link').click() |
70
|
|
|
// cy.get('.account__userpreference__setting__calendar').should('be.visible') |
71
|
|
|
// cy.get('.calendar__title.subTitle').should('be.visible') |
72
|
|
|
// cy.get('.calendar__title').should('be.visible') |
73
|
|
|
// cy.get('.calendar__link').should('be.visible') |
74
|
|
|
// }) |
75
|
|
|
}) |
76
|
|
|
|
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.