test : Create Script Role&Permission

This commit is contained in:
Linpiing 2024-09-18 17:52:25 +07:00
parent 5bc28bf893
commit 9254c0183e
67 changed files with 11224 additions and 729 deletions

View file

@ -0,0 +1,35 @@
import { test, expect, Page } from '@playwright/test';
import { strictEqual } from 'assert';
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.90:20001/');
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('Delete Legalentitly', async () => {
// รออัพเดท PATH
await page.click('id=menu-icon-customer-management');
await page.click("//button[@id='btn-dots-CORP000002']");
await page.click('id=view-detail-btn-undefined-delete');
await page.click('id=btn-ok-dialog');
await page.waitForTimeout(2000);
});