You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 admin@example.com 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.
The text was updated successfully, but these errors were encountered:
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
Introduction
While running the Cypress e2e tests on the
platform-client-mzima
, I've encountered some difficulties with thelogin.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
npm run start
command in thee2e-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.admin@example.com
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.Things that fail either way
verify_logic
function, there's a switch in logic, and theloginButton
should exist.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.The text was updated successfully, but these errors were encountered: