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
Currently, the "beforeAll()" for each test file logs into the BHIMA instance. When starting the migration this seemed like the only way to do it. But I later discovered that you can do global setup (for logins). See https://playwright.dev/docs/test-global-setup-teardown. Reworking all tests to use global setup for logins should be relatively simple. Once the fix is determined for one test file, applying to all the others should be straightforward and done with a script. Note that the reference above shows how to do some of the tests with logins and some without (so we can test logging in).
The text was updated successfully, but these errors were encountered:
I started working on this but it does not appear to be easy. I could not get the "project" approach to work at all (nor sure why). I tried the other approach ('globalSetup') but ran into problems with it too. I'm not sure it can be done without significant restructing of the way pages are handled by functions in TestUtils and the test scripts. The key problem is how to save the 'page' object between each test file setups. Saving the global state seems to work.
I've decided to give up on this for now, but I've attached a gzip file with diffs from current master (8e534a6) to my current attempt. I've started with just trying (unsuccessfully) to get a demo target working: npm run test:e2e-cash
Currently, the "beforeAll()" for each test file logs into the BHIMA instance. When starting the migration this seemed like the only way to do it. But I later discovered that you can do global setup (for logins). See https://playwright.dev/docs/test-global-setup-teardown. Reworking all tests to use global setup for logins should be relatively simple. Once the fix is determined for one test file, applying to all the others should be straightforward and done with a script. Note that the reference above shows how to do some of the tests with logins and some without (so we can test logging in).
The text was updated successfully, but these errors were encountered: