mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: should serialize storageState with lone surrogates (#29089)
https://github.com/microsoft/playwright-dotnet/issues/2819
This commit is contained in:
parent
acc72c2663
commit
cf70a01836
@ -214,3 +214,11 @@ it('should handle malformed file', async ({ contextFactory }, testInfo) => {
|
|||||||
else
|
else
|
||||||
expect(error.message).toContain(`Error reading storage state from ${file}:\nUnexpected token o in JSON at position 1`);
|
expect(error.message).toContain(`Error reading storage state from ${file}:\nUnexpected token o in JSON at position 1`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should serialize storageState with lone surrogates', async ({ page, context, server }) => {
|
||||||
|
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright-dotnet/issues/2819' });
|
||||||
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
await page.evaluate(() => window.localStorage.setItem('foo', String.fromCharCode(55934)));
|
||||||
|
const storageState = await context.storageState();
|
||||||
|
expect(storageState.origins[0].localStorage[0].value).toBe(String.fromCharCode(55934));
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user