|
|
@@ -1,24 +1,24 @@
|
|
|
-context('Switch Sidebar content', () => {
|
|
|
- const ssPrefix = 'switch-sidebar-content';
|
|
|
+// context('Switch Sidebar content', () => {
|
|
|
+// const ssPrefix = 'switch-sidebar-content';
|
|
|
|
|
|
- beforeEach(() => {
|
|
|
- // login
|
|
|
- cy.fixture("user-admin.json").then(user => {
|
|
|
- cy.login(user.username, user.password);
|
|
|
- });
|
|
|
- });
|
|
|
+// beforeEach(() => {
|
|
|
+// // login
|
|
|
+// cy.fixture("user-admin.json").then(user => {
|
|
|
+// cy.login(user.username, user.password);
|
|
|
+// });
|
|
|
+// });
|
|
|
|
|
|
- it('PageTree is successfully shown', () => {
|
|
|
- cy.collapseSidebar(false);
|
|
|
- cy.visit('/page');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+// it('PageTree is successfully shown', () => {
|
|
|
+// cy.collapseSidebar(false);
|
|
|
+// cy.visit('/page');
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.getByTestid('grw-sidebar-nav-primary-page-tree').click();
|
|
|
- // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
- cy.wait(1500);
|
|
|
- cy.screenshot(`${ssPrefix}-pagetree-after-load`);
|
|
|
- });
|
|
|
-});
|
|
|
+// cy.getByTestid('grw-sidebar-nav-primary-page-tree').click();
|
|
|
+// // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
+// cy.wait(1500);
|
|
|
+// cy.screenshot(`${ssPrefix}-pagetree-after-load`);
|
|
|
+// });
|
|
|
+// });
|
|
|
|
|
|
context('Modal for page operation', () => {
|
|
|
|
|
|
@@ -32,143 +32,149 @@ context('Modal for page operation', () => {
|
|
|
cy.collapseSidebar(true);
|
|
|
});
|
|
|
|
|
|
- it("PageCreateModal is shown and closed successfully", () => {
|
|
|
- cy.visit('/');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+ // it("PageCreateModal is shown and closed successfully", () => {
|
|
|
+ // cy.visit('/');
|
|
|
+ // cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.getByTestid('newPageBtn').click();
|
|
|
+ // cy.getByTestid('newPageBtn').click();
|
|
|
|
|
|
- // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
- cy.wait(500) // Wait for animation to finish when the Create Page button is pressed
|
|
|
+ // // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
+ // cy.wait(500) // Wait for animation to finish when the Create Page button is pressed
|
|
|
|
|
|
- cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
- cy.screenshot(`${ssPrefix}new-page-modal-opened`);
|
|
|
- cy.get('button.close').click();
|
|
|
- });
|
|
|
- cy.screenshot(`${ssPrefix}page-create-modal-closed`);
|
|
|
- });
|
|
|
+ // cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
+ // cy.screenshot(`${ssPrefix}new-page-modal-opened`);
|
|
|
+ // cy.get('button.close').click();
|
|
|
+ // });
|
|
|
+ // cy.screenshot(`${ssPrefix}page-create-modal-closed`);
|
|
|
+ // });
|
|
|
|
|
|
- it("Successfully Create Today's page", () => {
|
|
|
- const pageName = "Today's page";
|
|
|
- cy.visit('/');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+ // it("Successfully Create Today's page", () => {
|
|
|
+ // const pageName = "Today's page";
|
|
|
+ // cy.visit('/');
|
|
|
+ // cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.getByTestid('newPageBtn').click();
|
|
|
+ // cy.getByTestid('newPageBtn').click();
|
|
|
|
|
|
- cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
- cy.get('.page-today-input2').type(pageName);
|
|
|
- cy.screenshot(`${ssPrefix}today-add-page-name`);
|
|
|
- cy.getByTestid('btn-create-memo').click();
|
|
|
- });
|
|
|
- cy.getByTestid('page-editor').should('be.visible');
|
|
|
- cy.getByTestid('save-page-btn').click();
|
|
|
- cy.get('.layout-root').should('not.have.class', 'editing');
|
|
|
+ // cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
+ // cy.get('.page-today-input2').type(pageName);
|
|
|
+ // cy.screenshot(`${ssPrefix}today-add-page-name`);
|
|
|
+ // cy.getByTestid('btn-create-memo').click();
|
|
|
+ // });
|
|
|
+ // cy.getByTestid('page-editor').should('be.visible');
|
|
|
+ // cy.getByTestid('save-page-btn').click();
|
|
|
+ // cy.get('.layout-root').should('not.have.class', 'editing');
|
|
|
|
|
|
- cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
|
|
|
+ // cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
|
|
|
|
|
|
- // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
- cy.wait(300);
|
|
|
+ // // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
+ // cy.wait(300);
|
|
|
|
|
|
- // Do not use "cy.waitUntilSkeletonDisappear()"
|
|
|
- cy.get('.grw-skeleton').should('not.exist');
|
|
|
+ // // Do not use "cy.waitUntilSkeletonDisappear()"
|
|
|
+ // cy.get('.grw-skeleton').should('not.exist');
|
|
|
|
|
|
- cy.screenshot(`${ssPrefix}create-today-page`);
|
|
|
- });
|
|
|
+ // cy.screenshot(`${ssPrefix}create-today-page`);
|
|
|
+ // });
|
|
|
|
|
|
- it('Successfully create page under specific path', () => {
|
|
|
- const pageName = 'child';
|
|
|
+ // it('Successfully create page under specific path', () => {
|
|
|
+ // const pageName = 'child';
|
|
|
|
|
|
- cy.visit('/Sandbox');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+ // cy.visit('/Sandbox');
|
|
|
+ // cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.getByTestid('newPageBtn').click();
|
|
|
+ // cy.getByTestid('newPageBtn').click();
|
|
|
|
|
|
- cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
- cy.get('.rbt-input-main').should('have.value', '/Sandbox/');
|
|
|
- cy.get('.rbt-input-main').type(pageName);
|
|
|
- cy.screenshot(`${ssPrefix}under-path-add-page-name`);
|
|
|
- cy.getByTestid('btn-create-page-under-below').click();
|
|
|
- });
|
|
|
- cy.getByTestid('page-editor').should('be.visible');
|
|
|
- cy.getByTestid('save-page-btn').click();
|
|
|
- cy.get('.layout-root').should('not.have.class', 'editing');
|
|
|
+ // cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
+ // cy.get('.rbt-input-main').should('have.value', '/Sandbox/');
|
|
|
+ // cy.get('.rbt-input-main').type(pageName);
|
|
|
+ // cy.screenshot(`${ssPrefix}under-path-add-page-name`);
|
|
|
+ // cy.getByTestid('btn-create-page-under-below').click();
|
|
|
+ // });
|
|
|
+ // cy.getByTestid('page-editor').should('be.visible');
|
|
|
+ // cy.getByTestid('save-page-btn').click();
|
|
|
+ // cy.get('.layout-root').should('not.have.class', 'editing');
|
|
|
|
|
|
- cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
|
|
|
+ // cy.getByTestid('grw-contextual-sub-nav').should('be.visible');
|
|
|
|
|
|
- // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
- cy.wait(300);
|
|
|
+ // // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
+ // cy.wait(300);
|
|
|
|
|
|
- // Do not use "cy.waitUntilSkeletonDisappear()"
|
|
|
- cy.get('.grw-skeleton').should('not.exist');
|
|
|
+ // // Do not use "cy.waitUntilSkeletonDisappear()"
|
|
|
+ // cy.get('.grw-skeleton').should('not.exist');
|
|
|
|
|
|
- cy.screenshot(`${ssPrefix}create-page-under-specific-page`);
|
|
|
- });
|
|
|
+ // cy.screenshot(`${ssPrefix}create-page-under-specific-page`);
|
|
|
+ // });
|
|
|
|
|
|
- it('Trying to create template page under the root page fail', () => {
|
|
|
- cy.visit('/');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+ // it('Trying to create template page under the root page fail', () => {
|
|
|
+ // cy.visit('/');
|
|
|
+ // cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.getByTestid('newPageBtn').click();
|
|
|
+ // cy.getByTestid('newPageBtn').click();
|
|
|
|
|
|
- cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
+ // cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
|
|
|
- cy.getByTestid('grw-page-create-modal-path-name').should('have.text', '/');
|
|
|
+ // cy.getByTestid('grw-page-create-modal-path-name').should('have.text', '/');
|
|
|
|
|
|
- cy.get('#template-type').click();
|
|
|
- cy.get('#template-type').next().find('button:eq(0)').click({force: true});
|
|
|
- cy.getByTestid('grw-btn-edit-page').should('be.visible').click();
|
|
|
- });
|
|
|
- cy.get('.toast-error').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
- cy.screenshot(`${ssPrefix}create-template-for-children-error`);
|
|
|
- cy.get('.toast-error').should('be.visible').click();
|
|
|
- cy.get('.toast-error').should('not.exist');
|
|
|
-
|
|
|
- cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
- cy.get('#template-type').click();
|
|
|
- cy.get('#template-type').next().find('button:eq(1)').click({force: true});
|
|
|
- cy.getByTestid('grw-btn-edit-page').should('be.visible').click();
|
|
|
- });
|
|
|
- cy.get('.toast-error').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
- cy.screenshot(`${ssPrefix}create-template-for-descendants-error`);
|
|
|
- });
|
|
|
+ // cy.get('#template-type').click();
|
|
|
+ // cy.get('#template-type').next().find('button:eq(0)').click({force: true});
|
|
|
+ // cy.getByTestid('grw-btn-edit-page').should('be.visible').click();
|
|
|
+ // });
|
|
|
+ // cy.get('.toast-error').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
+ // cy.screenshot(`${ssPrefix}create-template-for-children-error`);
|
|
|
+ // cy.get('.toast-error').should('be.visible').click();
|
|
|
+ // cy.get('.toast-error').should('not.exist');
|
|
|
+
|
|
|
+ // cy.getByTestid('page-create-modal').should('be.visible').within(() => {
|
|
|
+ // cy.get('#template-type').click();
|
|
|
+ // cy.get('#template-type').next().find('button:eq(1)').click({force: true});
|
|
|
+ // cy.getByTestid('grw-btn-edit-page').should('be.visible').click();
|
|
|
+ // });
|
|
|
+ // cy.get('.toast-error').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
+ // cy.screenshot(`${ssPrefix}create-template-for-descendants-error`);
|
|
|
+ // });
|
|
|
|
|
|
- it('PageDeleteModal is shown successfully', () => {
|
|
|
+ it('Page Deletion and PutBack is executed successfully', () => {
|
|
|
cy.visit('/Sandbox/Bootstrap4');
|
|
|
cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
cy.get('#grw-subnav-container').within(() => {
|
|
|
cy.getByTestid('open-page-item-control-btn').click({force: true});
|
|
|
cy.getByTestid('open-page-delete-modal-btn').click({force: true});
|
|
|
- });
|
|
|
+ });
|
|
|
+
|
|
|
+ cy.getByTestid('page-delete-modal').should('be.visible').within(() => {
|
|
|
+ cy.screenshot(`${ssPrefix}-delete-modal`);
|
|
|
+ cy.getByTestid('delete-page-button').click();
|
|
|
+ });
|
|
|
+ cy.getByTestid('trash-page-alert').should('be.visible');
|
|
|
+ cy.screenshot(`${ssPrefix}-bootstrap4-is-in-garbage-box`)
|
|
|
|
|
|
- cy.getByTestid('page-delete-modal').should('be.visible').screenshot(`${ssPrefix}-delete-bootstrap4`);
|
|
|
});
|
|
|
|
|
|
- it('PageDuplicateModal is shown successfully', () => {
|
|
|
- cy.visit('/Sandbox/Bootstrap4');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+ // it('PageDuplicateModal is shown successfully', () => {
|
|
|
+ // cy.visit('/Sandbox/Bootstrap4');
|
|
|
+ // cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.get('#grw-subnav-container').within(() => {
|
|
|
- cy.getByTestid('open-page-item-control-btn').click({force: true});
|
|
|
- cy.getByTestid('open-page-duplicate-modal-btn').click({force: true});
|
|
|
- });
|
|
|
+ // cy.get('#grw-subnav-container').within(() => {
|
|
|
+ // cy.getByTestid('open-page-item-control-btn').click({force: true});
|
|
|
+ // cy.getByTestid('open-page-duplicate-modal-btn').click({force: true});
|
|
|
+ // });
|
|
|
|
|
|
- cy.getByTestid('page-duplicate-modal').should('be.visible').screenshot(`${ssPrefix}-duplicate-bootstrap4`);
|
|
|
- });
|
|
|
+ // cy.getByTestid('page-duplicate-modal').should('be.visible').screenshot(`${ssPrefix}-duplicate-bootstrap4`);
|
|
|
+ // });
|
|
|
|
|
|
- it('PageMoveRenameModal is shown successfully', () => {
|
|
|
- cy.visit('/Sandbox/Bootstrap4');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+ // it('PageMoveRenameModal is shown successfully', () => {
|
|
|
+ // cy.visit('/Sandbox/Bootstrap4');
|
|
|
+ // cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.get('#grw-subnav-container').within(() => {
|
|
|
- cy.getByTestid('open-page-item-control-btn').click({force: true});
|
|
|
- cy.getByTestid('open-page-move-rename-modal-btn').click({force: true});
|
|
|
- });
|
|
|
+ // cy.get('#grw-subnav-container').within(() => {
|
|
|
+ // cy.getByTestid('open-page-item-control-btn').click({force: true});
|
|
|
+ // cy.getByTestid('open-page-move-rename-modal-btn').click({force: true});
|
|
|
+ // });
|
|
|
|
|
|
- cy.getByTestid('grw-page-rename-button').should('be.disabled');
|
|
|
+ // cy.getByTestid('grw-page-rename-button').should('be.disabled');
|
|
|
|
|
|
- cy.getByTestid('page-rename-modal').should('be.visible').screenshot(`${ssPrefix}-rename-bootstrap4`);
|
|
|
- });
|
|
|
+ // cy.getByTestid('page-rename-modal').should('be.visible').screenshot(`${ssPrefix}-rename-bootstrap4`);
|
|
|
+ // });
|
|
|
|
|
|
});
|
|
|
|
|
|
@@ -201,277 +207,277 @@ context('Modal for page operation', () => {
|
|
|
|
|
|
// });
|
|
|
|
|
|
-context('Page Accessories Modal', () => {
|
|
|
-
|
|
|
- const ssPrefix = 'access-to-page-accessories-modal';
|
|
|
-
|
|
|
- beforeEach(() => {
|
|
|
- // login
|
|
|
- cy.fixture("user-admin.json").then(user => {
|
|
|
- cy.login(user.username, user.password);
|
|
|
- });
|
|
|
- cy.collapseSidebar(true);
|
|
|
- });
|
|
|
-
|
|
|
- it('Page History is shown successfully', () => {
|
|
|
- cy.visit('/Sandbox/Bootstrap4');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
-
|
|
|
- cy.get('#grw-subnav-container').within(() => {
|
|
|
- cy.getByTestid('open-page-item-control-btn').within(() => {
|
|
|
- cy.get('button.btn-page-item-control').click({force: true});
|
|
|
- });
|
|
|
- cy.getByTestid('open-page-accessories-modal-btn-with-history-tab').click({force: true});
|
|
|
- });
|
|
|
+// context('Page Accessories Modal', () => {
|
|
|
|
|
|
- cy.getByTestid('page-history').should('be.visible')
|
|
|
- cy.screenshot(`${ssPrefix}-open-page-history-bootstrap4`);
|
|
|
- });
|
|
|
-
|
|
|
- it('Page Attachment Data is shown successfully', () => {
|
|
|
- cy.visit('/Sandbox/Bootstrap4');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
-
|
|
|
- cy.get('#grw-subnav-container').within(() => {
|
|
|
- cy.getByTestid('open-page-item-control-btn').within(() => {
|
|
|
- cy.get('button.btn-page-item-control').click({force: true});
|
|
|
- });
|
|
|
- cy.getByTestid('open-page-accessories-modal-btn-with-attachment-data-tab').click({force: true});
|
|
|
- });
|
|
|
-
|
|
|
- cy.getByTestid('page-attachment').should('be.visible').contains('No attachments yet.');
|
|
|
- cy.screenshot(`${ssPrefix}-open-page-attachment-data-bootstrap4`);
|
|
|
- });
|
|
|
-
|
|
|
- it('Share Link Management is shown successfully', () => {
|
|
|
- cy.visit('/Sandbox/Bootstrap4');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
-
|
|
|
- cy.get('#grw-subnav-container').within(() => {
|
|
|
- cy.getByTestid('open-page-item-control-btn').within(() => {
|
|
|
- cy.get('button.btn-page-item-control').click({force: true});
|
|
|
- });
|
|
|
- cy.getByTestid('open-page-accessories-modal-btn-with-share-link-management-data-tab').should('be.visible');
|
|
|
- cy.getByTestid('open-page-accessories-modal-btn-with-share-link-management-data-tab').click();
|
|
|
- });
|
|
|
-
|
|
|
- cy.getByTestid('page-accessories-modal').should('be.visible');
|
|
|
- cy.getByTestid('share-link-management').should('be.visible');
|
|
|
- cy.screenshot(`${ssPrefix}-open-share-link-management-bootstrap4`);
|
|
|
- });
|
|
|
-});
|
|
|
-
|
|
|
-context('Tag Oprations', { scrollBehavior: false }, () =>{
|
|
|
-
|
|
|
- beforeEach(() => {
|
|
|
- // login
|
|
|
- cy.fixture("user-admin.json").then(user => {
|
|
|
- cy.login(user.username, user.password);
|
|
|
- });
|
|
|
- cy.collapseSidebar(true);
|
|
|
- });
|
|
|
+// const ssPrefix = 'access-to-page-accessories-modal';
|
|
|
|
|
|
- it('Successfully add new tag', () => {
|
|
|
- const ssPrefix = 'tag-operations-add-new-tag-'
|
|
|
- const tag = 'we';
|
|
|
+// beforeEach(() => {
|
|
|
+// // login
|
|
|
+// cy.fixture("user-admin.json").then(user => {
|
|
|
+// cy.login(user.username, user.password);
|
|
|
+// });
|
|
|
+// cy.collapseSidebar(true);
|
|
|
+// });
|
|
|
|
|
|
- cy.visit('/Sandbox');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+// it('Page History is shown successfully', () => {
|
|
|
+// cy.visit('/Sandbox/Bootstrap4');
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.get('#edit-tags-btn-wrapper-for-tooltip > a').should('be.visible');
|
|
|
- // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
- cy.wait(200);
|
|
|
- cy.get('#edit-tags-btn-wrapper-for-tooltip > a').click();
|
|
|
- cy.get('#edit-tag-modal').should('be.visible').screenshot(`${ssPrefix}1-edit-tag-input`);
|
|
|
-
|
|
|
- cy.get('#edit-tag-modal').within(() => {
|
|
|
- cy.get('.rbt-input-main').type(tag, {force: true});
|
|
|
- cy.get('#tag-typeahead-asynctypeahead').should('be.visible');
|
|
|
- cy.get('#tag-typeahead-asynctypeahead-item-0').should('be.visible');
|
|
|
- cy.screenshot(`${ssPrefix}2-type-tag-name`);
|
|
|
- });
|
|
|
+// cy.get('#grw-subnav-container').within(() => {
|
|
|
+// cy.getByTestid('open-page-item-control-btn').within(() => {
|
|
|
+// cy.get('button.btn-page-item-control').click({force: true});
|
|
|
+// });
|
|
|
+// cy.getByTestid('open-page-accessories-modal-btn-with-history-tab').click({force: true});
|
|
|
+// });
|
|
|
|
|
|
- cy.get('#edit-tag-modal').within(() => {
|
|
|
- cy.get('#tag-typeahead-asynctypeahead').should('be.visible');
|
|
|
- cy.get('#tag-typeahead-asynctypeahead-item-0').should('be.visible');
|
|
|
- cy.get('a#tag-typeahead-asynctypeahead-item-0').click({force: true})
|
|
|
- cy.screenshot(`${ssPrefix}3-insert-tag-name`);
|
|
|
- });
|
|
|
+// cy.getByTestid('page-history').should('be.visible')
|
|
|
+// cy.screenshot(`${ssPrefix}-open-page-history-bootstrap4`);
|
|
|
+// });
|
|
|
|
|
|
- cy.get('#edit-tag-modal').within(() => {
|
|
|
- cy.get('div.modal-footer > button').click();
|
|
|
- });
|
|
|
+// it('Page Attachment Data is shown successfully', () => {
|
|
|
+// cy.visit('/Sandbox/Bootstrap4');
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.get('.toast').should('be.visible').trigger('mouseover');
|
|
|
- cy.get('.grw-taglabels-container > .grw-tag-labels > a').contains(tag).should('exist');
|
|
|
- /* eslint-disable cypress/no-unnecessary-waiting */
|
|
|
- cy.wait(150); // wait for toastr to change its color occured by mouseover
|
|
|
- cy.screenshot(`${ssPrefix}4-click-done`);
|
|
|
- });
|
|
|
+// cy.get('#grw-subnav-container').within(() => {
|
|
|
+// cy.getByTestid('open-page-item-control-btn').within(() => {
|
|
|
+// cy.get('button.btn-page-item-control').click({force: true});
|
|
|
+// });
|
|
|
+// cy.getByTestid('open-page-accessories-modal-btn-with-attachment-data-tab').click({force: true});
|
|
|
+// });
|
|
|
|
|
|
- it('Successfully duplicate page by generated tag', () => {
|
|
|
- const ssPrefix = 'tag-operations-page-duplicate-';
|
|
|
- const tag = 'we';
|
|
|
- const newPageName = 'our';
|
|
|
+// cy.getByTestid('page-attachment').should('be.visible').contains('No attachments yet.');
|
|
|
+// cy.screenshot(`${ssPrefix}-open-page-attachment-data-bootstrap4`);
|
|
|
+// });
|
|
|
|
|
|
- cy.visit('/Sandbox');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+// it('Share Link Management is shown successfully', () => {
|
|
|
+// cy.visit('/Sandbox/Bootstrap4');
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.get('.grw-tag-label').should('be.visible').contains(tag).click();
|
|
|
+// cy.get('#grw-subnav-container').within(() => {
|
|
|
+// cy.getByTestid('open-page-item-control-btn').within(() => {
|
|
|
+// cy.get('button.btn-page-item-control').click({force: true});
|
|
|
+// });
|
|
|
+// cy.getByTestid('open-page-accessories-modal-btn-with-share-link-management-data-tab').should('be.visible');
|
|
|
+// cy.getByTestid('open-page-accessories-modal-btn-with-share-link-management-data-tab').click();
|
|
|
+// });
|
|
|
+
|
|
|
+// cy.getByTestid('page-accessories-modal').should('be.visible');
|
|
|
+// cy.getByTestid('share-link-management').should('be.visible');
|
|
|
+// cy.screenshot(`${ssPrefix}-open-share-link-management-bootstrap4`);
|
|
|
+// });
|
|
|
+// });
|
|
|
|
|
|
- // Search result page
|
|
|
- cy.getByTestid('search-result-base').should('be.visible');
|
|
|
- cy.getByTestid('search-result-list').should('be.visible');
|
|
|
- cy.getByTestid('search-result-content', { timeout: 60000 }).should('be.visible');
|
|
|
- cy.get('#revision-loader', { timeout: 60000 }).contains('Table of Contents', { timeout: 60000 });
|
|
|
+// context('Tag Oprations', { scrollBehavior: false }, () =>{
|
|
|
|
|
|
- // force to add 'active' to pass VRT: https://github.com/weseek/growi/pull/6603
|
|
|
- cy.getByTestid('page-list-item-L').first().invoke('addClass', 'active');
|
|
|
- cy.screenshot(`${ssPrefix}1-click-tag-name`);
|
|
|
- cy.getByTestid('search-result-list').should('be.visible').then(($el)=>{
|
|
|
- cy.wrap($el).within(()=>{
|
|
|
- cy.getByTestid('open-page-item-control-btn').first().click();
|
|
|
- });
|
|
|
+// beforeEach(() => {
|
|
|
+// // login
|
|
|
+// cy.fixture("user-admin.json").then(user => {
|
|
|
+// cy.login(user.username, user.password);
|
|
|
+// });
|
|
|
+// cy.collapseSidebar(true);
|
|
|
+// });
|
|
|
|
|
|
- // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
- cy.wait(1500); // for wait rendering pagelist info
|
|
|
- cy.screenshot(`${ssPrefix}2-click-three-dots-menu`);
|
|
|
+// it('Successfully add new tag', () => {
|
|
|
+// const ssPrefix = 'tag-operations-add-new-tag-'
|
|
|
+// const tag = 'we';
|
|
|
|
|
|
- cy.wrap($el).within(()=>{
|
|
|
- cy.getByTestid('open-page-item-control-btn').first().within(()=>{
|
|
|
- cy.getByTestid('open-page-duplicate-modal-btn').click();
|
|
|
- })
|
|
|
- });
|
|
|
- })
|
|
|
+// cy.visit('/Sandbox');
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.getByTestid('page-duplicate-modal').should('be.visible').within(() => {
|
|
|
- cy.get('.rbt-input-main').type(`-${newPageName}`, {force: true});
|
|
|
- }).screenshot(`${ssPrefix}3-duplicate-page`);
|
|
|
+// cy.get('#edit-tags-btn-wrapper-for-tooltip > a').should('be.visible');
|
|
|
+// // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
+// cy.wait(200);
|
|
|
+// cy.get('#edit-tags-btn-wrapper-for-tooltip > a').click();
|
|
|
+// cy.get('#edit-tag-modal').should('be.visible').screenshot(`${ssPrefix}1-edit-tag-input`);
|
|
|
+
|
|
|
+// cy.get('#edit-tag-modal').within(() => {
|
|
|
+// cy.get('.rbt-input-main').type(tag, {force: true});
|
|
|
+// cy.get('#tag-typeahead-asynctypeahead').should('be.visible');
|
|
|
+// cy.get('#tag-typeahead-asynctypeahead-item-0').should('be.visible');
|
|
|
+// cy.screenshot(`${ssPrefix}2-type-tag-name`);
|
|
|
+// });
|
|
|
|
|
|
- cy.getByTestid('page-duplicate-modal').within(() => {
|
|
|
- cy.intercept('POST', '/_api/v3/pages/duplicate').as('duplicate');
|
|
|
- cy.get('.modal-footer > button.btn').click();
|
|
|
- // Wait for completion of request to '/_api/v3/pages/duplicate'
|
|
|
- cy.wait('@duplicate')
|
|
|
- });
|
|
|
+// cy.get('#edit-tag-modal').within(() => {
|
|
|
+// cy.get('#tag-typeahead-asynctypeahead').should('be.visible');
|
|
|
+// cy.get('#tag-typeahead-asynctypeahead-item-0').should('be.visible');
|
|
|
+// cy.get('a#tag-typeahead-asynctypeahead-item-0').click({force: true})
|
|
|
+// cy.screenshot(`${ssPrefix}3-insert-tag-name`);
|
|
|
+// });
|
|
|
|
|
|
- cy.visit(`Sandbox-${newPageName}`);
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
- cy.screenshot(`${ssPrefix}4-duplicated-page`);
|
|
|
- });
|
|
|
+// cy.get('#edit-tag-modal').within(() => {
|
|
|
+// cy.get('div.modal-footer > button').click();
|
|
|
+// });
|
|
|
|
|
|
- it('Successfully rename page from generated tag', () => {
|
|
|
- const ssPrefix = 'tag-operations-page-rename-';
|
|
|
- const tag = 'we';
|
|
|
- const oldPageName = '/Sandbox-our';
|
|
|
- const newPageName = '/Sandbox-us';
|
|
|
+// cy.get('.toast').should('be.visible').trigger('mouseover');
|
|
|
+// cy.get('.grw-taglabels-container > .grw-tag-labels > a').contains(tag).should('exist');
|
|
|
+// /* eslint-disable cypress/no-unnecessary-waiting */
|
|
|
+// cy.wait(150); // wait for toastr to change its color occured by mouseover
|
|
|
+// cy.screenshot(`${ssPrefix}4-click-done`);
|
|
|
+// });
|
|
|
|
|
|
- cy.visit(oldPageName);
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+// it('Successfully duplicate page by generated tag', () => {
|
|
|
+// const ssPrefix = 'tag-operations-page-duplicate-';
|
|
|
+// const tag = 'we';
|
|
|
+// const newPageName = 'our';
|
|
|
+
|
|
|
+// cy.visit('/Sandbox');
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
+
|
|
|
+// cy.get('.grw-tag-label').should('be.visible').contains(tag).click();
|
|
|
+
|
|
|
+// // Search result page
|
|
|
+// cy.getByTestid('search-result-base').should('be.visible');
|
|
|
+// cy.getByTestid('search-result-list').should('be.visible');
|
|
|
+// cy.getByTestid('search-result-content', { timeout: 60000 }).should('be.visible');
|
|
|
+// cy.get('#revision-loader', { timeout: 60000 }).contains('Table of Contents', { timeout: 60000 });
|
|
|
+
|
|
|
+// // force to add 'active' to pass VRT: https://github.com/weseek/growi/pull/6603
|
|
|
+// cy.getByTestid('page-list-item-L').first().invoke('addClass', 'active');
|
|
|
+// cy.screenshot(`${ssPrefix}1-click-tag-name`);
|
|
|
+// cy.getByTestid('search-result-list').should('be.visible').then(($el)=>{
|
|
|
+// cy.wrap($el).within(()=>{
|
|
|
+// cy.getByTestid('open-page-item-control-btn').first().click();
|
|
|
+// });
|
|
|
+
|
|
|
+// // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
+// cy.wait(1500); // for wait rendering pagelist info
|
|
|
+// cy.screenshot(`${ssPrefix}2-click-three-dots-menu`);
|
|
|
+
|
|
|
+// cy.wrap($el).within(()=>{
|
|
|
+// cy.getByTestid('open-page-item-control-btn').first().within(()=>{
|
|
|
+// cy.getByTestid('open-page-duplicate-modal-btn').click();
|
|
|
+// })
|
|
|
+// });
|
|
|
+// })
|
|
|
+
|
|
|
+// cy.getByTestid('page-duplicate-modal').should('be.visible').within(() => {
|
|
|
+// cy.get('.rbt-input-main').type(`-${newPageName}`, {force: true});
|
|
|
+// }).screenshot(`${ssPrefix}3-duplicate-page`);
|
|
|
+
|
|
|
+// cy.getByTestid('page-duplicate-modal').within(() => {
|
|
|
+// cy.intercept('POST', '/_api/v3/pages/duplicate').as('duplicate');
|
|
|
+// cy.get('.modal-footer > button.btn').click();
|
|
|
+// // Wait for completion of request to '/_api/v3/pages/duplicate'
|
|
|
+// cy.wait('@duplicate')
|
|
|
+// });
|
|
|
|
|
|
- cy.get('.grw-tag-label').should('be.visible').contains(tag).click();
|
|
|
-
|
|
|
- // Search result page
|
|
|
- cy.getByTestid('search-result-base').should('be.visible');
|
|
|
- cy.getByTestid('search-result-list').should('be.visible');
|
|
|
- cy.getByTestid('search-result-content', { timeout: 60000 }).should('be.visible');
|
|
|
- cy.get('#revision-loader', { timeout: 60000 }).contains('Table of Contents', { timeout: 60000 });
|
|
|
-
|
|
|
- // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
- cy.wait(300);
|
|
|
- cy.screenshot(`${ssPrefix}1-click-tag-name`);
|
|
|
-
|
|
|
- cy.getByTestid('search-result-list').within(() => {
|
|
|
- cy.get('.list-group-item').each(($row) => {
|
|
|
- if($row.find('a').text() === oldPageName){
|
|
|
- cy.wrap($row).within(() => {
|
|
|
- cy.getByTestid('open-page-item-control-btn').first().click();
|
|
|
- cy.getByTestid('page-item-control-menu').should('have.class', 'show').then(() => {
|
|
|
- // empty sentence in page list empty: https://github.com/weseek/growi/pull/6880
|
|
|
- cy.getByTestid('revision-short-body-in-page-list-item-L').invoke('text', '');
|
|
|
- });
|
|
|
-
|
|
|
- cy.getByTestid('page-item-control-menu').within(()=>{
|
|
|
- cy.getByTestid('open-page-delete-modal-btn');
|
|
|
- cy.screenshot(`${ssPrefix}2-open-page-item-control-menu`);
|
|
|
- })
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
+// cy.visit(`Sandbox-${newPageName}`);
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
+// cy.screenshot(`${ssPrefix}4-duplicated-page`);
|
|
|
+// });
|
|
|
|
|
|
- cy.getByTestid('search-result-list').within(() => {
|
|
|
- cy.get('.list-group-item').each(($row) => {
|
|
|
- if($row.find('a').text() === oldPageName){
|
|
|
- cy.wrap($row).within(() => {
|
|
|
- cy.getByTestid('open-page-move-rename-modal-btn').click({force: true});
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
+// it('Successfully rename page from generated tag', () => {
|
|
|
+// const ssPrefix = 'tag-operations-page-rename-';
|
|
|
+// const tag = 'we';
|
|
|
+// const oldPageName = '/Sandbox-our';
|
|
|
+// const newPageName = '/Sandbox-us';
|
|
|
|
|
|
- cy.getByTestid('page-rename-modal').should('be.visible').within(() => {
|
|
|
- cy.get('.rbt-input-main').clear().type(newPageName,{force: true});
|
|
|
- }).screenshot(`${ssPrefix}3-insert-new-page-name`);
|
|
|
+// cy.visit(oldPageName);
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.getByTestid('page-rename-modal').should('be.visible').within(() => {
|
|
|
- cy.intercept('PUT', '/_api/v3/pages/rename').as('rename');
|
|
|
- cy.getByTestid('grw-page-rename-button').should('not.be.disabled').click();
|
|
|
- // Wait for completion of request to '/_api/v3/pages/rename'
|
|
|
- cy.wait('@rename')
|
|
|
- });
|
|
|
+// cy.get('.grw-tag-label').should('be.visible').contains(tag).click();
|
|
|
|
|
|
- cy.visit(newPageName);
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+// // Search result page
|
|
|
+// cy.getByTestid('search-result-base').should('be.visible');
|
|
|
+// cy.getByTestid('search-result-list').should('be.visible');
|
|
|
+// cy.getByTestid('search-result-content', { timeout: 60000 }).should('be.visible');
|
|
|
+// cy.get('#revision-loader', { timeout: 60000 }).contains('Table of Contents', { timeout: 60000 });
|
|
|
|
|
|
- cy.getByTestid('grw-tag-labels').should('be.visible')
|
|
|
- cy.screenshot(`${ssPrefix}4-new-page-name-applied`);
|
|
|
- });
|
|
|
-});
|
|
|
+// // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
+// cy.wait(300);
|
|
|
+// cy.screenshot(`${ssPrefix}1-click-tag-name`);
|
|
|
+
|
|
|
+// cy.getByTestid('search-result-list').within(() => {
|
|
|
+// cy.get('.list-group-item').each(($row) => {
|
|
|
+// if($row.find('a').text() === oldPageName){
|
|
|
+// cy.wrap($row).within(() => {
|
|
|
+// cy.getByTestid('open-page-item-control-btn').first().click();
|
|
|
+// cy.getByTestid('page-item-control-menu').should('have.class', 'show').then(() => {
|
|
|
+// // empty sentence in page list empty: https://github.com/weseek/growi/pull/6880
|
|
|
+// cy.getByTestid('revision-short-body-in-page-list-item-L').invoke('text', '');
|
|
|
+// });
|
|
|
+
|
|
|
+// cy.getByTestid('page-item-control-menu').within(()=>{
|
|
|
+// cy.getByTestid('open-page-delete-modal-btn');
|
|
|
+// cy.screenshot(`${ssPrefix}2-open-page-item-control-menu`);
|
|
|
+// })
|
|
|
+// });
|
|
|
+// }
|
|
|
+// });
|
|
|
+// });
|
|
|
|
|
|
-context('Shortcuts', () => {
|
|
|
- const ssPrefix = 'shortcuts';
|
|
|
+// cy.getByTestid('search-result-list').within(() => {
|
|
|
+// cy.get('.list-group-item').each(($row) => {
|
|
|
+// if($row.find('a').text() === oldPageName){
|
|
|
+// cy.wrap($row).within(() => {
|
|
|
+// cy.getByTestid('open-page-move-rename-modal-btn').click({force: true});
|
|
|
+// });
|
|
|
+// }
|
|
|
+// });
|
|
|
+// });
|
|
|
|
|
|
- beforeEach(() => {
|
|
|
- // login
|
|
|
- cy.fixture("user-admin.json").then(user => {
|
|
|
- cy.login(user.username, user.password);
|
|
|
- });
|
|
|
- });
|
|
|
+// cy.getByTestid('page-rename-modal').should('be.visible').within(() => {
|
|
|
+// cy.get('.rbt-input-main').clear().type(newPageName,{force: true});
|
|
|
+// }).screenshot(`${ssPrefix}3-insert-new-page-name`);
|
|
|
|
|
|
- it('Successfully updating a page using a shortcut on a previously created page', () => {
|
|
|
- const body1 = 'hello';
|
|
|
- const body2 = 'world';
|
|
|
- const savePageShortcutKey = '{ctrl+s}'
|
|
|
+// cy.getByTestid('page-rename-modal').should('be.visible').within(() => {
|
|
|
+// cy.intercept('PUT', '/_api/v3/pages/rename').as('rename');
|
|
|
+// cy.getByTestid('grw-page-rename-button').should('not.be.disabled').click();
|
|
|
+// // Wait for completion of request to '/_api/v3/pages/rename'
|
|
|
+// cy.wait('@rename')
|
|
|
+// });
|
|
|
|
|
|
- cy.visit('/Sandbox/child');
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
+// cy.visit(newPageName);
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.get('#grw-subnav-container').within(() => {
|
|
|
- cy.getByTestid('editor-button').should('be.visible').click();
|
|
|
- })
|
|
|
+// cy.getByTestid('grw-tag-labels').should('be.visible')
|
|
|
+// cy.screenshot(`${ssPrefix}4-new-page-name-applied`);
|
|
|
+// });
|
|
|
+// });
|
|
|
|
|
|
- cy.get('.layout-root').should('have.class', 'editing');
|
|
|
- cy.get('.grw-editor-navbar-bottom').should('be.visible');
|
|
|
+// context('Shortcuts', () => {
|
|
|
+// const ssPrefix = 'shortcuts';
|
|
|
|
|
|
- // 1st
|
|
|
- cy.get('.CodeMirror').type(body1);
|
|
|
- cy.get('.CodeMirror').contains(body1);
|
|
|
- cy.get('.page-editor-preview-body').contains(body1);
|
|
|
- cy.get('.CodeMirror').type(savePageShortcutKey);
|
|
|
+// beforeEach(() => {
|
|
|
+// // login
|
|
|
+// cy.fixture("user-admin.json").then(user => {
|
|
|
+// cy.login(user.username, user.password);
|
|
|
+// });
|
|
|
+// });
|
|
|
|
|
|
- cy.get('.toast').should('be.visible').trigger('mouseover');
|
|
|
- cy.screenshot(`${ssPrefix}-update-page-1`);
|
|
|
- cy.get('.toast-close-button').click();
|
|
|
- cy.get('.toast').should('not.exist');
|
|
|
+// it('Successfully updating a page using a shortcut on a previously created page', () => {
|
|
|
+// const body1 = 'hello';
|
|
|
+// const body2 = 'world';
|
|
|
+// const savePageShortcutKey = '{ctrl+s}'
|
|
|
|
|
|
- // 2nd
|
|
|
- cy.get('.CodeMirror').type(body2);
|
|
|
- cy.get('.CodeMirror').contains(body2);
|
|
|
- cy.get('.page-editor-preview-body').contains(body2);
|
|
|
- cy.get('.CodeMirror').type(savePageShortcutKey);
|
|
|
+// cy.visit('/Sandbox/child');
|
|
|
+// cy.waitUntilSkeletonDisappear();
|
|
|
|
|
|
- cy.get('.toast').should('be.visible').trigger('mouseover');
|
|
|
- cy.screenshot(`${ssPrefix}-update-page-2`);
|
|
|
- });
|
|
|
-});
|
|
|
+// cy.get('#grw-subnav-container').within(() => {
|
|
|
+// cy.getByTestid('editor-button').should('be.visible').click();
|
|
|
+// })
|
|
|
+
|
|
|
+// cy.get('.layout-root').should('have.class', 'editing');
|
|
|
+// cy.get('.grw-editor-navbar-bottom').should('be.visible');
|
|
|
+
|
|
|
+// // 1st
|
|
|
+// cy.get('.CodeMirror').type(body1);
|
|
|
+// cy.get('.CodeMirror').contains(body1);
|
|
|
+// cy.get('.page-editor-preview-body').contains(body1);
|
|
|
+// cy.get('.CodeMirror').type(savePageShortcutKey);
|
|
|
+
|
|
|
+// cy.get('.toast').should('be.visible').trigger('mouseover');
|
|
|
+// cy.screenshot(`${ssPrefix}-update-page-1`);
|
|
|
+// cy.get('.toast-close-button').click();
|
|
|
+// cy.get('.toast').should('not.exist');
|
|
|
+
|
|
|
+// // 2nd
|
|
|
+// cy.get('.CodeMirror').type(body2);
|
|
|
+// cy.get('.CodeMirror').contains(body2);
|
|
|
+// cy.get('.page-editor-preview-body').contains(body2);
|
|
|
+// cy.get('.CodeMirror').type(savePageShortcutKey);
|
|
|
+
|
|
|
+// cy.get('.toast').should('be.visible').trigger('mouseover');
|
|
|
+// cy.screenshot(`${ssPrefix}-update-page-2`);
|
|
|
+// });
|
|
|
+// });
|