refactor: playwright listview

This commit is contained in:
oat 2023-12-06 12:02:44 +07:00
parent 1ac866b696
commit d713a83111
2 changed files with 16 additions and 5 deletions

View file

@ -184,7 +184,7 @@ async function submitFileForm(
</div>
<div class="grid q-mt-md">
<div
v-for="(value, index) in currentFolder"
v-for="(value) in currentFolder"
:data-pathname="value.pathname"
>
<div

View file

@ -69,10 +69,9 @@ test('Upload File', async () => {
await page.locator("//input[@type='file']").setInputFiles('tests/test.docx')
await page.fill("//input[@placeholder='กรอกชื่อเรื่อง']",'oattest2')
await page.click("(//button[@type='submit'])[2]")
await page.click("//span[text()='ดำเนินการต่อ']")
await page.waitForTimeout(2000)
await page.waitForTimeout(3000)
await page.click("//i[text()='refresh']")
await page.waitForTimeout(2000)
await page.waitForTimeout(1000)
})
test('Go into File', async () => {
@ -81,5 +80,17 @@ test('Go into File', async () => {
test('Download File', async () => {
await page.click("//span[text()='ดาวน์โหลด']")
await page.waitForTimeout(3000)
await page.waitForTimeout(2000)
})
test('Go Back to MainLayout', async () => {
await page.click("//i[text()='arrow_back']")
await page.click("//span[text()='ตู้จัดเก็บเอกสาร']")
})
test('Delete Cabinet', async () => {
await page.click("//button[@data-testid='oat-test']")
await page.click("//span[text()='ลบ']")
await page.waitForTimeout(2000)
})