|
@@ -1,3 +1,22 @@
|
|
|
|
|
+const openPageAccessoriesModal = () => {
|
|
|
|
|
+ cy.visit('/');
|
|
|
|
|
+ cy.collapseSidebar(true);
|
|
|
|
|
+ cy.waitUntilSkeletonDisappear();
|
|
|
|
|
+
|
|
|
|
|
+ // open PageAccessoriesModal
|
|
|
|
|
+ cy.getByTestid('pageListButton').should('be.visible').click();
|
|
|
|
|
+ cy.getByTestid('descendants-page-list-modal').then($elem => $elem.is(':visible'));
|
|
|
|
|
+
|
|
|
|
|
+ // cy.waitUntil(() => {
|
|
|
|
|
+ // // do
|
|
|
|
|
+ // cy.getByTestid('pageListButton').click();
|
|
|
|
|
+ // // wait until
|
|
|
|
|
+ // return cy.getByTestid('descendants-page-list-modal').then($elem => $elem.is(':visible'));
|
|
|
|
|
+ // });
|
|
|
|
|
+
|
|
|
|
|
+ cy.waitUntilSpinnerDisappear();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
context('Access to pagelist', () => {
|
|
context('Access to pagelist', () => {
|
|
|
const ssPrefix = 'access-to-pagelist-';
|
|
const ssPrefix = 'access-to-pagelist-';
|
|
|
beforeEach(() => {
|
|
beforeEach(() => {
|
|
@@ -5,19 +24,8 @@ context('Access to pagelist', () => {
|
|
|
cy.fixture("user-admin.json").then(user => {
|
|
cy.fixture("user-admin.json").then(user => {
|
|
|
cy.login(user.username, user.password);
|
|
cy.login(user.username, user.password);
|
|
|
});
|
|
});
|
|
|
- cy.visit('/');
|
|
|
|
|
- cy.collapseSidebar(true);
|
|
|
|
|
- cy.waitUntilSkeletonDisappear();
|
|
|
|
|
-
|
|
|
|
|
- // open PageAccessoriesModal
|
|
|
|
|
- cy.waitUntil(() => {
|
|
|
|
|
- // do
|
|
|
|
|
- cy.getByTestid('pageListButton').click({force: true});
|
|
|
|
|
- // wait until
|
|
|
|
|
- return cy.getByTestid('descendants-page-list-modal').then($elem => $elem.is(':visible'));
|
|
|
|
|
- });
|
|
|
|
|
|
|
|
|
|
- cy.waitUntilSpinnerDisappear();
|
|
|
|
|
|
|
+ openPageAccessoriesModal();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('Page list modal is successfully opened ', () => {
|
|
it('Page list modal is successfully opened ', () => {
|
|
@@ -53,13 +61,14 @@ context('Access to pagelist', () => {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('Successfully expand and close modal', () => {
|
|
it('Successfully expand and close modal', () => {
|
|
|
- cy.get('button.close').eq(0).click();
|
|
|
|
|
|
|
+ cy.get('.btn-close').eq(0).click();
|
|
|
|
|
|
|
|
cy.waitUntilSkeletonDisappear();
|
|
cy.waitUntilSkeletonDisappear();
|
|
|
cy.waitUntilSpinnerDisappear();
|
|
cy.waitUntilSpinnerDisappear();
|
|
|
cy.screenshot(`${ssPrefix}7-page-list-modal-size-fullscreen`);
|
|
cy.screenshot(`${ssPrefix}7-page-list-modal-size-fullscreen`);
|
|
|
|
|
|
|
|
- cy.get('button.close').eq(1).click();
|
|
|
|
|
|
|
+ // Check that the modal has been closed
|
|
|
|
|
+ cy.getByTestid('descendants-page-list-modal').should('not.be.visible')
|
|
|
cy.screenshot(`${ssPrefix}8-close-page-list-modal`);
|
|
cy.screenshot(`${ssPrefix}8-close-page-list-modal`);
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
@@ -71,12 +80,11 @@ context('Access to timeline', () => {
|
|
|
cy.fixture("user-admin.json").then(user => {
|
|
cy.fixture("user-admin.json").then(user => {
|
|
|
cy.login(user.username, user.password);
|
|
cy.login(user.username, user.password);
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ openPageAccessoriesModal();
|
|
|
});
|
|
});
|
|
|
- it('Timeline list successfully openend', () => {
|
|
|
|
|
- cy.visit('/');
|
|
|
|
|
- cy.collapseSidebar(true);
|
|
|
|
|
|
|
|
|
|
- cy.getByTestid('pageListButton').click({force: true});
|
|
|
|
|
|
|
+ it('Timeline list successfully openend', () => {
|
|
|
cy.getByTestid('descendants-page-list-modal').parent().should('have.class','show').within(() => {
|
|
cy.getByTestid('descendants-page-list-modal').parent().should('have.class','show').within(() => {
|
|
|
cy.get('.nav-title > li').eq(1).find('a').click();
|
|
cy.get('.nav-title > li').eq(1).find('a').click();
|
|
|
});
|
|
});
|