-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Highlight current Viewport in
ViewportMenu
Component. (#386)
This PR makes sure the currently applied Viewport is highlighted in the `ViewportMenu` drop-down. Previously, there was no highlighting. So, people could not remember what Viewport they'd applied. Note that we do not highlight the "Reset Viewport" option. I also added a visual regression test to ensure the correct highlighting behavior. J=SLAP-2946 TEST=auto, manual
- Loading branch information
1 parent
66cd396
commit ef54a4e
Showing
10 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
Binary file added
BIN
+476 KB
...s/__screenshots__/darwin/viewport-menu.spec.ts/can-set-and-reset-Viewport-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+474 KB
...s/__screenshots__/darwin/viewport-menu.spec.ts/can-set-and-reset-Viewport-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+476 KB
...s/__screenshots__/darwin/viewport-menu.spec.ts/can-set-and-reset-Viewport-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+439 KB
...ts/__screenshots__/win32/viewport-menu.spec.ts/can-set-and-reset-Viewport-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+438 KB
...ts/__screenshots__/win32/viewport-menu.spec.ts/can-set-and-reset-Viewport-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+439 KB
...ts/__screenshots__/win32/viewport-menu.spec.ts/can-set-and-reset-Viewport-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { studioTest } from "./infra/studioTest.js"; | ||
|
||
studioTest("can set and reset Viewport", async ({ studioPage }) => { | ||
await studioPage.switchPage("LocationPage"); | ||
await studioPage.openViewportMenu(); | ||
await studioPage.takePageScreenshotAfterImgRender(); | ||
await studioPage.setViewport("Galaxy Z Flip5 Folded"); | ||
await studioPage.openViewportMenu(); | ||
await studioPage.takePageScreenshotAfterImgRender(); | ||
await studioPage.setViewport("Reset Viewport"); | ||
await studioPage.openViewportMenu(); | ||
await studioPage.takePageScreenshotAfterImgRender(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters