Adding an additional E2E test regarding iFrames and scripts
This commit is contained in:
parent
7b9c616788
commit
ed1efe12f2
@ -216,7 +216,7 @@
|
||||
<input type="radio" name="test-cowebsite-allowAPI"> Success <input type="radio" name="test-cowebsite-allowAPI"> Failure <input type="radio" name="test-cowebsite-allowAPI" checked> Pending
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" class="testLink" data-testmap="Metadata/cowebsiteAllowApi.json" target="_blank">Test a iframe opened by a script can use Iframe API</a>
|
||||
<a href="#" class="testLink" data-testmap="Metadata/cowebsiteAllowApi.json" target="_blank">Test a iframe opened by a script can use Iframe API <i>(already automated in E2E tests)</i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
16
tests/tests/iframe_script.spec.ts
Normal file
16
tests/tests/iframe_script.spec.ts
Normal 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});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user