|
@@ -6,6 +6,8 @@ context('Access Home', () => {
|
|
|
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);
|
|
|
});
|
|
});
|
|
|
|
|
+ // collapse sidebar
|
|
|
|
|
+ cy.collapseSidebar(true);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('Visit home', () => {
|
|
it('Visit home', () => {
|
|
@@ -29,6 +31,8 @@ context('Access User settings', () => {
|
|
|
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);
|
|
|
});
|
|
});
|
|
|
|
|
+ // collapse sidebar
|
|
|
|
|
+ cy.collapseSidebar(true);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('Update settings', () => {
|
|
it('Update settings', () => {
|
|
@@ -41,9 +45,11 @@ context('Access User settings', () => {
|
|
|
cy.getByTestid('grw-user-settings').should('be.visible');
|
|
cy.getByTestid('grw-user-settings').should('be.visible');
|
|
|
cy.screenshot(`${ssPrefix}-user-information-1`);
|
|
cy.screenshot(`${ssPrefix}-user-information-1`);
|
|
|
cy.getByTestid('grw-besic-info-settings-update-button').click();
|
|
cy.getByTestid('grw-besic-info-settings-update-button').click();
|
|
|
- cy.get('.toast').should('be.visible');
|
|
|
|
|
|
|
+ cy.get('.toast').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
cy.screenshot(`${ssPrefix}-user-information-2`);
|
|
cy.screenshot(`${ssPrefix}-user-information-2`);
|
|
|
|
|
+
|
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
|
|
|
+ cy.get('.toast').should('not.exist');
|
|
|
|
|
|
|
|
// Access External account
|
|
// Access External account
|
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(1) a').click();
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(1) a').click();
|
|
@@ -55,18 +61,22 @@ context('Access User settings', () => {
|
|
|
cy.getByTestid('grw-associate-modal').find('.modal-footer button').click(); // click add button in modal form
|
|
cy.getByTestid('grw-associate-modal').find('.modal-footer button').click(); // click add button in modal form
|
|
|
cy.screenshot(`${ssPrefix}-external-account-3`);
|
|
cy.screenshot(`${ssPrefix}-external-account-3`);
|
|
|
cy.getByTestid('grw-associate-modal').find('.close').click();
|
|
cy.getByTestid('grw-associate-modal').find('.close').click();
|
|
|
- cy.get('.toast').should('be.visible');
|
|
|
|
|
|
|
+ cy.get('.toast').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
cy.screenshot(`${ssPrefix}-external-account-4`);
|
|
cy.screenshot(`${ssPrefix}-external-account-4`);
|
|
|
|
|
+
|
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
|
|
|
+ cy.get('.toast').should('not.exist');
|
|
|
|
|
|
|
|
// Access Password setting
|
|
// Access Password setting
|
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(2) a').click();
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(2) a').click();
|
|
|
cy.scrollTo('top');
|
|
cy.scrollTo('top');
|
|
|
cy.screenshot(`${ssPrefix}-password-settings-1`);
|
|
cy.screenshot(`${ssPrefix}-password-settings-1`);
|
|
|
cy.getByTestid('grw-password-settings-update-button').click();
|
|
cy.getByTestid('grw-password-settings-update-button').click();
|
|
|
- cy.get('.toast').should('be.visible');
|
|
|
|
|
|
|
+ cy.get('.toast').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
cy.screenshot(`${ssPrefix}-password-settings-2`);
|
|
cy.screenshot(`${ssPrefix}-password-settings-2`);
|
|
|
|
|
+
|
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
|
|
|
+ cy.get('.toast').should('not.exist');
|
|
|
|
|
|
|
|
// Access API setting
|
|
// Access API setting
|
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(3) a').click();
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(3) a').click();
|
|
@@ -74,9 +84,11 @@ context('Access User settings', () => {
|
|
|
cy.screenshot(`${ssPrefix}-api-setting-1`);
|
|
cy.screenshot(`${ssPrefix}-api-setting-1`);
|
|
|
cy.getByTestid('grw-api-settings-update-button').click();
|
|
cy.getByTestid('grw-api-settings-update-button').click();
|
|
|
cy.getByTestid('grw-api-settings-input').should('be.visible');
|
|
cy.getByTestid('grw-api-settings-input').should('be.visible');
|
|
|
- cy.get('.toast').should('be.visible');
|
|
|
|
|
|
|
+ cy.get('.toast').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
cy.screenshot(`${ssPrefix}-api-setting-2`);
|
|
cy.screenshot(`${ssPrefix}-api-setting-2`);
|
|
|
|
|
+
|
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
|
|
|
+ cy.get('.toast').should('not.exist');
|
|
|
|
|
|
|
|
// Access Editor setting
|
|
// Access Editor setting
|
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(4) a').click();
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(4) a').click();
|
|
@@ -84,18 +96,19 @@ context('Access User settings', () => {
|
|
|
cy.getByTestid('grw-editor-settings').should('be.visible');
|
|
cy.getByTestid('grw-editor-settings').should('be.visible');
|
|
|
cy.screenshot(`${ssPrefix}-editor-setting-1`);
|
|
cy.screenshot(`${ssPrefix}-editor-setting-1`);
|
|
|
cy.getByTestid('grw-editor-settings-update-button').click();
|
|
cy.getByTestid('grw-editor-settings-update-button').click();
|
|
|
- cy.get('.toast').should('be.visible');
|
|
|
|
|
|
|
+ cy.get('.toast').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
cy.screenshot(`${ssPrefix}-editor-setting-2`);
|
|
cy.screenshot(`${ssPrefix}-editor-setting-2`);
|
|
|
|
|
+
|
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
|
|
|
+ cy.get('.toast').should('not.exist');
|
|
|
|
|
|
|
|
// Access In-app notification setting
|
|
// Access In-app notification setting
|
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(5) a').click();
|
|
cy.getByTestid('grw-personal-settings').find('.nav-title.nav li:eq(5) a').click();
|
|
|
cy.scrollTo('top');
|
|
cy.scrollTo('top');
|
|
|
cy.screenshot(`${ssPrefix}-in-app-notification-setting-1`);
|
|
cy.screenshot(`${ssPrefix}-in-app-notification-setting-1`);
|
|
|
cy.getByTestid('grw-in-app-notification-settings-update-button').click();
|
|
cy.getByTestid('grw-in-app-notification-settings-update-button').click();
|
|
|
- cy.get('.toast').should('be.visible');
|
|
|
|
|
|
|
+ cy.get('.toast').should('be.visible').invoke('attr', 'style', 'opacity: 1');
|
|
|
cy.screenshot(`${ssPrefix}-in-app-notification-setting-2`);
|
|
cy.screenshot(`${ssPrefix}-in-app-notification-setting-2`);
|
|
|
- cy.get('.toast-close-button').click({ multiple: true }); // close toast alert
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
});
|
|
});
|