test: fix 'exposeFunction should not leak' in video mode (#28169)

This is like how we do it with the other channel tests. In video mode we
produce artifacts so we need to add them to our expectation.
This commit is contained in:
Max Schmitt 2023-11-15 21:48:47 +01:00 committed by GitHub
parent 0867c3ce5b
commit 7ffcb42551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,7 +256,7 @@ it('should work with the domain module', async ({ browserType, server, browserNa
throw err;
});
it('exposeFunction should not leak', async ({ page, expectScopeState, server }) => {
it('exposeFunction should not leak', async ({ page, expectScopeState, server, video }) => {
await page.goto(server.EMPTY_PAGE);
let called = 0;
await page.exposeFunction('myFunction', () => ++called);
@ -284,6 +284,7 @@ it('exposeFunction should not leak', async ({ page, expectScopeState, server })
{
'_guid': 'browser',
'objects': [
...(video === 'on' ? [{ _guid: 'artifact', objects: [] }] : []),
{
'_guid': 'browser-context',
'objects': [