-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(#7055): Expand on image with double click #7308
fix(#7055): Expand on image with double click #7308
Conversation
Current Playwright Test Results Summary✅ 176 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 01/10/2024 03:30:41am UTC)
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Example Imagery in Display Layout Resizing the layout changes thumbnail visibility and size
Retry 1 • Initial Attempt |
0% (0)0 / 52 runsfailed over last 7 days |
5.77% (3)3 / 52 runsflaked over last 7 days |
📄 functional/plugins/tabs/tabs.e2e.spec.js • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Tabs View Renders tabbed elements
Retry 1 • Initial Attempt |
5% (3)3 / 60 runsfailed over last 7 days |
35% (21)21 / 60 runsflaked over last 7 days |
📄 functional/plugins/notebook/restrictedNotebook.e2e.spec.js • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Restricted Notebook with a page locked and with an embed @addinit Disallows embeds to be deleted if page locked @addinit
Retry 1 • Initial Attempt |
4.84% (3)3 / 62 runsfailed over last 7 days |
53.23% (33)33 / 62 runsflaked over last 7 days |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7308 +/- ##
==========================================
+ Coverage 55.85% 55.87% +0.02%
==========================================
Files 659 657 -2
Lines 26243 26198 -45
Branches 2549 2548 -1
==========================================
- Hits 14658 14639 -19
+ Misses 10880 10854 -26
Partials 705 705
... and 13 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't seem to get this to work. Am I doing something wrong? Yep, I am. Need to embed the imagery in a layout first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! Just had one small suggestion for consistency. And I agree with @unlikelyzero that we should have a functional test for this instead of the perf test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just have a few comments for the e2e.
e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js
Outdated
Show resolved
Hide resolved
e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js
Outdated
Show resolved
Hide resolved
|
||
test('Can double-click on the image to view large image', async ({ page }) => { | ||
// Double-click on the image to open large view | ||
await page.locator('.image-wrapper').dblclick(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing here. Is there a way we could avoid .locator()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! But I'm not sure if I did it right, would waitForSelector('.image-wrapper')
work? If not, what would you recommend me to do (or use as the method to get the element)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're moving away from page.locator()
in general and we now prefer to use ARIA based methods such as page.getByRole()
. One way we could improve this could be by adding an accessible name (such as an aria-label
to the img element. We could then update the locator to something like this:
await page.getByRole('img', { name: 'Focused Image' });
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I have replaced the pageSelector
of the image wrapper and the background image with getByRole
.
e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Just a couple small comments but otherwise LGTM. Thanks for this!
e2e/tests/functional/plugins/imagery/exampleImagery.e2e.spec.js
Outdated
Show resolved
Hide resolved
Thank you! Done. |
Closes #7055
Describe your changes:
I added the
expand
function to dblclick function, allowing users to double-click on an image to enlarge it. I made a modification to the Imagery tests to verify this feature.All Submissions:
Author Checklist
type:
label? Note: this is not necessarily the same as the original issue.Reviewer Checklist