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

Feature/setup cypress for e2e testing #179

Merged
merged 8 commits into from
May 10, 2023

Conversation

barneyjeffries
Copy link
Contributor

Description of the Change

This PR adds Cypress for e2e testing, configured and with 2 tests set-up:

  1. settings.test - the test adds the admin credentials for a test azure account and uploads a file to verify integration is working
  2. admin.test - the test logs in and deactivates and activates the plugin

NOTE: We need to add the test azure account credentials to the GitHub repo but I don't have permissions to do this. The constants should be set as:
MICROSOFT_AZURE_ACCOUNT_NAME
MICROSOFT_AZURE_ACCOUNT_KEY
MICROSOFT_AZURE_CONTAINER

Closes #154

How to test the Change

  1. Pull changes
  2. Run npm install
  3. Build assets: npm run build
  4. Start local environment: npm run env:start
  5. Open Cypress for testing supplying test credentials:
    CYPRESS_MICROSOFT_AZURE_ACCOUNT_NAME=[accountname] CYPRESS_MICROSOFT_AZURE_ACCOUNT_KEY=[key] CYPRESS_MICROSOFT_AZURE_CONTAINER=[container] npm run cypress:open
  6. Use Cypress GUI to run tests and verify they are working

Changelog Entry

Added - New feature

Credits

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@jeffpaul jeffpaul added this to the 4.4.0 milestone Apr 11, 2023
@jeffpaul jeffpaul requested review from a team and iamdharmesh and removed request for a team April 11, 2023 14:32
@iamdharmesh
Copy link
Member

@barneyjeffries Thanks a lot for the PR.

@jeffpaul could you please help with adding Azure credentials to GH action secrets to the repo? I tried running tests locally and it seems working fine.

Thanks.

@jeffpaul
Copy link
Member

@iamdharmesh I've added what I believe are the necessary secrets, but please let me know if anything isn't acting as expected and I'll research further... thanks!

@jeffpaul
Copy link
Member

jeffpaul commented May 8, 2023

@iamdharmesh bumping this back up to see if the repo secrets allow this to function as you'd expect?

@jeffpaul jeffpaul marked this pull request as ready for review May 8, 2023 19:24
@jeffpaul jeffpaul requested review from jeffpaul, a team and rickalee as code owners May 8, 2023 19:24
@jeffpaul jeffpaul removed request for jeffpaul and a team May 8, 2023 19:24
@iamdharmesh
Copy link
Member

@jeffpaul Thanks for adding repo secrets. it's working fine after some minor yml file changes.

Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

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

Thanks @barneyjeffries, LGTM 🚀

@jeffpaul jeffpaul merged commit ac70b3d into develop May 10, 2023
@jeffpaul jeffpaul deleted the feature/setup-cypress-for-e2e-testing branch May 10, 2023 14:21
@dkotter dkotter modified the milestones: 4.4.0, 4.3.5 Jul 3, 2023
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
4 participants