mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 01:36:52 +00:00
test: make testing more stable
This commit is contained in:
parent
0e29407aec
commit
78b7badeb6
@ -4,7 +4,11 @@ import { twoTableWithRelationalFields, twoTableWithSameCollection } from './temp
|
||||
test.describe('connect data blocks: table block', () => {
|
||||
test('connections between same collections', async ({ page, mockPage, mockRecords }) => {
|
||||
const nocoPage = await mockPage(twoTableWithSameCollection).waitForInit();
|
||||
const records = await mockRecords('users', 3);
|
||||
const records = await mockRecords('users', [
|
||||
{ email: 'aaaaa@gmail.com' },
|
||||
{ email: 'bbbbb@gmail.com' },
|
||||
{ email: 'ccccc@gmail.com' },
|
||||
]);
|
||||
await nocoPage.goto();
|
||||
|
||||
// 将左边的 Table 连接到右边的 Table
|
||||
@ -23,7 +27,11 @@ test.describe('connect data blocks: table block', () => {
|
||||
|
||||
test('connecting via Relational Fields', async ({ page, mockPage, mockRecords }) => {
|
||||
const nocoPage = await mockPage(twoTableWithRelationalFields).waitForInit();
|
||||
const records = await mockRecords('users', 3);
|
||||
await mockRecords('users', [
|
||||
{ email: 'aaaaa@gmail.com' },
|
||||
{ email: 'bbbbb@gmail.com' },
|
||||
{ email: 'ccccc@gmail.com' },
|
||||
]);
|
||||
await nocoPage.goto();
|
||||
|
||||
// 将左边的 Table 连接到右边的 Table
|
||||
|
@ -3,7 +3,11 @@ import { commonTesting, testDefaultValue, testPattern } from '../commonTesting';
|
||||
|
||||
const gotoPage = async (mockPage, mockRecords) => {
|
||||
const nocoPage = await mockPage(oneTableBlockWithAddNewAndViewAndEditAndRelationFields).waitForInit();
|
||||
await mockRecords('users', 3);
|
||||
await mockRecords('users', [
|
||||
{ email: 'aaaaa@gmail.com' },
|
||||
{ email: 'bbbbb@gmail.com' },
|
||||
{ email: 'ccccc@gmail.com' },
|
||||
]);
|
||||
await nocoPage.goto();
|
||||
};
|
||||
|
||||
|
@ -3,7 +3,11 @@ import { commonTesting, testPattern } from '../commonTesting';
|
||||
|
||||
const gotoPage = async (mockPage, mockRecords) => {
|
||||
const nocoPage = await mockPage(oneTableBlockWithAddNewAndViewAndEditAndRelationFields).waitForInit();
|
||||
await mockRecords('users', 3);
|
||||
await mockRecords('users', [
|
||||
{ email: 'aaaaa@gmail.com' },
|
||||
{ email: 'bbbbb@gmail.com' },
|
||||
{ email: 'ccccc@gmail.com' },
|
||||
]);
|
||||
const record = (await mockRecords('general', 1))[0];
|
||||
await nocoPage.goto();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user