mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-19 17:25:55 +00:00
fix(ui): make unicode escape work in wiki (#8923)
Fixes #4118 - Unicode escape now works in wiki - edit and escape buttons are better placed - edit icon is now under the warning Before: https://codeberg.org/attachments/4414f0cb-776a-4e62-a3b5-99de0914bf26 After: https://codeberg.org/attachments/93aad13f-e36b-42f9-a827-7ff7259da581 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8923 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: zokki <zokki.softwareschmiede@gmail.com> Co-committed-by: zokki <zokki.softwareschmiede@gmail.com>
This commit is contained in:
parent
55f0feb874
commit
262a2253aa
5 changed files with 52 additions and 16 deletions
|
@ -41,3 +41,22 @@ test(`Search results show titles (and not file names)`, async ({page}, workerInf
|
|||
await expect(page.locator('#wiki-search a[href] b')).toHaveText('Page With Spaced Name');
|
||||
await save_visual(page);
|
||||
});
|
||||
|
||||
test('Wiki unicode-escape', async ({page}) => {
|
||||
await page.goto('/user2/unicode-escaping/wiki');
|
||||
await save_visual(page);
|
||||
|
||||
expect(await page.locator('.ui.message.unicode-escape-prompt').count()).toEqual(3);
|
||||
|
||||
const unescapedElements = page.locator('.ambiguous-code-point');
|
||||
for (let i = 0; i < await unescapedElements.count(); i++) {
|
||||
expect(await unescapedElements.nth(i).evaluate((el) => getComputedStyle(el).border)).toEqual('0px solid rgb(24, 24, 27)');
|
||||
}
|
||||
|
||||
await page.locator('a.escape-button').click();
|
||||
|
||||
const escapedElements = page.locator('.ambiguous-code-point');
|
||||
for (let i = 0; i < await escapedElements.count(); i++) {
|
||||
expect(await escapedElements.nth(i).evaluate((el) => getComputedStyle(el).border)).toEqual('1px solid rgb(202, 138, 4)');
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue