Skip to content

Commit 8769682

Browse files
authored
fix: Use cross-platform shortcuts in ui-tests (#1964)
Previously, UI tests failed on macOS because the required keyboard shortcuts are slightly different on macOS from Windows and Linux. This commit updates them to use the ControlOrMeta key, which handles both cases.
1 parent ca8370f commit 8769682

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

nbgrader/tests/ui-tests/assignment_list.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ const openAssignmentList = async (page: IJupyterLabPageFixture) => {
151151
mainPanelTabCount
152152
);
153153

154-
await page.keyboard.press("Control+Shift+c");
154+
await page.keyboard.press("ControlOrMeta+Shift+c");
155155
await page
156156
.locator(
157157
'#modal-command-palette li[data-command="nbgrader:open-assignment-list"]'

nbgrader/tests/ui-tests/course_list.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const openCoursesList = async (page: IJupyterLabPageFixture) => {
9898
mainPanelTabCount
9999
);
100100

101-
await page.keyboard.press("Control+Shift+c");
101+
await page.keyboard.press("ControlOrMeta+Shift+c");
102102
await page
103103
.locator(
104104
'#modal-command-palette li[data-command="nbgrader:open-course-list"]'

nbgrader/tests/ui-tests/formgrader.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ const openFormgrader = async (page: IJupyterLabPageFixture) => {
227227
mainPanelTabCount
228228
);
229229

230-
await page.keyboard.press("Control+Shift+c");
230+
await page.keyboard.press("ControlOrMeta+Shift+c");
231231
await page
232232
.locator(
233233
'#modal-command-palette li[data-command="nbgrader:open-formgrader"]'

0 commit comments

Comments
 (0)