test: fix e2e to make pass

This commit is contained in:
Zeke Zhang 2024-04-13 12:53:25 +08:00
parent db3200516d
commit a00f4ac69b
3 changed files with 6 additions and 4 deletions

View File

@ -92,8 +92,9 @@ test.describe('configure fields', () => {
test.describe('configure actions', () => {
test('edit & delete & duplicate', async ({ page, mockPage, mockRecord }) => {
await mockPage(oneEmptyDetailsBlock).goto();
const nocoPage = await mockPage(oneEmptyDetailsBlock).waitForInit();
await mockRecord('general');
await nocoPage.goto();
await page.getByLabel('schema-initializer-ActionBar-detailsWithPaging:configureActions-general').hover();
await page.getByRole('menuitem', { name: 'Edit' }).click();

View File

@ -1,9 +1,10 @@
import { test, expect, oneEmptyTable, oneEmptyForm } from '@nocobase/test/e2e';
import { expect, oneEmptyForm, oneEmptyTable, test } from '@nocobase/test/e2e';
test.describe('custom request action', () => {
test('edit button', async ({ page, mockPage, mockRecord }) => {
await mockPage(oneEmptyTable).goto();
const nocoPage = await mockPage(oneEmptyTable).waitForInit();
await mockRecord('t_unp4scqamw9');
await nocoPage.goto();
// 新建一个 custom request action
await page.getByRole('button', { name: 'Actions', exact: true }).hover();

View File

@ -28,7 +28,7 @@ test.describe('File manager', () => {
await expect(page.getByText(storageName)).toBeVisible();
// 2、测试步骤点击“文件管理器”-“编辑”按钮,编辑标题,点击“确定”按钮
await page.getByText('Edit').nth(2).click();
await page.getByText('Edit', { exact: true }).nth(1).click();
const editLocalStorage = new EditLocalStorage(page);
caseTitle = caseTitle + dayjs().format('YYYYMMDDHHmmssSSS').toString();
await editLocalStorage.title.fill(caseTitle);