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

[Outreachy Task Submission] Irregularities in e2e testing via Localhost vs Live deployment for login.cy.js #4914

Open
Chiemezuo opened this issue Apr 5, 2024 · 0 comments

Comments

@Chiemezuo
Copy link

Chiemezuo commented Apr 5, 2024

Introduction

While running the Cypress e2e tests on the platform-client-mzima, I've encountered some difficulties with the login.cy.js file when using the localhost URL as my base URL vs when using a live deployment (mezuo.ushahidi.io) as my base URL. I'll list these out, and afterward, I will list things that made both scenarios crash.

Irregularities

  • One of the irregularities is that when running the npm run start command in the e2e-testing folder on my localhost, the language selector doesn't always appear. This makes the tests fail when it doesn't. However, for the live deployment, it always appears. I've rebuilt and restarted docker a number of times, and have also equally updated both the client and platform repositories, and this disparity still exists.
  • Another irregularity is in the password input. The password for the [email protected] happens to be 5 letters long, but the e2e logic checks that all passwords should have a length greater than or equal to 12. This should ideally be changed to reflect the default case.
  • In my Localhost deployment, the default user's (admin's) name and email do not always show at the left hand side, leading to a case where the logic that checks for correctness of user details (by checking that the name and email appear) will fail in localhost. This problem seems not to occur with the live deployment.

Things that fail either way

  • In the verify_logic function, there's a switch in logic, and the loginButton should exist.
  • By default, because there are no emails and passwords provided in the env, they will fail. However, it would be good to have a fail-safe option, at least for the localhost defaults.
  • The click_through_onboarding method can be somewhat unpredictable because of loading time, so it might need a little introduced delay just before it is called.
@Chiemezuo Chiemezuo changed the title [Outreachy Task Submission] Irregularities in e2e testing via Localhost vs Live deployment [Outreachy Task Submission] Irregularities in e2e testing via Localhost vs Live deployment for login.cy.js Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant