mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:26:44 +00:00
test: fix e2e to make pass
This commit is contained in:
parent
db3200516d
commit
a00f4ac69b
@ -92,8 +92,9 @@ test.describe('configure fields', () => {
|
|||||||
|
|
||||||
test.describe('configure actions', () => {
|
test.describe('configure actions', () => {
|
||||||
test('edit & delete & duplicate', async ({ page, mockPage, mockRecord }) => {
|
test('edit & delete & duplicate', async ({ page, mockPage, mockRecord }) => {
|
||||||
await mockPage(oneEmptyDetailsBlock).goto();
|
const nocoPage = await mockPage(oneEmptyDetailsBlock).waitForInit();
|
||||||
await mockRecord('general');
|
await mockRecord('general');
|
||||||
|
await nocoPage.goto();
|
||||||
|
|
||||||
await page.getByLabel('schema-initializer-ActionBar-detailsWithPaging:configureActions-general').hover();
|
await page.getByLabel('schema-initializer-ActionBar-detailsWithPaging:configureActions-general').hover();
|
||||||
await page.getByRole('menuitem', { name: 'Edit' }).click();
|
await page.getByRole('menuitem', { name: 'Edit' }).click();
|
||||||
|
@ -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.describe('custom request action', () => {
|
||||||
test('edit button', async ({ page, mockPage, mockRecord }) => {
|
test('edit button', async ({ page, mockPage, mockRecord }) => {
|
||||||
await mockPage(oneEmptyTable).goto();
|
const nocoPage = await mockPage(oneEmptyTable).waitForInit();
|
||||||
await mockRecord('t_unp4scqamw9');
|
await mockRecord('t_unp4scqamw9');
|
||||||
|
await nocoPage.goto();
|
||||||
|
|
||||||
// 新建一个 custom request action
|
// 新建一个 custom request action
|
||||||
await page.getByRole('button', { name: 'Actions', exact: true }).hover();
|
await page.getByRole('button', { name: 'Actions', exact: true }).hover();
|
||||||
|
@ -28,7 +28,7 @@ test.describe('File manager', () => {
|
|||||||
await expect(page.getByText(storageName)).toBeVisible();
|
await expect(page.getByText(storageName)).toBeVisible();
|
||||||
|
|
||||||
// 2、测试步骤:点击“文件管理器”-“编辑”按钮,编辑标题,点击“确定”按钮
|
// 2、测试步骤:点击“文件管理器”-“编辑”按钮,编辑标题,点击“确定”按钮
|
||||||
await page.getByText('Edit').nth(2).click();
|
await page.getByText('Edit', { exact: true }).nth(1).click();
|
||||||
const editLocalStorage = new EditLocalStorage(page);
|
const editLocalStorage = new EditLocalStorage(page);
|
||||||
caseTitle = caseTitle + dayjs().format('YYYYMMDDHHmmssSSS').toString();
|
caseTitle = caseTitle + dayjs().format('YYYYMMDDHHmmssSSS').toString();
|
||||||
await editLocalStorage.title.fill(caseTitle);
|
await editLocalStorage.title.fill(caseTitle);
|
||||||
|
Loading…
Reference in New Issue
Block a user