This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Typescript and page objects to E2E suite (#6582)
* Initial playwright * Updated e2e to use playwright and typescript * Update set up environment and jest package * Add changelog * Add await to uncheck * Fix formatting * Revert jset back to ~24, as >25 runs slower, see jestjs/jest#9457 * Removed some unnecessary uses of waitForSelector * Fix eslint issue * Fix the e2e tests with latest updates * Running most tests, with typescript now * Fix any outstanding queries for the tests to work * Update changelog * Remove unnecessary jest version and unnecessary transform setting * Fix test case broken after rebase * Add fix to make e2e tests more robust * Making sure dropdown value is correct * Reove the wcpay condition for features number
- Loading branch information
Showing
44 changed files
with
4,235 additions
and
2,668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
# Max amount of time to wait for the Docker container to be built | ||
# Allowing 30 polling attempts, 10 seconds delay between each attempt | ||
MAX_ATTEMPTS=30 | ||
|
||
# Delay (in seconds) between each polling attempt | ||
DELAY_SEC=10 | ||
|
||
# Counter for the loop that checks if the Docker container had been built | ||
count=0 | ||
WP_BASE_URL=$(node node_modules/@woocommerce/e2e-environment/utils/get-base-url.js) | ||
printf "Testing URL: $WP_BASE_URL\n\n" | ||
|
||
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${WP_BASE_URL}/?pagename=ready)" != "200" ]] | ||
|
||
do | ||
echo "$(date) - Docker container is still being built" | ||
sleep ${DELAY_SEC} | ||
|
||
((count++)) | ||
|
||
if [[ $count -gt ${MAX_ATTEMPTS} ]]; then | ||
echo "$(date) - Docker container couldn't be built" | ||
exit 1 | ||
fi | ||
done | ||
|
||
if [[ $count -gt 0 ]]; then | ||
echo "$(date) - Docker container had been built successfully" | ||
fi |
Oops, something went wrong.