test : Update Script

This commit is contained in:
Linpiing 2024-09-26 11:05:54 +07:00
parent 9254c0183e
commit 297ff8c675
73 changed files with 2055 additions and 398 deletions

View file

@ -16,7 +16,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');
@ -28,8 +28,8 @@ test('Login', async () => {
test('Create Branch Managenment', async () => {
try {
await page.click('id=menu-icon-branch-management');
await page.click('id=hq-add-btn');
// await page.click('id=btn-Add');
// await page.click('id=hq-add-btn');
await page.click('id=btn-Add');
// await page.click("(//div[@class='q-avatar relative-position'])[2]");
// const fileInput = page.locator(
@ -88,10 +88,11 @@ test('Create Branch Managenment', async () => {
await page.click("(//input[@aria-label='ประเภทบัญชี'])[2]");
await page.waitForTimeout(2000);
await page.click('id=select-bankbook_0');
await page.click('id=btn-form-submit');
await page.click('id=btn-info-basic-save');
await page.waitForSelector('id=btn-ok-dialog');
await page.click('id=btn-ok-dialog');
await page.click('id=btn-form-close');
// ตรวจสอบความถูกต้องหลังจากทำการบันทึกสร้างสำนักงานใหญ่
const newOfficeLocator = page.locator(
@ -161,10 +162,11 @@ test('Create Branch Managenment Second', async () => {
await page.click("(//input[@aria-label='ประเภทบัญชี'])[2]");
await page.waitForTimeout(2000);
await page.click('id=select-bankbook_0');
await page.click('id=btn-form-submit');
await page.click('id=btn-info-basic-save');
await page.waitForSelector('id=btn-ok-dialog');
await page.click('id=btn-ok-dialog');
await page.click('id=btn-form-close');
// ตรวจสอบความถูกต้องหลังจากทำการบันทึกสร้างสำนักงานใหญ่
const newOfficeLocator = page.locator(

View file

@ -16,7 +16,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');

View file

@ -15,7 +15,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');
@ -85,7 +85,8 @@ test('Create Sub Branch Managenment', async () => {
await page.waitForTimeout(2000);
await page.click('id=select-bankbook_0');
await page.click('id=btn-form-submit');
await page.click('id=btn-info-basic-save');
await page.click('id=btn-form-close');
}
// ตรวจสอบความถูกต้องหลังจากทำการบันทึกสร้างสำนักงานใหญ่

View file

@ -15,7 +15,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');

View file

@ -15,7 +15,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');
@ -85,7 +85,8 @@ test('Create Service Point Managenment', async () => {
await page.waitForTimeout(2000);
await page.click('id=select-bankbook_0');
await page.click('id=btn-form-submit');
await page.click('id=btn-info-basic-save');
await page.click('id=btn-form-close');
}
// ตรวจสอบความถูกต้องหลังจากทำการบันทึกสร้างสำนักงานใหญ่

View file

@ -15,7 +15,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');

View file

@ -17,7 +17,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');

View file

@ -15,7 +15,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');

View file

@ -16,7 +16,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');

View file

@ -15,7 +15,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');

View file

@ -16,7 +16,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');

View file

@ -18,7 +18,7 @@ test.afterAll(async () => {
test('Login', async () => {
// Login
await page.goto('http://192.168.1.90:20001/');
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');
@ -103,7 +103,8 @@ test('ทดสอบการลบจัดการสาขา', async () =>
await page.waitForTimeout(2000);
await page.click('id=select-bankbook_0');
await page.click('id=btn-form-submit');
await page.click('id=btn-info-basic-save');
await page.click('id=btn-form-close');
// จำลองการสร้างสาขาเสมือน
@ -139,7 +140,8 @@ test('ทดสอบการลบจัดการสาขา', async () =>
await page.waitForTimeout(2000);
await page.click('id=select-bankbook_0');
await page.click('id=btn-form-submit');
await page.click('id=btn-info-basic-save');
await page.click('id=btn-form-close');
// ลบสาขาและตรวจสอบการลบสาขา
try {