test: add regression test

This commit is contained in:
Pengoose 2025-02-19 02:12:28 +09:00
parent 48fb536e12
commit e43c309877

View file

@ -37,6 +37,13 @@ test('should work with regex', async ({ page }) => {
await expect(locator).toHaveValue(/Text/); await expect(locator).toHaveValue(/Text/);
}); });
test('should normalize NBSP to regular space', async ({ page }) => {
await page.setContent('<input id=node></input>');
const locator = page.locator('#node');
await locator.fill('Text\u00A0and\u0020content');
await expect(locator).toHaveValue('Text and content');
});
test('should support failure', async ({ page }) => { test('should support failure', async ({ page }) => {
await page.setContent('<input id=node></input>'); await page.setContent('<input id=node></input>');
const locator = page.locator('#node'); const locator = page.locator('#node');