Fix comment form e2e test (#6815)

This fixes the test in question erroneously failing due to a different `markdown-text-editor` present elsewhere (in this case, hidden in the "finish review" dropdown).

Having more than one comment form uncommanded would likely be a bug, so adding that selector instead of an ID.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6815
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Danko Aleksejevs <danko@very.lv>
Co-committed-by: Danko Aleksejevs <danko@very.lv>
This commit is contained in:
Danko Aleksejevs 2025-02-06 11:56:09 +00:00 committed by Gusted
parent 742e0c6a72
commit 1f24f35fe9

View file

@ -177,7 +177,7 @@ test('Pull quote reply', async ({page}, workerInfo) => {
const response = await page.goto('/user2/commitsonpr/pulls/1/files');
expect(response?.status()).toBe(200);
const editorTextarea = page.locator('textarea.markdown-text-editor');
const editorTextarea = page.locator('form.comment-form textarea.markdown-text-editor');
// Full quote with no reply handler being open.
await page.click('.comment-code-cloud .context-menu');