mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-25 11:16:11 +01:00
Fix the e2e test for Monaco editor
This commit is contained in:
parent
252426f992
commit
f7d217b695
|
@ -16,14 +16,15 @@ test('Markdown image preview behaviour', async ({browser}, workerInfo) => {
|
||||||
|
|
||||||
const editPath = '/user2/repo1/src/branch/master/README.md';
|
const editPath = '/user2/repo1/src/branch/master/README.md';
|
||||||
|
|
||||||
const response = await page.goto(editPath);
|
const response = await page.goto(editPath, { waitUntil: 'domcontentloaded' });
|
||||||
expect(response?.status()).toBe(200);
|
expect(response?.status()).toBe(200);
|
||||||
|
|
||||||
await page.locator('[data-tooltip-content="Edit file"]').click();
|
await page.locator('[data-tooltip-content="Edit file"]').click();
|
||||||
|
|
||||||
const editor = page.locator('[aria-roledescription="editor"]').first();
|
const editor = page.getByRole("presentation").nth(0);
|
||||||
await editor.fill('');
|
await editor.click();
|
||||||
await editor.fill('![Logo of Forgejo](./assets/logo.svg "Logo of Forgejo")');
|
await page.keyboard.press("ControlOrMeta+KeyA");
|
||||||
|
await page.keyboard.type('![Logo of Forgejo](./assets/logo.svg "Logo of Forgejo")');
|
||||||
|
|
||||||
await page.locator('a[data-tab="preview"]').click();
|
await page.locator('a[data-tab="preview"]').click();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue