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: More page editor poms #8748

Merged
merged 4 commits into from
Jul 3, 2024
Merged

#8581: More page editor poms #8748

merged 4 commits into from
Jul 3, 2024

Conversation

fungairino
Copy link
Collaborator

@fungairino fungairino commented Jul 3, 2024

What does this PR do?

This PR introduces several new classes in the end-to-end-tests/pageObjects/pageEditor directory, including brickActionsPanel.ts, brickConfigurationPanel.ts, dataPanel.ts, modEditorPane.ts, and utils.ts. These classes provide methods for interacting with different parts of the page editor in the PixieBrix extension.

The PR also modifies the pageEditorPage.ts class to use these new classes and their methods. The changes include replacing direct interactions with the page editor (such as filling in fields) with calls to the new methods, and adding a ModifiesModState decorator to methods that modify the state of the mod.

In addition, the PR updates several test files to use the new methods in pageEditorPage.ts.

The PR is part of a larger effort to provide a more structured and modular way to interact with the page editor, which should make the tests easier to write and maintain.

Closes #8581

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.24%. Comparing base (8318d74) to head (ed66e78).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8748      +/-   ##
==========================================
- Coverage   74.24%   74.24%   -0.01%     
==========================================
  Files        1332     1332              
  Lines       40817    40825       +8     
  Branches     7634     7635       +1     
==========================================
+ Hits        30306    30311       +5     
- Misses      10511    10514       +3     

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

@fungairino fungairino self-assigned this Jul 3, 2024
@fungairino fungairino marked this pull request as ready for review July 3, 2024 18:36
Copy link

github-actions bot commented Jul 3, 2024

Playwright test results

passed  82 passed
flaky  2 flaky
skipped  2 skipped

Details

report  Open report ↗︎
stats  86 tests across 30 suites
duration  13 minutes, 2 seconds
commit  ed66e78

Flaky tests

edge › tests/deployments/deploymentActivation.spec.ts › activate a deployed mod in the extension console
edge › tests/regressions/welcomeStarterBricks.spec.ts › #8740: can view the starter mods on the pixiebrix.com/welcome page

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


// Decorator used for functions that modify the state of the mod.
// This is used to wait for Redux to update before continuing.
export function ModifiesModState<T>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The idea for using this as a decorator rather than as a helper function is that it's easier to remember to annotate which methods are modifying the mod state at the top of the function, and also serves to communicate their intent a bit more clearly to devs (plus I was curious and wanted to try writing a decorator myself)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like it

Copy link

github-actions bot commented Jul 3, 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 3ab86b4 into main Jul 3, 2024
27 checks passed
@fungairino fungairino deleted the more-poms branch July 3, 2024 20:37
@twschiller twschiller added this to the 2.0.5 milestone Jul 7, 2024
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.

Expand the Page Editor POM to cover each of its sections
3 participants