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

#8596: improving mod definition snapshot capabilities - diffing #8754

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

fungairino
Copy link
Collaborator

@fungairino fungairino commented Jul 6, 2024

What does this PR do?

Adds capabilities for comparing snapshots of mod definitions within end-to-end tests, improving the readability and focus of what is being tested. The new functionality will track the mod definition each time the snapshot is checked, and can be used even if the mod was not created via the modDefinitionNames fixture.

While writing this PR I also cleaned up some flaky behavior in editWorkshopModPage.ts which required some changes in the lifecycle spec.

Checklist

Leave all that are relevant and check off as completed

  • This PR requires a security review
  • This PR introduces a new library: double check it's MIT/Apache2/permissively licensed
    • deep-diff - MIT
  • Added jest or playwright tests and/or storybook stories

For more information on our expectations for the PR process, see the
code review principles doc

Copy link

codecov bot commented Jul 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.24%. Comparing base (8318d74) to head (404be8d).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8754      +/-   ##
==========================================
- 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.

Comment on lines -118 to -123
const modListing = modsPage.modTableItemById(modId);
await expect(modsPage.modTableItemById(modId)).toContainText(
"version 1.0.1",
);
await modsPage.actionForModByName(modId, "Reactivate");

await expect(
modListing.getByRole("button", { name: "Update" }),
).toBeVisible();
await modListing.getByRole("button", { name: "Update" }).click();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was pretty confused by this behavior as I reviewed this code making sure it worked with the new snapshot utility. It turns out that this "Update" button was only showing up because we were interrupting the persistence of the mod when saving it in the workshop.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link

github-actions bot commented Jul 6, 2024

Playwright test results

passed  83 passed
flaky  1 flaky
skipped  2 skipped

Details

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

Flaky tests

edge › tests/regressions/doNotCloseSidebarOnPageEditorSave.spec.ts › #8104: Do not automatically close the sidebar when saving in the Page Editor

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 changed the title improving mod definition snapshot capabilities - diffing #8596: improving mod definition snapshot capabilities - diffing Jul 6, 2024
@twschiller twschiller added this to the 2.0.5 milestone Jul 6, 2024
Copy link

github-actions bot commented Jul 8, 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 779cce2 into main Jul 8, 2024
22 checks passed
@fungairino fungairino deleted the mod-definition-diff branch July 8, 2024 14:28
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.

3 participants