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

Tests - Start Page Object Model for Playwright #5204

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

Gustry
Copy link
Member

@Gustry Gustry commented Jan 15, 2025

Adding POM : https://playwright.dev/docs/pom

Superseeds #5167

@Gustry Gustry added tests unit tests and docker configuration for tests run end2end If the PR must run end2end tests or not backport release_3_7 backport release_3_8 backport release_3_9 labels Jan 15, 2025
@github-actions github-actions bot added this to the 3.10.0 milestone Jan 15, 2025
@Gustry Gustry force-pushed the pom-project-page-playwright branch 2 times, most recently from c01abd1 to df35032 Compare January 15, 2025 14:35
@Gustry
Copy link
Member Author

Gustry commented Jan 15, 2025

Tests should be OK now.

@mind84 you review is also welcome (as I can't add you in the GH review list).

With this, we avoid "dangerous", not convenient string for coding. Using variables and functions is way more convinient in IDE with autocompletion. It also gives better maintenance for later, when a UI is updated.

If merged, please add relevant new locator and function into this class.

Let's see later how we do with the "legacy" gotoMap function.

@Gustry Gustry marked this pull request as ready for review January 15, 2025 14:39
@Gustry Gustry force-pushed the pom-project-page-playwright branch from df35032 to 65cca79 Compare January 15, 2025 14:53
Copy link
Collaborator

@rldhont rldhont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use *.js file instead of *.ts.
You can add // @ts-check at the first line to keep the *.ts file checking

@rldhont rldhont self-requested a review January 16, 2025 08:28
@Gustry Gustry force-pushed the pom-project-page-playwright branch 2 times, most recently from e900ff9 to f61db60 Compare January 16, 2025 08:58
@Gustry Gustry force-pushed the pom-project-page-playwright branch from f61db60 to e92bf17 Compare January 16, 2025 09:10
@Gustry
Copy link
Member Author

Gustry commented Jan 16, 2025

@rldhont Thanks, it's done

Copy link
Collaborator

@rldhont rldhont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@nboisteault nboisteault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Gustry

@Gustry Gustry merged commit 62f19fe into 3liz:master Jan 16, 2025
16 checks passed
@3liz-bot
Copy link
Contributor

The backport to release_3_7 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 65cca794d... Tests - Start Page Object Model for Playwright
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging tests/end2end/playwright/attribute-table.spec.js
CONFLICT (content): Merge conflict in tests/end2end/playwright/attribute-table.spec.js
Auto-merging tests/end2end/playwright/edition-form.spec.js
CONFLICT (content): Merge conflict in tests/end2end/playwright/edition-form.spec.js
Auto-merging tests/end2end/playwright/media.spec.js
CONFLICT (modify/delete): tests/end2end/playwright/snap.spec.js deleted in HEAD and modified in 65cca794d (Tests - Start Page Object Model for Playwright).  Version 65cca794d (Tests - Start Page Object Model for Playwright) of tests/end2end/playwright/snap.spec.js left in tree.

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release_3_7 release_3_7
# Navigate to the new working tree
cd .worktrees/backport-release_3_7
# Create a new branch
git switch --create backport-5204-to-release_3_7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 65cca794ddbcf1100652d8def99b6d1e2c24377b,e92bf171cfc7be9af0bb7aa07750c15c903c1613
# Push it to GitHub
git push --set-upstream origin backport-5204-to-release_3_7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release_3_7

Then, create a pull request where the base branch is release_3_7 and the compare/head branch is backport-5204-to-release_3_7.

@3liz-bot
Copy link
Contributor

The backport to release_3_8 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 65cca794d... Tests - Start Page Object Model for Playwright
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging tests/end2end/playwright/attribute-table.spec.js
Auto-merging tests/end2end/playwright/edition-form.spec.js
CONFLICT (content): Merge conflict in tests/end2end/playwright/edition-form.spec.js
Auto-merging tests/end2end/playwright/snap.spec.js

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release_3_8 release_3_8
# Navigate to the new working tree
cd .worktrees/backport-release_3_8
# Create a new branch
git switch --create backport-5204-to-release_3_8
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 65cca794ddbcf1100652d8def99b6d1e2c24377b,e92bf171cfc7be9af0bb7aa07750c15c903c1613
# Push it to GitHub
git push --set-upstream origin backport-5204-to-release_3_8
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release_3_8

Then, create a pull request where the base branch is release_3_8 and the compare/head branch is backport-5204-to-release_3_8.

@Gustry Gustry deleted the pom-project-page-playwright branch January 16, 2025 12:49
rldhont added a commit to rldhont/lizmap-web-client that referenced this pull request Jan 16, 2025
Follow up 3liz#5204

Add a way to store and check logs in Project page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_3_7 backport release_3_8 backport release_3_9 failed backport run end2end If the PR must run end2end tests or not tests unit tests and docker configuration for tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants