Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress Setup for E2E testing #115

Merged
merged 14 commits into from May 30, 2022
Merged

Conversation

faisal-alvi
Copy link
Member

@faisal-alvi faisal-alvi commented Apr 25, 2022

Description of the Change

Closes #111.

Alternate Designs

n/a

Possible Drawbacks

n/a

Verification Process

Make sure all tests added are running without fail.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Added - Cypress tests for E2E testing.

Credits

Props @faisal-alvi @vikrampm1

@faisal-alvi faisal-alvi added this to the 2.4.0 milestone Apr 25, 2022
@faisal-alvi faisal-alvi self-assigned this Apr 25, 2022
@faisal-alvi faisal-alvi modified the milestones: 2.4.0, 2.5.0 May 10, 2022
@faisal-alvi faisal-alvi requested review from a team and Sidsector9 and removed request for a team May 18, 2022 11:48
@faisal-alvi faisal-alvi marked this pull request as ready for review May 18, 2022 11:48
@@ -0,0 +1,14 @@
describe('Check if avatar migration works', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Although the title implies we are testing if migration works, the test itself doesn't perform any migration.
I think we can change it to:

describe( 'Avatar migration', () => {} )

As the context for this test is migration of avatars.

And the test title can be set to:

it( 'Test no migration from WP User Avatar' );

cy.login();
});

it('Can admin upload, crop and select local avatar?', () => {
Copy link
Member

Choose a reason for hiding this comment

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

As we're not testing cropping in this test, it can be removed from the title.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, we are, the cropping action runs so fast that we don't see it:

sla-pr-115

Please let me know if this is not what you expected.

Copy link
Member

Choose a reason for hiding this comment

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

brilliant! 👍

@faisal-alvi faisal-alvi merged commit 7d24656 into develop May 30, 2022
@faisal-alvi faisal-alvi deleted the Enhancement/cypress-tests branch May 30, 2022 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup Cypress for E2E testing
2 participants