mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-19 17:50:13 +00:00
fix: migrate tables to TanStack React Table v9
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { expect } from "@playwright/test"
|
||||
|
||||
import { csrfHeaders, test } from "./fixtures"
|
||||
import { csrfRequest, test } from "./fixtures"
|
||||
|
||||
test("manual cron trigger goes through POST, not GET", async ({ adminPage: page }) => {
|
||||
const created = await page.request.post("/api/v1/cron", {
|
||||
headers: await csrfHeaders(page),
|
||||
const created = await csrfRequest(page, "post", "/api/v1/cron", {
|
||||
data: {
|
||||
name: "e2e-cron-csrf",
|
||||
name: `e2e-cron-csrf-${Date.now().toString(36)}`,
|
||||
task_type: 0,
|
||||
scheduler: "@every 1h",
|
||||
command: "true",
|
||||
@@ -29,15 +28,12 @@ test("manual cron trigger goes through POST, not GET", async ({ adminPage: page
|
||||
`GET must no longer be routable (got ${getResp.status()})`,
|
||||
).toBeTruthy()
|
||||
|
||||
const postResp = await page.request.post(`/api/v1/cron/${cronID}/manual`, {
|
||||
headers: await csrfHeaders(page),
|
||||
})
|
||||
const postResp = await csrfRequest(page, "post", `/api/v1/cron/${cronID}/manual`)
|
||||
expect(postResp.ok(), `POST must succeed (got ${postResp.status()})`).toBeTruthy()
|
||||
const body = await postResp.json()
|
||||
expect(body.success).toBe(true)
|
||||
} finally {
|
||||
await page.request.post("/api/v1/batch-delete/cron", {
|
||||
headers: await csrfHeaders(page),
|
||||
await csrfRequest(page, "post", "/api/v1/batch-delete/cron", {
|
||||
data: [cronID],
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user