mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-17 02:55:11 +00:00
fix(console): remove navigation flakiness (#8439)
# Which Problems Are Solved The navigation in the console default settings is flaky. Sometimes it arbitrarily jumps to the organizations page. # How the Problems Are Solved The lifecycle hooks were extended to react differently to changes that come from 'outside' and from the component itself. # Additional Changes The e2e tests are supposed to run against Firefox and Chrome. However they are run twice against Electon. Fixing this revealed the console navigation flakiness that was less visible on Electron. The following issues are also fixed with this PR to reduce flakiness in e2e tests. - The custom command in the pipeline is removed from the e2e action step, so the browser argument is respected. - The npm packages of the e2e tests are updated to their latest version. - Notification tests run against a clean state now so they don't depend on each other anymore. This resolved some flakiness and improved debuggability of the tests. - E2E page load timeout is increased, reducing flakiness. - E2E tests wait on some elements to be enabled before they interact with them, reducing flakiness. # Additional Context - Closes #8404 - Follow-up: https://github.com/zitadel/zitadel/issues/8471 The e2e tests ran three times in a row successfully in the pipeline against both browsers. --------- Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Livio Spring <[email protected]> Co-authored-by: Tim Möhlmann <[email protected]>
This commit is contained in:
co-authored by
Max Peintner
Livio Spring
Tim Möhlmann
parent
b1f5b1979c
commit
fdf0434133
@@ -1,3 +1,10 @@
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { Context } from '../../../support/commands';
|
||||
import { ensureOrgExists } from '../../../support/api/orgs';
|
||||
import { activateSMTPProvider, ensureSMTPProviderExists } from '../../../support/api/smtp';
|
||||
import { ensureSMSProviderDoesntExist, ensureSMSProviderExists } from '../../../support/api/sms';
|
||||
|
||||
const notificationPath = `/instance?id=notifications`;
|
||||
const smtpPath = `/instance?id=smtpprovider`;
|
||||
const smsPath = `/instance?id=smsprovider`;
|
||||
@@ -6,6 +13,11 @@ beforeEach(() => {
|
||||
cy.context().as('ctx');
|
||||
});
|
||||
|
||||
type SMTPProvider = {
|
||||
description: string;
|
||||
rowSelector: string;
|
||||
};
|
||||
|
||||
describe('instance notifications', () => {
|
||||
describe('notification settings', () => {
|
||||
it(`should show notification settings`, () => {
|
||||
@@ -15,243 +27,195 @@ describe('instance notifications', () => {
|
||||
});
|
||||
|
||||
describe('smtp settings', () => {
|
||||
it(`should show SMTP provider settings`, () => {
|
||||
cy.visit(smtpPath);
|
||||
cy.contains('SMTP Provider');
|
||||
beforeEach(() => {
|
||||
const description = `mailgun-${uuidv4()}`;
|
||||
cy.wrap<SMTPProvider>({ description, rowSelector: `tr:contains('${description}')` }).as('provider');
|
||||
});
|
||||
|
||||
it(`should add Mailgun SMTP provider settings`, () => {
|
||||
let rowSelector = `a:contains('Mailgun')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).click();
|
||||
cy.get('[formcontrolname="hostAndPort"]').should('have.value', 'smtp.mailgun.org:587');
|
||||
cy.get('[formcontrolname="user"]').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="password"]').clear().type('password');
|
||||
cy.get('[data-e2e="continue-to-2nd-form"]').click();
|
||||
cy.get('[formcontrolname="senderAddress"]').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="senderName"]').clear().type('Test1');
|
||||
cy.get('[formcontrolname="replyToAddress"]').clear().type('[email protected]');
|
||||
cy.get('[data-e2e="continue-button"]').click();
|
||||
cy.get('[data-e2e="create-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="close-button"]').click();
|
||||
cy.get('tr').contains('mailgun');
|
||||
cy.get('tr').contains('smtp.mailgun.org:587');
|
||||
cy.get('tr').contains('[email protected]');
|
||||
});
|
||||
it(`should change Mailgun SMTP provider settings`, () => {
|
||||
let rowSelector = `tr:contains('mailgun')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).click();
|
||||
cy.get('[formcontrolname="hostAndPort"]').should('have.value', 'smtp.mailgun.org:587');
|
||||
cy.get('[formcontrolname="user"]').should('have.value', '[email protected]');
|
||||
cy.get('[formcontrolname="user"]').clear().type('[email protected]');
|
||||
cy.get('[data-e2e="continue-to-2nd-form"]').click();
|
||||
cy.get('[formcontrolname="senderAddress"]').should('have.value', '[email protected]');
|
||||
cy.get('[formcontrolname="senderName"]').should('have.value', 'Test1');
|
||||
cy.get('[formcontrolname="replyToAddress"]').should('have.value', '[email protected]');
|
||||
cy.get('[formcontrolname="senderAddress"]').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="senderName"]').clear().type('Change1');
|
||||
cy.get('[data-e2e="continue-button"]').click();
|
||||
cy.get('[data-e2e="create-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="close-button"]').click();
|
||||
rowSelector = `tr:contains('mailgun')`;
|
||||
cy.get(rowSelector).contains('mailgun');
|
||||
cy.get(rowSelector).contains('smtp.mailgun.org:587');
|
||||
cy.get(rowSelector).contains('[email protected]');
|
||||
});
|
||||
it(`should activate Mailgun SMTP provider settings`, () => {
|
||||
let rowSelector = `tr:contains('smtp.mailgun.org:587')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).find('[data-e2e="activate-provider-button"]').click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
rowSelector = `tr:contains('smtp.mailgun.org:587')`;
|
||||
cy.get(rowSelector).find('[data-e2e="active-provider"]');
|
||||
cy.get(rowSelector).contains('mailgun');
|
||||
cy.get(rowSelector).contains('smtp.mailgun.org:587');
|
||||
cy.get(rowSelector).contains('[email protected]');
|
||||
});
|
||||
it(`should add Mailjet SMTP provider settings`, () => {
|
||||
let rowSelector = `a:contains('Mailjet')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).click();
|
||||
cy.get('[formcontrolname="hostAndPort"]').should('have.value', 'in-v3.mailjet.com:587');
|
||||
cy.get('[formcontrolname="user"]').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="password"]').clear().type('password');
|
||||
cy.get('[data-e2e="continue-to-2nd-form"]').click();
|
||||
cy.get('[formcontrolname="senderAddress"]').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="senderName"]').clear().type('Test2');
|
||||
cy.get('[formcontrolname="replyToAddress"]').clear().type('[email protected]');
|
||||
cy.get('[data-e2e="continue-button"]').click();
|
||||
cy.get('[data-e2e="create-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="close-button"]').click();
|
||||
rowSelector = `tr:contains('mailjet')`;
|
||||
cy.get(rowSelector).contains('mailjet');
|
||||
cy.get(rowSelector).contains('in-v3.mailjet.com:587');
|
||||
cy.get(rowSelector).contains('[email protected]');
|
||||
});
|
||||
it(`should activate Mailjet SMTP provider settings an disable Mailgun`, () => {
|
||||
let rowSelector = `tr:contains('in-v3.mailjet.com:587')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).find('[data-e2e="activate-provider-button"]').click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get(rowSelector).find('[data-e2e="active-provider"]');
|
||||
cy.get(rowSelector).contains('mailjet');
|
||||
cy.get(rowSelector).contains('in-v3.mailjet.com:587');
|
||||
cy.get(rowSelector).contains('[email protected]');
|
||||
rowSelector = `tr:contains('mailgun')`;
|
||||
cy.get(rowSelector).find('[data-e2e="active-provider"]').should('not.exist');
|
||||
});
|
||||
it(`should deactivate Mailjet SMTP provider`, () => {
|
||||
let rowSelector = `tr:contains('mailjet')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).find('[data-e2e="deactivate-provider-button"]').click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
rowSelector = `tr:contains('mailjet')`;
|
||||
cy.get(rowSelector).find('[data-e2e="active-provider"]').should('not.exist');
|
||||
rowSelector = `tr:contains('mailgun')`;
|
||||
cy.get(rowSelector).find('[data-e2e="active-provider"]').should('not.exist');
|
||||
});
|
||||
it(`should delete Mailjet SMTP provider`, () => {
|
||||
let rowSelector = `tr:contains('mailjet')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).find('[data-e2e="delete-provider-button"]').click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').focus().type('Test2');
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
rowSelector = `tr:contains('mailjet')`;
|
||||
cy.get(rowSelector).should('not.exist');
|
||||
});
|
||||
it(`should delete Mailgun SMTP provider`, () => {
|
||||
let rowSelector = `tr:contains('mailgun')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).find('[data-e2e="delete-provider-button"]').click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').focus().type('Change1');
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
rowSelector = `tr:contains('mailgun')`;
|
||||
cy.get(rowSelector).should('not.exist');
|
||||
cy.get<SMTPProvider>('@provider').then((provider) => {
|
||||
cy.visit(smtpPath);
|
||||
cy.get(`a:contains('Mailgun')`).click();
|
||||
cy.get('[formcontrolname="description"]').should('be.enabled').clear().type(provider.description);
|
||||
cy.get('[formcontrolname="hostAndPort"]').should('have.value', 'smtp.mailgun.org:587');
|
||||
cy.get('[formcontrolname="user"]').should('be.enabled').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="password"]').should('be.enabled').clear().type('password');
|
||||
cy.get('[data-e2e="continue-to-2nd-form"]').should('be.enabled').click();
|
||||
cy.get('[formcontrolname="senderAddress"]').should('be.enabled').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="senderName"]').should('be.enabled').clear().type('Test1');
|
||||
cy.get('[formcontrolname="replyToAddress"]').should('be.enabled').clear().type('[email protected]');
|
||||
cy.get('[data-e2e="continue-button"]').should('be.enabled').click();
|
||||
cy.get('[data-e2e="create-button"]').should('be.enabled').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="close-button"]').should('be.enabled').click();
|
||||
cy.get(provider.rowSelector).contains('smtp.mailgun.org:587');
|
||||
cy.get(provider.rowSelector).contains('[email protected]');
|
||||
});
|
||||
});
|
||||
|
||||
it(`should add Mailgun SMTP provider settings and activate it using wizard`, () => {
|
||||
let rowSelector = `a:contains('Mailgun')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).click();
|
||||
cy.get('[formcontrolname="hostAndPort"]').should('have.value', 'smtp.mailgun.org:587');
|
||||
cy.get('[formcontrolname="user"]').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="password"]').clear().type('password');
|
||||
cy.get('[data-e2e="continue-to-2nd-form"]').click();
|
||||
cy.get('[formcontrolname="senderAddress"]').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="senderName"]').clear().type('Test1');
|
||||
cy.get('[formcontrolname="replyToAddress"]').clear().type('[email protected]');
|
||||
cy.get('[data-e2e="continue-button"]').click();
|
||||
cy.get('[data-e2e="create-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="activate-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="close-button"]').click();
|
||||
rowSelector = `tr:contains('smtp.mailgun.org:587')`;
|
||||
cy.get(rowSelector).find('[data-e2e="active-provider"]');
|
||||
cy.get(rowSelector).contains('mailgun');
|
||||
cy.get(rowSelector).contains('smtp.mailgun.org:587');
|
||||
cy.get(rowSelector).contains('[email protected]');
|
||||
cy.get<SMTPProvider>('@provider').then((provider) => {
|
||||
cy.visit(smtpPath);
|
||||
cy.get(`a:contains('Mailgun')`).click();
|
||||
cy.get('[formcontrolname="description"]').should('be.enabled').clear().type(provider.description);
|
||||
cy.get('[formcontrolname="hostAndPort"]').should('have.value', 'smtp.mailgun.org:587');
|
||||
cy.get('[formcontrolname="user"]').should('be.enabled').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="password"]').should('be.enabled').clear().type('password');
|
||||
cy.get('[data-e2e="continue-to-2nd-form"]').should('be.enabled').click();
|
||||
cy.get('[formcontrolname="senderAddress"]').should('be.enabled').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="senderName"]').should('be.enabled').clear().type('Test1');
|
||||
cy.get('[formcontrolname="replyToAddress"]').should('be.enabled').clear().type('[email protected]');
|
||||
cy.get('[data-e2e="continue-button"]').should('be.enabled').click();
|
||||
cy.get('[data-e2e="create-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="activate-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="close-button"]').click();
|
||||
cy.get(provider.rowSelector).find('[data-e2e="active-provider"]');
|
||||
cy.get(provider.rowSelector).contains('smtp.mailgun.org:587');
|
||||
cy.get(provider.rowSelector).contains('s[email protected]');
|
||||
});
|
||||
});
|
||||
it(`should add Mailgun SMTP provider settings and deactivate it using wizard`, () => {
|
||||
let rowSelector = `tr:contains('mailgun')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).click();
|
||||
cy.get('[data-e2e="continue-to-2nd-form"]').click();
|
||||
cy.get('[data-e2e="continue-button"]').click();
|
||||
cy.get('[data-e2e="create-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="deactivate-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="close-button"]').click();
|
||||
rowSelector = `tr:contains('mailgun')`;
|
||||
cy.get(rowSelector).find('[data-e2e="active-provider"]').should('not.exist');
|
||||
|
||||
describe('with inactive existing', () => {
|
||||
beforeEach(() => {
|
||||
cy.get<Context>('@ctx').then((ctx) => {
|
||||
cy.get<SMTPProvider>('@provider').then(({ description }) => {
|
||||
ensureSMTPProviderExists(ctx.api, description);
|
||||
});
|
||||
});
|
||||
cy.visit(smtpPath);
|
||||
});
|
||||
|
||||
it(`should change Mailgun SMTP provider settings`, () => {
|
||||
cy.get<SMTPProvider>('@provider').then(({ rowSelector }) => {
|
||||
cy.get(rowSelector).click();
|
||||
cy.get('[data-e2e="continue-to-2nd-form"]').click();
|
||||
cy.get('[formcontrolname="senderAddress"]').should('be.enabled').clear().type('[email protected]');
|
||||
cy.get('[formcontrolname="senderName"]').clear().type('Change1');
|
||||
cy.get('[data-e2e="continue-button"]').click();
|
||||
cy.get('[data-e2e="create-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="close-button"]').click();
|
||||
cy.get(rowSelector).contains('[email protected]');
|
||||
});
|
||||
});
|
||||
it(`should activate Mailgun SMTP provider settings`, () => {
|
||||
cy.get<SMTPProvider>('@provider').then(({ rowSelector }) => {
|
||||
cy.get(rowSelector).find('[data-e2e="activate-provider-button"]').click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get(rowSelector).find('[data-e2e="active-provider"]');
|
||||
});
|
||||
});
|
||||
|
||||
it(`should delete Mailgun SMTP provider`, () => {
|
||||
cy.get<SMTPProvider>('@provider').then(({ rowSelector }) => {
|
||||
cy.get(rowSelector).find('[data-e2e="delete-provider-button"]').click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').focus().should('be.enabled').type('A Sender');
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get(rowSelector).should('not.exist');
|
||||
});
|
||||
});
|
||||
});
|
||||
it(`should delete Mailgun SMTP provider`, () => {
|
||||
let rowSelector = `tr:contains('mailgun')`;
|
||||
cy.visit(smtpPath);
|
||||
cy.get(rowSelector).find('[data-e2e="delete-provider-button"]').click({ force: true });
|
||||
cy.get('[data-e2e="confirm-dialog-input"]').focus().type('Test1');
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
rowSelector = `tr:contains('mailgun')`;
|
||||
cy.get(rowSelector).should('not.exist');
|
||||
describe('with active existing', () => {
|
||||
beforeEach(() => {
|
||||
cy.get<Context>('@ctx').then((ctx) => {
|
||||
cy.get<SMTPProvider>('@provider').then(({ description }) => {
|
||||
ensureSMTPProviderExists(ctx.api, description).then((providerId) => {
|
||||
activateSMTPProvider(ctx.api, providerId);
|
||||
});
|
||||
});
|
||||
});
|
||||
cy.pause();
|
||||
cy.visit(smtpPath);
|
||||
});
|
||||
|
||||
it(`should deactivate an existing Mailgun SMTP provider using wizard`, () => {
|
||||
cy.get<SMTPProvider>('@provider').then(({ rowSelector }) => {
|
||||
cy.get(rowSelector).click();
|
||||
cy.get('[data-e2e="continue-to-2nd-form"]').click();
|
||||
cy.get('[data-e2e="continue-button"]').click();
|
||||
cy.get('[data-e2e="create-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="deactivate-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="close-button"]').click();
|
||||
cy.get(rowSelector).find('[data-e2e="active-provider"]').should('not.exist');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('sms settings', () => {
|
||||
it(`should show SMS provider settings`, () => {
|
||||
cy.visit(smsPath);
|
||||
cy.contains('SMS Settings');
|
||||
beforeEach(() => {
|
||||
cy.wrap<string>(`twilio-${uuidv4()}`).as('uniqueSid');
|
||||
});
|
||||
|
||||
it(`should add SMS provider`, () => {
|
||||
cy.visit(smsPath);
|
||||
cy.get('[data-e2e="new-twilio-button"]').click();
|
||||
cy.get('[formcontrolname="sid"]').clear().type('test');
|
||||
cy.get('[formcontrolname="token"]').clear().type('token');
|
||||
cy.get('[formcontrolname="senderNumber"]').clear().type('2312123132');
|
||||
cy.get('[data-e2e="save-sms-settings-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('.state').contains('Inactive');
|
||||
describe('without existing', () => {
|
||||
beforeEach(() => {
|
||||
cy.get<Context>('@ctx').then((ctx) => {
|
||||
ensureSMSProviderDoesntExist(ctx.api);
|
||||
});
|
||||
});
|
||||
|
||||
it(`should add SMS provider`, () => {
|
||||
cy.visit(smsPath);
|
||||
cy.get('[data-e2e="new-twilio-button"]').click();
|
||||
cy.get('[formcontrolname="sid"]').should('be.enabled').clear().type('test');
|
||||
cy.get('[formcontrolname="token"]').should('be.enabled').clear().type('token');
|
||||
cy.get('[formcontrolname="senderNumber"]').should('be.enabled').clear().type('2312123132');
|
||||
cy.get('[data-e2e="save-sms-settings-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('.state').contains('Inactive');
|
||||
});
|
||||
});
|
||||
|
||||
it(`should activate SMS provider`, () => {
|
||||
cy.visit(smsPath);
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('.state').contains('Inactive');
|
||||
cy.get('[data-e2e="activate-sms-provider-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('.state').contains('Active');
|
||||
});
|
||||
describe('with inactive existing', () => {
|
||||
beforeEach(() => {
|
||||
cy.get<Context>('@ctx').then((ctx) => {
|
||||
ensureSMSProviderExists(ctx.api);
|
||||
cy.visit(smsPath);
|
||||
});
|
||||
});
|
||||
|
||||
it(`should edit SMS provider`, () => {
|
||||
cy.visit(smsPath);
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('.state').contains('Active');
|
||||
cy.get('[data-e2e="new-twilio-button"]').click();
|
||||
cy.get('[formcontrolname="sid"]').should('have.value', 'test');
|
||||
cy.get('[formcontrolname="senderNumber"]').should('have.value', '2312123132');
|
||||
cy.get('[formcontrolname="sid"]').clear().type('test2');
|
||||
cy.get('[formcontrolname="senderNumber"]').clear().type('6666666666');
|
||||
cy.get('[data-e2e="save-sms-settings-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
});
|
||||
it(`should activate SMS provider`, () => {
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('.state').contains('Inactive');
|
||||
cy.get('[data-e2e="activate-sms-provider-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('.state').contains('Active');
|
||||
});
|
||||
|
||||
it(`should contain edited values`, () => {
|
||||
cy.visit(smsPath);
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('.state').contains('Active');
|
||||
cy.get('[data-e2e="new-twilio-button"]').click();
|
||||
cy.get('[formcontrolname="sid"]').should('have.value', 'test2');
|
||||
cy.get('[formcontrolname="senderNumber"]').should('have.value', '6666666666');
|
||||
});
|
||||
it(`should edit SMS provider`, () => {
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('[data-e2e="new-twilio-button"]').click();
|
||||
cy.get('[formcontrolname="sid"]').should('be.enabled').clear().type('test2');
|
||||
cy.get('[formcontrolname="senderNumber"]').should('be.enabled').clear().type('6666666666');
|
||||
cy.get('[data-e2e="save-sms-settings-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
cy.get('[data-e2e="new-twilio-button"]').click();
|
||||
cy.get('[formcontrolname="sid"]').should('have.value', 'test2');
|
||||
cy.get('[formcontrolname="senderNumber"]').should('have.value', '6666666666');
|
||||
});
|
||||
|
||||
it(`should edit SMS provider token`, () => {
|
||||
cy.visit(smsPath);
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('.state').contains('Active');
|
||||
cy.get('[data-e2e="new-twilio-button"]').click();
|
||||
cy.get('[data-e2e="edit-sms-token-button"]').click();
|
||||
cy.get('[data-e2e="notification-setting-password"]').clear().type('newsupertoken');
|
||||
cy.get('[data-e2e="save-notification-setting-password-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
});
|
||||
it(`should edit SMS provider token`, () => {
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('[data-e2e="new-twilio-button"]').click();
|
||||
cy.get('[data-e2e="edit-sms-token-button"]').click();
|
||||
cy.get('[data-e2e="notification-setting-password"]').should('be.enabled').clear().type('newsupertoken');
|
||||
cy.get('[data-e2e="save-notification-setting-password-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
});
|
||||
|
||||
it(`should remove SMS provider`, () => {
|
||||
cy.visit(smsPath);
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('.state').contains('Active');
|
||||
cy.get('[data-e2e="remove-sms-provider-button"]').click();
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
it(`should remove SMS provider`, () => {
|
||||
cy.get('h4').contains('Twilio');
|
||||
cy.get('[data-e2e="remove-sms-provider-button"]').click();
|
||||
cy.get('[data-e2e="confirm-dialog-button"]').click();
|
||||
cy.shouldConfirmSuccess();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -101,7 +101,7 @@ describe('instance secret generators', () => {
|
||||
it(`Initialization Mail should update settings`, () => {
|
||||
cy.visit(secretGeneratorSettingsPath);
|
||||
cy.wait(1000);
|
||||
cy.get('input[id="length1"]').clear().type('64');
|
||||
cy.get('input[id="length1"]').should('be.enabled').clear().type('64');
|
||||
cy.get('mat-slide-toggle#includeLowerLetters1 button').click();
|
||||
cy.get('button[id="saveSecretGenerator1"]').click();
|
||||
cy.wait(1000);
|
||||
@@ -116,7 +116,7 @@ describe('instance secret generators', () => {
|
||||
it(`Email verification should update settings`, () => {
|
||||
cy.visit(secretGeneratorSettingsPath);
|
||||
cy.wait(1000);
|
||||
cy.get('input[id="length2"]').clear().type('64');
|
||||
cy.get('input[id="length2"]').should('be.enabled').clear().type('64');
|
||||
cy.get('mat-slide-toggle#includeUpperLetters2 button').click();
|
||||
cy.get('button[id="saveSecretGenerator2"]').click();
|
||||
cy.wait(1000);
|
||||
@@ -131,7 +131,7 @@ describe('instance secret generators', () => {
|
||||
it(`Phone verification should update settings`, () => {
|
||||
cy.visit(secretGeneratorSettingsPath);
|
||||
cy.wait(1000);
|
||||
cy.get('input[id="expiry3"]').clear().type('10');
|
||||
cy.get('input[id="expiry3"]').should('be.enabled').clear().type('10');
|
||||
cy.get('mat-slide-toggle#includeSymbols3 button').click();
|
||||
cy.get('button[id="saveSecretGenerator3"]').click();
|
||||
cy.wait(1000);
|
||||
@@ -146,7 +146,7 @@ describe('instance secret generators', () => {
|
||||
it(`Password Reset should update settings`, () => {
|
||||
cy.visit(secretGeneratorSettingsPath);
|
||||
cy.wait(1000);
|
||||
cy.get('input[id="expiry4"]').clear().type('5');
|
||||
cy.get('input[id="expiry4"]').should('be.enabled').clear().type('5');
|
||||
cy.get('mat-slide-toggle#includeDigits4 button').click();
|
||||
cy.get('button[id="saveSecretGenerator4"]').click();
|
||||
cy.wait(1000);
|
||||
@@ -161,7 +161,7 @@ describe('instance secret generators', () => {
|
||||
it(`Passwordless Initialization should update settings`, () => {
|
||||
cy.visit(secretGeneratorSettingsPath);
|
||||
cy.wait(1000);
|
||||
cy.get('input[id="length5"]').clear().type('64');
|
||||
cy.get('input[id="length5"]').should('be.enabled').clear().type('64');
|
||||
cy.get('mat-slide-toggle#includeDigits5 button').click();
|
||||
cy.get('button[id="saveSecretGenerator5"]').click();
|
||||
cy.wait(1000);
|
||||
@@ -176,8 +176,8 @@ describe('instance secret generators', () => {
|
||||
it(`App Secret should update settings`, () => {
|
||||
cy.visit(secretGeneratorSettingsPath);
|
||||
cy.wait(1000);
|
||||
cy.get('input[id="length6"]').clear().type('32');
|
||||
cy.get('input[id="expiry6"]').clear().type('120');
|
||||
cy.get('input[id="length6"]').should('be.enabled').clear().type('32');
|
||||
cy.get('input[id="expiry6"]').should('be.enabled').clear().type('120');
|
||||
cy.get('mat-slide-toggle#includeUpperLetters6 button').click();
|
||||
cy.get('button[id="saveSecretGenerator6"]').click();
|
||||
cy.wait(1000);
|
||||
@@ -192,7 +192,7 @@ describe('instance secret generators', () => {
|
||||
it(`One Time Password (OTP) - SMS should update settings`, () => {
|
||||
cy.visit(secretGeneratorSettingsPath);
|
||||
cy.wait(1000);
|
||||
cy.get('input[id="expiry7"]').clear().type('120');
|
||||
cy.get('input[id="expiry7"]').should('be.enabled').clear().type('120');
|
||||
cy.get('mat-slide-toggle#includeLowerLetters7 button').click();
|
||||
cy.get('button[id="saveSecretGenerator7"]').click();
|
||||
cy.wait(1000);
|
||||
@@ -207,8 +207,8 @@ describe('instance secret generators', () => {
|
||||
it(`One Time Password (OTP) should update settings`, () => {
|
||||
cy.visit(secretGeneratorSettingsPath);
|
||||
cy.wait(1000);
|
||||
cy.get('input[id="length8"]').clear().type('12');
|
||||
cy.get('input[id="expiry8"]').clear().type('90');
|
||||
cy.get('input[id="length8"]').should('be.enabled').clear().type('12');
|
||||
cy.get('input[id="expiry8"]').should('be.enabled').clear().type('90');
|
||||
cy.get('mat-slide-toggle#includeDigits8 button').click();
|
||||
cy.get('mat-slide-toggle#includeSymbols8 button').click();
|
||||
cy.get('button[id="saveSecretGenerator8"]').click();
|
||||
|
||||
Reference in New Issue
Block a user