-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: table row action linkage rule defect error (#4436)
* fix: useCurrentFormVariable * test: table action row action linkage by row data * test: detail block support linkage rule * test: detail block support linkage rule * test: detail block support linkage rule
- Loading branch information
Katherine
committed
May 21, 2024
1 parent
d62f611
commit 3f14a9b
Showing
5 changed files
with
586 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/actions/linkage.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* This file is part of the NocoBase (R) project. | ||
* Copyright (c) 2020-2024 NocoBase Co., Ltd. | ||
* Authors: NocoBase Team. | ||
* | ||
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. | ||
* For more information, please refer to: https://www.nocobase.com/agreement. | ||
*/ | ||
|
||
import { expect, test } from '@nocobase/test/e2e'; | ||
import { T4334 } from '../templatesOfBug'; | ||
|
||
// fix https://nocobase.height.app/T-2187 | ||
test('action linkage by row data', async ({ page, mockPage }) => { | ||
await mockPage(T4334).goto(); | ||
const adminEditAction = await page.getByLabel('action-Action.Link-Edit-update-roles-table-admin'); | ||
const adminEditActionStyle = await adminEditAction.evaluate((element) => { | ||
const computedStyle = window.getComputedStyle(element); | ||
return { | ||
opacity: computedStyle.opacity, | ||
}; | ||
}); | ||
const rootEditAction = await page.getByLabel('action-Action.Link-Edit-update-roles-table-root'); | ||
const rootEditActionStyle = await rootEditAction.evaluate((element) => { | ||
const computedStyle = window.getComputedStyle(element); | ||
return { | ||
opacity: computedStyle.opacity, | ||
// 添加其他你需要的样式属性 | ||
}; | ||
}); | ||
|
||
await expect(adminEditActionStyle.opacity).not.toBe('0.1'); | ||
await expect(rootEditActionStyle.opacity).not.toBe('1'); | ||
}); |
Oops, something went wrong.