Add Playwright Test

This commit is contained in:
chamomind 2023-12-04 10:55:55 +07:00
parent 25f813ea2a
commit 6882d9643f
7 changed files with 262 additions and 0 deletions

View file

@ -0,0 +1,14 @@
import { test, expect } from '@playwright/test';
test('EDM Login/Logout Test', async ({ page }) => {
await page.goto('https://edm.frappet.synology.me');
await expect(page).toHaveTitle("Sign in to EDM");
await page.fill("input[name='username']","oom")
await page.fill("input[name='password']","oom")
await page.click("input[name='login']")
await page.waitForTimeout(5000)
await page.click("(//div[@role='toolbar']//button)[1]")
await page.waitForTimeout(2000)
await page.click("//div[text()='Logout']")
await page.waitForTimeout(4000)
await expect(page).toHaveTitle("Sign in to EDM");
});