add demo
This commit is contained in:
parent
f7420c651c
commit
b07d1a5ee6
58
examples/github-api/tests/canvas-demo.spec.ts
Normal file
58
examples/github-api/tests/canvas-demo.spec.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import { test } from '@playwright/test';
|
||||
|
||||
test("Google Maps", async ({ page }) => {
|
||||
await page.goto("https://google.com/maps/place/Teufelsberg");
|
||||
|
||||
await page.getByRole('button', { name: 'Alle akzeptieren' }).click();
|
||||
|
||||
const searchBox = page.locator('.searchboxinput').first();
|
||||
|
||||
await searchBox.fill('Schlachtensee');
|
||||
await page.keyboard.press('Enter');
|
||||
await page.waitForTimeout(1000);
|
||||
await searchBox.fill('Griebnitzsee');
|
||||
await page.keyboard.press('Enter');
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await searchBox.fill('Wannsee');
|
||||
await page.keyboard.press('Enter');
|
||||
await page.waitForTimeout(1000);
|
||||
})
|
||||
|
||||
test('Go JS', async ({ page }) => {
|
||||
await page.goto('https://gojs.net/latest/samples/orgChartEditor.html');
|
||||
await page.locator('canvas').click({
|
||||
position: {
|
||||
x: 396,
|
||||
y: 153
|
||||
}
|
||||
});
|
||||
await page.getByRole('cell', { name: 'Luke Warm' }).getByRole('textbox').fill('Ice Cold');
|
||||
await page.getByRole('cell', { name: 'Ice Cold' }).getByRole('textbox').press('Enter');
|
||||
await page.locator('canvas').click({
|
||||
position: {
|
||||
x: 481,
|
||||
y: 319
|
||||
}
|
||||
});
|
||||
await page.locator('canvas').click({
|
||||
position: {
|
||||
x: 1022,
|
||||
y: 289
|
||||
}
|
||||
});
|
||||
await page.getByRole('cell', { name: 'Saul Wellingood' }).getByRole('textbox').fill('Paul Wellingood');
|
||||
await page.getByRole('cell', { name: 'Paul Wellingood' }).getByRole('textbox').press('Enter');
|
||||
await page.locator('canvas').click({
|
||||
position: {
|
||||
x: 481,
|
||||
y: 319
|
||||
}
|
||||
});
|
||||
await page.locator('canvas').click({
|
||||
position: {
|
||||
x: 1022,
|
||||
y: 289
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue