jws-frontend/tests/institution.spec.ts
Methapon Metanipat 79240f53b0
feat: debit note (#172)
* feat: new file

* feat: function api debit

* feat: add route debit

* feat: new form page

* refactor: show menu debit

* refactor: add type debit note status

* feat: add i18n

* feat: add constants

* feat: add stores

* feat: layout

* feat: add function

* refactor: change name value

* feat: form select quotation

* refactor: change name url

* refactor: use form debit

* refactor: change src import

* refactor: move file form debit

* refactor: add i18n

* feat: add type debit note

* refactor: add columns

* refactor: bind value columns

* refactor: change name Table

* refactor: edit type

* refactor: bind type debit note

* refactor: bind value debit

* refactor: chame name function

* fix: calculate page

* refactor: delete table

* refactor: change name get list

* refactor: change i18n

* refactor: change name value

* refactor: bind navigate and trigger delete

* refactor: format number deciml

* refactor: add i18n

* feat: new page

* refactor: add color debit

* feat: Debit tab

#178

* feat: TableRequest

* refactor: edit type pay condition

* refactor: add i18n btn submit

* refactor: use type enum

* feat: edit layout product expansion

* refactor: bind function

* refactor: show code

* feat: add input search and select  status

* feat: paymentform

* refactor: edit type

* refactor: add manage file and edit end point

* feat: add form.ts

* refactor: send mode

* refactor: edit v-model of due date

* feat: submit create debit

* fix: status

* refactor: handle data not allow

* fix: call updateDebitNote in edit mode and simplify payload handling

* refactor: hide edit

* refactor: handle pay condition only full

* refactor: delete pay split

* refactor: add query

* refactor: handle is debit note

* refactor: handle is quotation

* refactor: add props hide

* refactor: tap payment and receipt

* refactor: add i18n

* feat: view document

* refactor: handle btn view doc

* refactor: use my remark

---------

Co-authored-by: Thanaphon Frappet <thanaphon@frappet.com>
Co-authored-by: nwpptrs <jay02499@gmail.com>
Co-authored-by: aif912752 <siripak@chamomind.com>
2025-01-27 09:04:08 +07:00

44 lines
1.2 KiB
TypeScript

import { fakerEN, fakerTH } from '@faker-js/faker';
import test, { expect, Page } from '@playwright/test';
import { login } from './utils';
test.describe.configure({ mode: 'serial' });
let page: Page;
test.beforeAll(async ({ browser }) => {
page = await browser.newPage();
});
test.afterAll(async () => {
await page.close();
});
test('JWS_INST_001 - Login', async () => {
await login(page);
});
test('JWS_INST_002 - Goto Institution', async () => {
await page.click('//span[text()="หน่วยงาน"]');
await expect(page).toHaveURL(/.*agencies-management/);
await page.waitForTimeout(5000);
});
test('JWS_INST_003 - Click New Institution', async () => {
await page.click('i.q-icon.mdi.mdi-plus');
await expect(page.locator('div.col.text-subtitle1')).toContainText(
'เพิ่มหน่วยงาน',
);
await page.waitForTimeout(5000);
});
test('JWS_INST_004 - Fill Form', async () => {
await page
.getByRole('textbox', { name: 'ชื่อหน่วยงาน' })
.fill(fakerTH.company.name());
await page
.getByRole('textbox', { name: 'Agencies Name' })
.fill(fakerEN.company.name());
fakerEN.location.buildingNumber();
await page.waitForTimeout(5000);
});