Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/e2e/cypress/integration/common/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ And('I type a valid password {string}', (password: string) => {
cy.findByLabelText(/password/i).type(Cypress.env(password));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
When('I click the {string} button', (name: string) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step definition can be used by any test, so I just updated this one to be case insensitive so all tests can use this.

cy.findByRole('button', { name: new RegExp(name, 'i') }).click();
});

Then('I see {string}', (message: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Feature: Reset Password

@next @react
Scenario: Reset Password with valid username
When I click on the "Reset password" button
When I click the "Reset password" button
And I type a valid username "VALID_USERNAME"
And I click the "Send code" button
Then I will be redirected to the confirm forgot password page

@next @react
Scenario: Reset Password with invalid username
When I click on the "Reset password" button
When I click the "Reset password" button
And I type an invalid username "INVALID_USERNAME"
And I click the "Send code" button
Then I see "Username/client id combination not found."
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { And, Given, Then, When } from 'cypress-cucumber-preprocessor/steps';
import { And, Given, Then } from 'cypress-cucumber-preprocessor/steps';

Given("I'm running the example {string}", (url: string) => {
cy.visit(url);
});

When('I click on the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

And('I type a valid username {string}', (username: string) => {
cy.findByRole('textbox', { name: /username/i }).type(Cypress.env(username));
});
Expand All @@ -16,10 +12,6 @@ And('I type an invalid username {string}', (username: string) => {
cy.findByRole('textbox', { name: /username/i }).type(Cypress.env(username));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I will be redirected to the confirm forgot password page', () => {
cy.findByRole('textbox', { label: 'New password' }).should('exist');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ And('I type in the password {string}', (password: string) => {
cy.findByLabelText(/password/i).type(Cypress.env(password));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I should see the Force Change Password screen', () => {
cy.findByRole('document').contains(new RegExp('Change Password', 'i'));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ And('I type a valid password {string}', (password: string) => {
cy.get('[data-amplify-password]').type(Cypress.env(password));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I will be redirected to the confirm sms mfa page', () => {
cy.get('[data-amplify-authenticator-confirmsignin]').should('be.visible');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ And('I type a valid password {string}', (password: string) => {
cy.get('[data-amplify-password]').type(Cypress.env(password));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I will be redirected to the confirm totp mfa page', () => {
cy.get('body').contains('TOTP');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ And('I type the valid password {string}', (password: string) => {
cy.findByLabelText(/password/i).type(Cypress.env(password));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I see {string}', (message: string) => {
cy.findByRole('document').contains(new RegExp(message, 'i'));
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ And('I type the valid password {string}', (password: string) => {
cy.findByLabelText(/password/i).type(Cypress.env(password));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I see {string}', (message: string) => {
cy.findByRole('document').contains(new RegExp(message, 'i'));
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ And('I type the valid password {string}', (password: string) => {
cy.findByLabelText(/password/i).type(Cypress.env(password));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I see {string}', (message: string) => {
cy.findByRole('document').contains(new RegExp(message, 'i'));
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: Sign Up with Email
And I don't see "Username" as an input field
And I don't see "Phone Number" as an input field

@next @react @vue @angular
@next @react @vue @angular @skip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is leading us to Exceeded daily email limit for the operation or the account. If a higher limit is required, please configure your user pool to use your own Amazon SES configuration for sending email.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to contact the SES team to escalate this so we can get our account out of the SES sandbox. I agree with skipping for now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eddiekeller Didn't you experience this as well & request an increase?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericclemmons The workaround is to switch to using our own email in Amazon SES rather than relying on Cognito to send out emails for us. Not sure if that is what we want to use long term or not.

Scenario: Sign up with valid email & password
When I type the email "VALID_EMAIL"
And I type the password "VALID_PASSWORD"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ And('I confirm the password {string}', (password: string) => {
cy.findByLabelText(/confirm password/i).type(Cypress.env(password));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I see {string}', (message: string) => {
cy.findByRole('document').contains(message);
});
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ And('I confirm the password {string}', (password: string) => {
cy.findByLabelText(/confirm password/i).type(Cypress.env(password));
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I see {string}', (message: string) => {
cy.findByRole('document').contains(message);
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ const now = Date.now();
const randomNumber = window.crypto.getRandomValues(new Uint32Array(1))[0];
const password = `test-${randomNumber}`;

Given("I'm running the example {string}", url => {
Given("I'm running the example {string}", (url) => {
cy.visit(url);
});

And('I click {string}', text => {
And('I click {string}', (text) => {
cy.findByText(text).click();
});

Expand All @@ -24,18 +24,14 @@ And('I type a new confirm password', () => {
cy.findByLabelText(/^confirm password$/i).type(`${password}`);
});

And('I type the email {string}', email => {
And('I type the email {string}', (email) => {
cy.findByLabelText('Email').type(email);
});

And('I type the phone number {string}', phone => {
And('I type the phone number {string}', (phone) => {
cy.findByLabelText('Phone Number').type(phone);
});

And('I click the {string} button', (name: string) => {
cy.findByRole('button', { name }).click();
});

Then('I see {string}', (message: string) => {
cy.get('body').contains(message);
});