Adding an additional E2E test regarding iFrames and scripts

This commit is contained in:
David Négrier
2022-04-26 15:22:48 +02:00
parent 7b9c616788
commit ed1efe12f2
2 changed files with 17 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
import { expect, test } from '@playwright/test';
import { login } from './utils/roles';
test.describe('Iframe API', () => {
test('can be called from an iframe loading a script', async ({
page,
}) => {
await page.goto(
'http://play.workadventure.localhost/_/global/maps.workadventure.localhost/tests/Metadata/cowebsiteAllowApi.json'
);
await login(page);
await expect(page.locator('p.other-text')).toHaveText('The iframe opened by a script works !', {useInnerText: true});
});
});