MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / completeMultifileLabWithHotkey

Function completeMultifileLabWithHotkey

e2e/hotkeys.spec.ts:64–87  ·  view source on GitHub ↗
({
  browserName,
  hotkey,
  page
}: {
  browserName: string;
  hotkey: 'Control+Enter' | 'Meta+Enter';
  page: Page;
})

Source from the content-addressed store, hash-verified

62};
63
64const completeMultifileLabWithHotkey = async ({
65 browserName,
66 hotkey,
67 page
68}: {
69 browserName: string;
70 hotkey: 'Control+Enter' | 'Meta+Enter';
71 page: Page;
72}) => {
73 await page.goto(links.multifileLab);
74
75 const editor = getEditors(page);
76 await editor.focus();
77 await expect(editor).toBeFocused();
78 await clearEditor({ page, browserName });
79 await editor.fill(multifileLabSolution);
80
81 await page.keyboard.press(hotkey);
82
83 await expect(
84 page.getByTestId('independentLowerJaw-submit-button')
85 ).toBeVisible();
86 await expect(page.getByRole('dialog')).toHaveCount(0);
87};
88
89test.beforeAll(async ({ request }) => {
90 await authedRequest({

Callers 1

hotkeys.spec.tsFile · 0.85

Calls 2

getEditorsFunction · 0.90
clearEditorFunction · 0.90

Tested by

no test coverage detected