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

#8581 mod listing page object model and organizing page editor POMs #8742

Merged
merged 6 commits into from
Jul 2, 2024

Conversation

fungairino
Copy link
Collaborator

@fungairino fungairino commented Jul 2, 2024

What does this PR do?

It introduces a new file modListingPanel.ts which contains classes for handling the mod listing panel in the page editor. It also moves the main page editor POM to its own directory. The changes are part of the ongoing effort to improve the maintainability and readability of the end-to-end testing codebase.

Part of #8581

@fungairino fungairino self-assigned this Jul 2, 2024
@fungairino fungairino changed the title mod listing page object model and organizing page editor POMs #8581 mod listing page object model and organizing page editor POMs Jul 2, 2024
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.24%. Comparing base (8318d74) to head (3aab251).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8742      +/-   ##
==========================================
- Coverage   74.24%   74.24%   -0.01%     
==========================================
  Files        1332     1332              
  Lines       40817    40826       +9     
  Branches     7634     7635       +1     
==========================================
+ Hits        30306    30312       +6     
- Misses      10511    10514       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Jul 2, 2024

Playwright test results

passed  82 passed
skipped  2 skipped

Details

report  Open report ↗︎
stats  84 tests across 29 suites
duration  11 minutes, 39 seconds
commit  3aab251

Skipped tests

chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
edge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options

@twschiller twschiller added this to the 2.0.5 milestone Jul 2, 2024
knip.mjs Outdated
@@ -45,6 +45,8 @@ const knipConfig = {
"src/development/hooks/**",
// Type-only strictNullChecks helper
"src/types/typeOnlyMessengerRegistration.ts",
// End-to-end tests
Copy link
Collaborator

@mnholtz mnholtz Jul 2, 2024

Choose a reason for hiding this comment

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

nit: unnecessary comment imo 😅 but I imagine you included it for consistency?

import { type Locator } from "@playwright/test";

// Starter brick names as shown in the Page Editor UI
export type StarterBrickName =
Copy link
Collaborator

Choose a reason for hiding this comment

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

To get rid of comment?

Suggested change
export type StarterBrickName =
export type StarterBrickUIName =

export class ModListItem extends BasePageObject {
saveButton = this.locator("[data-icon=save]");
get menuButton() {
return this.getByLabel(`${this.modComponentName} - Ellipsis`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice, I didn't realize we had that aria label on those buttons

Copy link
Collaborator

@mnholtz mnholtz left a comment

Choose a reason for hiding this comment

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

looks good so far; lmk when you resolve failing tests

Comment on lines -42 to -43
request.url().includes("/api/registry/bricks/"),
);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not directly related to this PR, but I had to add this timeout after defining a default timeout for actions

Comment on lines +40 to +45

/* Set the default timeout for actions such as `click` */
actionTimeout: 5_000,

/* Set the default timeout for page navigations */
navigationTimeout: 10_000,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

waiting the whole test timeout for a failed click action is annoying so I defined a default action and nav timeouts.

Copy link

github-actions bot commented Jul 2, 2024

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@fungairino fungairino merged commit bd88de0 into main Jul 2, 2024
30 checks passed
@fungairino fungairino deleted the page-editor-pom branch July 2, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants