Skip to content

Gitlab-169: Setup timeout fix #83

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Gitlab-169: Setup timeout fix #83

wants to merge 14 commits into from

Conversation

shayfaber
Copy link
Contributor

This commit mostly reworks setup.spec.ts and magentoAdmin.page.ts. An overview of the most important changes:

  • The test setting up Magento environment test(group) in setup.spec.ts has now been broken down in clearer steps to show the user what is being done, making it easier to scan and fix errors when necessary.
  • The step add Coupon Codes now checks if the codes from .env can already be found in the admin environment. If so, a notice will be pushed to the console as well as the report to notify the user. This ensures the setup will not fail if the coupon codes already exist.
  • Removed instances of waitForLoadState("networkidle") since this is not according to best practices. Instead, we now use the appropriate waitFor().
  • Updated a small point in the evaluate() code where we select all stores when creating the coupon codes to explicitly note the element as HTMLSelectElement to ensure we don't get errors in our editors.

Attempting to fix `setup.spec.ts` and `magentoAdmin.page.ts`
by adding waitFor() and other optimizations.
- Added Github Actions activation on push to `setup-timeout-fix`.
- Added report upload to setup test on fail.
- Changed operating system from `windows-latest` to `ubuntu-latest`
- Removed `--max-failures=1`  from line 69 (Playwright test run command) to check if this is the cause of Github Actions failing
When `test-toggles.example.ts` is copied in the CI, this should be set to true
This commit updates the CI tests for `setup.spec.ts`
to also contain the new test steps.
- Changed operating system back to Windows to check if Webkit test fails persist.
Changes from this commit:

- Removed `.gitkeep` since the playwright-report folder isn't required.
- Removed line from `.gitignore` to reflect above change.
- Running `setup.spec.ts` will now check if the coupon codes have already been added.
If coupon codes are found that are equal to the codes from `.env`, then a warning will be added to the report, but no error.
- Removed the line that invoked Github Actions on a push to the `setup-timeout-fix` branch
- Moved admin coupon field locator to element-identifiers.json
- Removed code that was commented out.
Reverted mistake where I changed the Rule Name to the actual Coupon Code rather than naming it 'Test Coupon'
@shayfaber shayfaber requested a review from dheesen May 7, 2025 12:25
shayfaber added 2 commits May 19, 2025 10:23
- Removed `*` from `/playwright-report/` to ensure entire folder + content is ignored.
- Readded ` --max-failures=1` to the `setup.spec.ts` command (line 56) to ensure testing suite does not continue after the setup failed.
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.

2 participants