Ver código fonte

Add functional_testing with cypress

philippe 6 anos atrás
pai
commit
4161fb1fda
22 arquivos alterados com 655 adições e 0 exclusões
  1. 19 0
      functional_testing/account/account_main_page.js
  2. 74 0
      functional_testing/account/content_account.js
  3. 15 0
      functional_testing/admin/content_admin_user.js
  4. 24 0
      functional_testing/admin/content_admin_workspace.js
  5. 15 0
      functional_testing/admin/navigation_admin_user.js
  6. 16 0
      functional_testing/admin/navigation_admin_workspace.js
  7. 30 0
      functional_testing/app_file/navigation_create_file.js
  8. 30 0
      functional_testing/app_folder/navigation_create_folder.js
  9. 41 0
      functional_testing/app_html-document/navigation_create_html-document.js
  10. 55 0
      functional_testing/app_html-document/operation_create_html-document.js
  11. 41 0
      functional_testing/app_thread/navigation_create_thread.js
  12. 57 0
      functional_testing/app_thread/operation_create_thread.js
  13. 19 0
      functional_testing/home_page/content_home_page.js
  14. 0 0
      functional_testing/interface/function_change_color.js
  15. 38 0
      functional_testing/login/content_login_page.js
  16. 23 0
      functional_testing/login/navigation_from_home_page_to_login_page.js
  17. 18 0
      functional_testing/login/navigation_from_login_page_to_home_page.js
  18. 7 0
      functional_testing/login/navigation_redirect_login_page.js
  19. 78 0
      functional_testing/workspace/content_workspace_dashboard.js
  20. 19 0
      functional_testing/workspace/navigation_create_workspace.js
  21. 19 0
      functional_testing/workspace/navigation_dashbord_link-for-calendar.js
  22. 17 0
      functional_testing/workspace/navigation_dashbord_link-for-webdav.js

+ 19 - 0
functional_testing/account/account_main_page.js Ver arquivo

@@ -0,0 +1,19 @@
1
+describe('account :: main_page', 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('', function () {
10
+//        cy.visit('/account')
11
+//        cy.url().should('include', '/account')
12
+        cy.get('#dropdownMenuButton').should('be.visible')
13
+        cy.get('#dropdownMenuButton').click()
14
+        cy.get('a.setting__link[href="/account"]').should('be.visible')
15
+        cy.get('a.setting__link[href="/account"]').click()
16
+        cy.url().should('include', '/account')
17
+        cy.get('.account__userinformation').should('be.visible')
18
+    })
19
+})

+ 74 - 0
functional_testing/account/content_account.js Ver arquivo

@@ -0,0 +1,74 @@
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
+})

+ 15 - 0
functional_testing/admin/content_admin_user.js Ver arquivo

@@ -0,0 +1,15 @@
1
+//describe('navigation :: admin > user', 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('.adminlink__btn.dropdown-toggle').click()
9
+//        cy.get('a.setting__link[href="/admin/user"]').click()
10
+//        cy.url().should('include', '/admin/user')
11
+//    })
12
+//    it ('', function(){
13
+//        cy.get('').should('')
14
+//    })
15
+//})

+ 24 - 0
functional_testing/admin/content_admin_workspace.js Ver arquivo

@@ -0,0 +1,24 @@
1
+describe('content :: admin > workspace', 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('.adminlink__btn.dropdown-toggle').click()
9
+        cy.get('a.setting__link[href="/admin/workspace"]').click()
10
+        cy.url().should('include', '/admin/workspace')
11
+    })
12
+    it ('', function(){
13
+        cy.get('.adminWorkspacePage__description').should('be.visible')
14
+        cy.get('.adminWorkspacePage__delimiter').should('be.visible')
15
+        cy.get('.adminWorkspacePage__workspaceTable').should('be.visible')
16
+    })
17
+    it ('content of workspaceTable', function(){
18
+        cy.get('.adminWorkspacePage__workspaceTable th:nth-child(1)[scope="col"]').should('be.visible')
19
+        cy.get('.adminWorkspacePage__workspaceTable th:nth-child(2)[scope="col"]').should('be.visible')
20
+        cy.get('.adminWorkspacePage__workspaceTable th:nth-child(3)[scope="col"]').should('be.visible')
21
+        cy.get('.adminWorkspacePage__workspaceTable th:nth-child(4)[scope="col"]').should('be.visible')
22
+        cy.get('.adminWorkspacePage__workspaceTable th:nth-child(5)[scope="col"]').should('be.visible')
23
+    })
24
+})

+ 15 - 0
functional_testing/admin/navigation_admin_user.js Ver arquivo

@@ -0,0 +1,15 @@
1
+describe('navigation :: admin > user', 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 ('', function(){
10
+        cy.get('.adminlink.dropdown').should('be.visible')
11
+        cy.get('.adminlink.dropdown').click()
12
+        cy.get('a[href="/admin/user"]').click()
13
+        cy.url().should('include', '/admin/user')
14
+    })
15
+})

+ 16 - 0
functional_testing/admin/navigation_admin_workspace.js Ver arquivo

@@ -0,0 +1,16 @@
1
+describe('navigation :: admin > workspace', 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 ('', function() {
10
+        cy.get('.adminlink.dropdown').should('be.visible')
11
+        cy.get('.adminlink.dropdown').click()
12
+        cy.get('a[href="/admin/workspace"]').click()
13
+        cy.url().should('include', '/admin/workspace')
14
+        cy.get('.adminWorkspacePage__description').should('be.visible')
15
+    })
16
+})

+ 30 - 0
functional_testing/app_file/navigation_create_file.js Ver arquivo

@@ -0,0 +1,30 @@
1
+// Not connected
2
+//describe('navigate :: workspace > create_new > file', function () {
3
+//    before(function () {
4
+//    //login
5
+//        cy.visit('/login')
6
+//        cy.get('input[type=email]').type('admin@admin.admin')
7
+//        cy.get('input[type=password]').type('admin@admin.admin')
8
+//        cy.get('form').find('button').get('.connection__form__btnsubmit').click()
9
+//    })
10
+//    it ('header button', function () {
11
+//        cy.get('#dropdownCreateBtn.workspace__header__btnaddcontent__label').click()
12
+//        cy.get('.show .subdropdown__link__file__icon').click()
13
+//        cy.get('.createcontent__contentname').should('be.visible')
14
+//        cy.get('.createcontent__form__input').should('have.attr', 'placeholder')
15
+//        cy.get('.createcontent__form__input').type('file1')
16
+//        cy.get('.createcontent__form__input').should('have.attr', 'value', 'file1')
17
+//        cy.get('.cardPopup__close').click()
18
+//        cy.get('.createcontent__contentname').should('not.be.visible')
19
+//    })
20
+//    it ('content button', function () {
21
+//        cy.get('.workspace__content__button.dropdownCreateBtn .btn-primary').click()
22
+//        cy.get('.show .subdropdown__link__file__icon').click()
23
+//        cy.get('.createcontent__contentname').should('be.visible')
24
+//        cy.get('.createcontent__form__input').should('have.attr', 'placeholder')
25
+//        cy.get('.createcontent__form__input').type('file2')
26
+//        cy.get('.createcontent__form__input').should('have.attr', 'value', 'file2')
27
+//        cy.get('.cardPopup__close').click()
28
+//        cy.get('.createcontent__contentname').should('not.be.visible')
29
+//    })
30
+//})

+ 30 - 0
functional_testing/app_folder/navigation_create_folder.js Ver arquivo

@@ -0,0 +1,30 @@
1
+// Not connected
2
+//describe('navigate :: workspace > create_new > folder', function () {
3
+//    before(function () {
4
+//    //login
5
+//        cy.visit('/login')
6
+//        cy.get('input[type=email]').type('admin@admin.admin')
7
+//        cy.get('input[type=password]').type('admin@admin.admin')
8
+//        cy.get('form').find('button').get('.connection__form__btnsubmit').click()
9
+//    })
10
+//    it ('header button', function () {
11
+//        cy.get('#dropdownCreateBtn.workspace__header__btnaddcontent__label').click()
12
+//        cy.get('.show .subdropdown__link__folder__icon').click()
13
+//        cy.get('.createcontent__contentname').should('be.visible')
14
+//        cy.get('.createcontent__form__input').should('have.attr', 'placeholder')
15
+//        cy.get('.createcontent__form__input').type('folder1')
16
+//        cy.get('.createcontent__form__input').should('have.attr', 'value', 'folder1')
17
+//        cy.get('.cardPopup__close').click()
18
+//        cy.get('.createcontent__contentname').should('not.be.visible')
19
+//    })
20
+//    it ('content button', function () {
21
+//        cy.get('.workspace__content__button.dropdownCreateBtn .btn-primary').click()
22
+//        cy.get('.show .subdropdown__link__folder__icon').click()
23
+//        cy.get('.createcontent__contentname').should('be.visible')
24
+//        cy.get('.createcontent__form__input').should('have.attr', 'placeholder')
25
+//        cy.get('.createcontent__form__input').type('folder2')
26
+//        cy.get('.createcontent__form__input').should('have.attr', 'value', 'folder2')
27
+//        cy.get('.cardPopup__close').click()
28
+//        cy.get('.createcontent__contentname').should('not.be.visible')
29
+//    })
30
+//})

+ 41 - 0
functional_testing/app_html-document/navigation_create_html-document.js Ver arquivo

@@ -0,0 +1,41 @@
1
+describe('navigate :: workspace > create_new > html-document', 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='document1'
11
+        cy.get('.dashboard__calltoaction div:nth-child(4) .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 ('all content > header button', function () {
20
+        var titre1='document1'
21
+        cy.get('#dropdownCreateBtn.workspace__header__btnaddcontent__label').click()
22
+        cy.get('.show .subdropdown__link__html-document__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 ('all content > content button', function () {
31
+        var titre1='document1'
32
+        cy.get('.workspace__content__button.dropdownCreateBtn .btn-primary').click()
33
+        cy.get('.show .subdropdown__link__html-document__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
+})

+ 55 - 0
functional_testing/app_html-document/operation_create_html-document.js Ver arquivo

@@ -0,0 +1,55 @@
1
+describe('operation :: workspace > create_new > html-document', 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='dashbord button'
11
+        cy.url().should('include', '/workspaces/1/dashboard')
12
+        cy.get('.dashboard__calltoaction div:nth-child(4) .dashboard__calltoaction__button__text').should('be.visible')
13
+        cy.get('.dashboard__calltoaction div:nth-child(4) .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('.html-document.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('.html-document__header__close').should('be.visible')
28
+        cy.get('.html-document__header__close').click()
29
+        cy.get('.html-document.visible').should('not.be.visible')
30
+//        Need improvement to verified new content is in list
31
+//        cy.get('.workspace__content__fileandfolder .content__name__text').find(titre1)
32
+    })
33
+    it ('all content > header button ', function () {
34
+        var titre2='all content button'
35
+        cy.url().should('include', '/workspaces/1/contents')
36
+        cy.get('.workspace__header__btnaddcontent').should('be.visible')
37
+        cy.get('.workspace__header__btnaddcontent').click()
38
+        cy.get('.workspace__header__btnaddcontent__setting div:nth-child(4).subdropdown__link').click()
39
+        cy.get('.createcontent .createcontent__contentname').should('be.visible')
40
+        cy.get('.createcontent .createcontent__form__input').should('have.attr', 'placeholder')
41
+        cy.get('.createcontent .createcontent__form__input').type(titre2)
42
+        cy.get('.createcontent .createcontent__form__input').should('have.attr', 'value', titre2)
43
+        cy.get('.createcontent button.createcontent__form__button').click()
44
+        cy.get('.createcontent .createcontent__contentname').should('not.be.visible')
45
+        cy.get('.html-document.visible').should('be.visible')
46
+        cy.get('.html-document.visible .wsContentGeneric__header__title').should('be.visible')
47
+        cy.get('.html-document.visible .wsContentGeneric__header__title').contains(titre2)
48
+        cy.get('.html-document.visible .html-document__header__close').should('be.visible')
49
+        cy.get('.html-document.visible .html-document__header__close').click()
50
+        cy.get('.html-document.visible').should('not.be.visible')
51
+//        Need improvement to verified new content is in list
52
+//        cy.get('.workspace__content__fileandfolder .content__name__text').find(titre1)
53
+    })
54
+
55
+})

+ 41 - 0
functional_testing/app_thread/navigation_create_thread.js Ver arquivo

@@ -0,0 +1,41 @@
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
+})

+ 57 - 0
functional_testing/app_thread/operation_create_thread.js Ver arquivo

@@ -0,0 +1,57 @@
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
+
57
+})

+ 19 - 0
functional_testing/home_page/content_home_page.js Ver arquivo

