Clean action between tests
This commit is contained in:
parent
01b7f7388f
commit
3830d6cff7
|
@ -534,11 +534,9 @@ describe("/rowsActions", () => {
|
|||
)
|
||||
})
|
||||
|
||||
let tableIdForDescribe: string
|
||||
let actionId1: string, actionId2: string
|
||||
|
||||
beforeAll(async () => {
|
||||
tableIdForDescribe = tableId
|
||||
beforeEach(async () => {
|
||||
for (const rowAction of createRowActionRequests(3)) {
|
||||
await createRowAction(tableId, rowAction)
|
||||
}
|
||||
|
@ -549,11 +547,6 @@ describe("/rowsActions", () => {
|
|||
actionId2 = actions[1]
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
// Hack to reuse tables for these given tests
|
||||
tableId = tableIdForDescribe
|
||||
})
|
||||
|
||||
it("can set table permission", async () => {
|
||||
await config.api.rowAction.unsetTablePermission(tableId, actionId1)
|
||||
await config.api.rowAction.unsetTablePermission(tableId, actionId2)
|
||||
|
@ -622,11 +615,9 @@ describe("/rowsActions", () => {
|
|||
)
|
||||
})
|
||||
|
||||
let tableIdForDescribe: string
|
||||
let actionId1: string, actionId2: string
|
||||
let viewId1: string, viewId2: string
|
||||
beforeAll(async () => {
|
||||
tableIdForDescribe = tableId
|
||||
beforeEach(async () => {
|
||||
for (const rowAction of createRowActionRequests(3)) {
|
||||
await createRowAction(tableId, rowAction)
|
||||
}
|
||||
|
@ -648,11 +639,6 @@ describe("/rowsActions", () => {
|
|||
).id
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
// Hack to reuse tables for these given tests
|
||||
tableId = tableIdForDescribe
|
||||
})
|
||||
|
||||
it("can set permission views", async () => {
|
||||
await config.api.rowAction.setViewPermission(tableId, viewId1, actionId1)
|
||||
const action1Result = await config.api.rowAction.setViewPermission(
|
||||
|
|
Loading…
Reference in New Issue