update test
This commit is contained in:
parent
f3982978fa
commit
c4bdd18deb
123 changed files with 12136 additions and 5001 deletions
|
|
@ -0,0 +1,39 @@
|
|||
import { test, expect, Page } from '@playwright/test';
|
||||
import { strictEqual } from 'assert';
|
||||
import { log } from 'console';
|
||||
|
||||
let page: Page;
|
||||
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
page = await browser.newPage();
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
if (page !== undefined) {
|
||||
await page.close();
|
||||
}
|
||||
});
|
||||
|
||||
test('Login', async () => {
|
||||
// Login
|
||||
await page.goto('http://192.168.1.62:20101/');
|
||||
await expect(page).toHaveTitle(/^Sign in to /);
|
||||
await page.fill("input[name='username']", 'admin');
|
||||
await page.fill("input[name='password']", '1234');
|
||||
await page.click('id=kc-login');
|
||||
await page.waitForTimeout(2000);
|
||||
// await page.click('id=acceptBtn');
|
||||
});
|
||||
|
||||
test('ทดสอบการเพิ่มขั้นตอนการทำงาน', async () => {
|
||||
// เข้าสู่เมนูสินค้าและบริการ
|
||||
await page.click('id=menu.manage');
|
||||
await page.waitForSelector('id=sub-menu-workflow');
|
||||
await page.click('id=sub-menu-workflow');
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
await page.waitForSelector('id=btn-Add');
|
||||
await page.click('id=btn-Add');
|
||||
|
||||
// ส่วนชื่อแม่แบบ
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue