({
page,
browserName,
isMobile,
text,
containerId = 'editor-container-indexhtml'
}: InsertTextParameters)
| 29 | } |
| 30 | |
| 31 | const replaceTextInCodeEditor = async ({ |
| 32 | page, |
| 33 | browserName, |
| 34 | isMobile, |
| 35 | text, |
| 36 | containerId = 'editor-container-indexhtml' |
| 37 | }: InsertTextParameters) => { |
| 38 | await expect(async () => { |
| 39 | await clearEditor({ page, browserName, isMobile }); |
| 40 | await getEditors(page).fill(text); |
| 41 | await expect(page.getByTestId(containerId)).toContainText(text); |
| 42 | |
| 43 | await expect( |
| 44 | page.getByRole('region', { |
| 45 | name: translations.learn['editor-tabs'].console |
| 46 | }) |
| 47 | ).toContainText('Your test output will go here'); |
| 48 | }).toPass(); |
| 49 | }; |
| 50 | |
| 51 | const runChallengeTest = async (page: Page, isMobile: boolean) => { |
| 52 | if (isMobile) { |
no test coverage detected