@@ -0,0 +1,19 @@
1
+//describe('content :: home_page', 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 ('', function () {
10
+//        cy.get('#dropdownCreateBtn.workspace__header__btnaddcontent__label').click()
11
+//        cy.get('.show .subdropdown__link__thread__icon').click()
12
+//        cy.get('.createcontent__contentname').should('be.visible')
13
+//        cy.get('.createcontent__form__input').should('have.attr', 'placeholder')
14
+//        cy.get('.createcontent__form__input').type('thread1')
15
+//        cy.get('.createcontent__form__input').should('have.attr', 'value', 'thread1')
16
+//        cy.get('.cardPopup__close').click()
17
+//        cy.get('.createcontent__contentname').should('not.be.visible')
18
+//    })
19
+//})

+ 0 - 0
functional_testing/interface/function_change_color.js Ver arquivo


+ 38 - 0
functional_testing/login/content_login_page.js Ver arquivo

@@ -0,0 +1,38 @@
1
+describe('content :: login_page', function () {
2
+    before(function () {
3
+        cy.visit('/')
4
+    })
5
+    it('check all content', function () {
6
+        cy.url().should('include', '/login')
7
+        cy.get('.card-header.connection__header.text-center').should('be.visible')
8
+        cy.get('.languagedropdown__btnlanguage__imgselected').should('be.visible')
9
+        cy.get('.loginpage__footer__text').should('be.visible')
10
+        })
11
+})
12
+// @philippe 08/08/2018 - Not implemented in Tracim_V2.0
13
+//
14
+//describe('Content :: homepage > login > research', function () {
15
+//    before(function () {
16
+//        cy.visit('/')
17
+//    })
18
+//    it('check all content', function () {
19
+//        cy.get('.search__input.form-control').should('be.visible')
20
+//        cy.get('.search__input.form-control').should('have.attr','placeholder')
21
+//        cy.get('#headerInputSearch').should('be.visible')
22
+//    })
23
+//})
24
+
25
+describe('Content :: homepage > login > loginbox', function () {
26
+    before(function () {
27
+        cy.visit('/')
28
+    })
29
+    it('check all content', function () {
30
+        cy.get('input[type=email]').should('be.visible')
31
+        cy.get('input[type=email]').should('have.attr','placeholder')
32
+        cy.get('input[type=password]').should('be.visible')
33
+        cy.get('input[type=password]').should('have.attr','placeholder')
34
+        cy.get('.connection__form__btnsubmit').should('be.visible')
35
+        cy.get('.connection__form__btnsubmit').should('have.attr','type','button')
36
+        cy.get('.connection__form__pwforgot').should('be.visible')
37
+    })
38
+})

+ 23 - 0
functional_testing/login/navigation_from_home_page_to_login_page.js Ver arquivo

@@ -0,0 +1,23 @@
1
+describe('login :: navigate > disconnect', function () {
2
+    before(function () {
3
+        cy.visit('/login')
4
+    })
5
+    it('loging to home_page', function () {
6
+        // type username
7
+        cy.get('input[type=email]').type('admin@admin.admin').should('have.value','admin@admin.admin')
8
+        // type password
9
+        cy.get('input[type=password]').type('admin@admin.admin').should('have.value','admin@admin.admin')
10
+        // click on button "connexion" also if name of button change
11
+        cy.get('form').find('button').get('.connection__form__btnsubmit').click()
12
+        // we should be redirected to /dashboard
13
+        cy.url().should('include', 'http://localhost:6543/')
14
+        cy.get('.profilgroup__name__imgprofil').should('have.attr','src')
15
+        // for the moment we don't have name by default (26/07/2018)
16
+        cy.get('.profilgroup__name__imgprofil').invoke('text').should('be.equal','')
17
+    })
18
+    it('logout from home_page', function() {
19
+        cy.get('#dropdownMenuButton').click()
20
+        cy.get('div.setting__link').click()
21
+        cy.url().should('include', '/login')
22
+    })
23
+})

+ 18 - 0
functional_testing/login/navigation_from_login_page_to_home_page.js Ver arquivo

@@ -0,0 +1,18 @@
1
+describe('logging in tracim', function () {
2
+    before(function () {
3
+        cy.visit('/login')
4
+    })
5
+    it('', function () {
6
+        // type username
7
+        cy.get('input[type=email]').type('admin@admin.admin').should('have.value','admin@admin.admin')
8
+        // type password
9
+        cy.get('input[type=password]').type('admin@admin.admin').should('have.value','admin@admin.admin')
10
+        // click on button "connexion" also if name of button change
11
+        cy.get('form').find('button').get('.connection__form__btnsubmit').click()
12
+        // we should be redirected to /dashboard
13
+        cy.url().should('include', 'http://localhost:6543/')
14
+        cy.get('.profilgroup__name__imgprofil').should('have.attr','src')
15
+        // for the moment we don't have name by default (26/07/2018)
16
+        cy.get('.profilgroup__name__imgprofil').invoke('text').should('be.equal','')
17
+    })
18
+})

+ 7 - 0
functional_testing/login/navigation_redirect_login_page.js Ver arquivo

@@ -0,0 +1,7 @@
1
+describe('server > login page', function() {
2
+    it('successfully loads', function() {
3
+        cy.visit('/')
4
+        // change URL to match your dev URL
5
+        cy.url().should('include', 'http://localhost:6543/login')
6
+    })
7
+})

+ 78 - 0
functional_testing/workspace/content_workspace_dashboard.js Ver arquivo

@@ -0,0 +1,78 @@
1
+describe('content :: workspace > dashbord', 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.url().should('include', '/workspaces/1/dashboard')
9
+    })
10
+    it ('part of dashbord', function () {
11
+        cy.get('.dashboard.pageWrapperGeneric').should('be.visible')
12
+        cy.get('.dashboard__header.pageTitleGeneric').should('be.visible')
13
+        cy.get('.dashboard .pageContentGeneric').should('be.visible')
14
+
15
+        cy.get('.pageContentGeneric .dashboard__calltoaction').should('be.visible')
16
+        cy.get('.dashboard__workspaceInfo .activity').should('be.visible')
17
+        cy.get('.dashboard__workspaceInfo .memberlist').should('be.visible')
18
+        cy.get('.pageContentGeneric .moreinfo').should('be.visible')
19
+    })
20
+    it ('header', function() {
21
+        cy.get('.pageTitleGeneric .dashboard__header__title').should('be.visible')
22
+        cy.get('.pageTitleGeneric .dashboard__header__advancedmode').should('be.visible')
23
+        cy.get('.pageTitleGeneric .dashboard__header__advancedmode .btn.btn-primary').should('have.attr', 'type', 'button').should('be.visible')
24
+    })
25
+    it ('workspace-wrapper', function() {
26
+        cy.get('.dashboard__workspace-wrapper .dashboard__workspace').should('be.visible')
27
+        cy.get('.pageContentGeneric .dashboard__workspace__title').should('be.visible')
28
+        cy.get('.pageContentGeneric .dashboard__workspace__detail').should('be.visible')
29
+        cy.get('.dashboard__workspace-wrapper .userstatus').should('be.visible')
30
+        cy.get('.userstatus .userstatus__role__msg').should('be.visible')
31
+        cy.get('.userstatus .userstatus__role__definition').should('be.visible')
32
+        cy.get('.userstatus .userstatus__notification__text').should('be.visible')
33
+        cy.get('.userstatus .userstatus__notification__btn').should('be.visible')
34
+    })
35
+    it ('calltoaction', function() {
36
+        cy.get(':nth-child(1).dashboard__calltoaction__button').should('be.visible')
37
+        cy.get(':nth-child(1) .dashboard__calltoaction__button__text__icon').should('be.visible')
38
+        cy.get(':nth-child(1) .dashboard__calltoaction__button__text__title').should('be.visible')
39
+        cy.get(':nth-child(2).dashboard__calltoaction__button').should('be.visible')
40
+        cy.get(':nth-child(2) .dashboard__calltoaction__button__text__icon').should('be.visible')
41
+        cy.get(':nth-child(2) .dashboard__calltoaction__button__text__title').should('be.visible')
42
+        cy.get(':nth-child(3).dashboard__calltoaction__button').should('be.visible')
43
+        cy.get(':nth-child(3) .dashboard__calltoaction__button__text__icon').should('be.visible')
44
+        cy.get(':nth-child(3) .dashboard__calltoaction__button__text__title').should('be.visible')
45
+        cy.get(':nth-child(4).dashboard__calltoaction__button').should('be.visible')
46
+        cy.get(':nth-child(4) .dashboard__calltoaction__button__text__icon').should('be.visible')
47
+        cy.get(':nth-child(4) .dashboard__calltoaction__button__text__title').should('be.visible')
48
+    })
49
+    it ('activity', function() {
50
+        cy.get('.activity .activity__header__title').should('be.visible')
51
+        cy.get('.activity .activity__header__allread').should('be.visible')
52
+        cy.get('.activity .activity__wrapper').should('be.visible')
53
+        cy.get('.activity .activity__more__btn').should('be.visible')
54
+    })
55
+    it ('members', function() {
56
+        cy.get('.memberlist .memberlist__title.subTitle').should('be.visible')
57
+        cy.get('.memberlist .memberlist__list').should('be.visible')
58
+        cy.get('.memberlist .memberlist__list__item__info').should('be.visible')
59
+        cy.get('.memberlist .memberlist__btnadd').should('be.visible')
60
+        cy.get('.memberlist .memberlist__btnadd__button__avatar').should('be.visible')
61
+        cy.get('.memberlist .memberlist__btnadd__button__text').should('be.visible')
62
+    })
63
+    it ('link_webdav', function() {
64
+        cy.get('.moreinfo .moreinfo__webdav').should('be.visible')
65
+        cy.get('.moreinfo .moreinfo__webdav__btn').should('be.visible')
66
+        cy.get('.moreinfo .moreinfo__webdav__btn__icon').should('be.visible')
67
+        cy.get('.moreinfo .moreinfo__webdav__btn__text').should('be.visible')
68
+    })
69
+//    Not implemented in Tracim_V2.0
70
+//    it ('link_calendar', function() {
71
+//        cy.get('.moreinfo moreinfo__calendar').should('be.visible')
72
+//        cy.get('.moreinfo moreinfo__calendar__btn').should('be.visible')
73
+//        cy.get('.moreinfo moreinfo__calendar__btn__icon').should('be.visible')
74
+//        cy.get('.moreinfo moreinfo__calendar__btn__text').should('be.visible')
75
+//    })
76
+
77
+
78
+})

+ 19 - 0
functional_testing/workspace/navigation_create_workspace.js Ver arquivo

@@ -0,0 +1,19 @@
1
+describe('navigate :: create_new > workspace', 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 ('', function () {
10
+        cy.url().should('include', '/workspaces/1/dashboard')
11
+        cy.get('button.sidebar__content__btnnewworkspace__btn.btn').click()
12
+        cy.get('.createcontent__contentname__title').should('be.visible')
13
+        cy.get('.createcontent__form__input').should('have.attr', 'placeholder')
14
+        cy.get('.createcontent__form__input').type('workspace1')
15
+        cy.get('.createcontent__form__input').should('have.attr', 'value', 'workspace1')
16
+        cy.get('.cardPopup__close').click()
17
+        cy.get('.createcontent__contentname__title').should('not.be.visible')
18
+    })
19
+})

+ 19 - 0
functional_testing/workspace/navigation_dashbord_link-for-calendar.js Ver arquivo

@@ -0,0 +1,19 @@
1
+// Not implemented in Tracim_V2.0
2
+//
3
+//describe('navigation :: workspace > dashbord > link-for-calendar', function () {
4
+//    before(function () {
5
+//        //login
6
+//        cy.visit('/login')
7
+//        cy.get('input[type=email]').type('admin@admin.admin')
8
+//        cy.get('input[type=password]').type('admin@admin.admin')
9
+//        cy.get('form').find('button').get('.connection__form__btnsubmit').click()
10
+//    })
11
+//    it ('', function () {
12
+//        cy.get('.sidebar__content__navigation__workspace__item .fa-chevron-up').should('be.visible')
13
+//        cy.visit('/workspaces/1/dashboard')
14
+//        cy.get('.dashboard__header__title').should('be.visible')
15
+//        cy.get('.dashboard__moreinfo__calendar__btn__text').click()
16
+//        cy.get('.dashboard__moreinfo__calendar__information__text').should('be.visible')
17
+//        cy.get('.dashboard__moreinfo__calendar__information__link').contains('/calendar/')
18
+//    })
19
+//})

+ 17 - 0
functional_testing/workspace/navigation_dashbord_link-for-webdav.js Ver arquivo

@@ -0,0 +1,17 @@
1
+describe('navigation :: workspace > dashbord > link-for-webdav', 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 ('', function () {
10
+        cy.get('.sidebar__content__navigation__workspace__item .fa-chevron-up').should('be.visible')
11
+        cy.visit('/workspaces/1/dashboard')
12
+        cy.get('.dashboard__header__title').should('be.visible')
13
+        cy.get('.moreinfo__webdav__btn__text').click()
14
+        cy.get('.moreinfo__webdav__information__text').should('be.visible')
15
+        cy.get('.moreinfo__webdav__information__link').contains('/webdav/')
16
+        })
17
+})