Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/page/eval-on-selector-all.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,15 @@ it('should work with bogus Array.from', async ({ page, server }) => {
const divsCount = await page.$$eval('css=div', divs => divs.length);
expect(divsCount).toBe(3);
});

it.fixme('should work with broken Map', async ({ page, server }) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did 'should work with deleted Map' work?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one only uses UtilityScript that currently instantiates builtins manually. However, most of the injected code imports from builtins and relies on the singleton instance, which is currently broken.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

server unused!

await page.setContent(`
<script>
window.Map = () => {};
</script>
<button>Click me</button>
<button>And me</button>
`);
const count = await page.$$eval('role=button', els => els.length);
expect(count).toBe(2);
});