mirror of
https://github.com/twentyhq/twenty.git
synced 2026-04-19 22:39:30 -04:00
In this PR, - current basic E2E tests are fixed, and some were added, covering some basic scenarios - some tests avec been commented out, until we decide whether they are worth fixing The next steps are - evaluate the flakiness of the tests. Once they've proved not to be flaky, we should add more tests + re-write the current ones not using aria-label (cf @lucasbordeau indication). - We will add them back to the development flow
26 lines
705 B
TypeScript
26 lines
705 B
TypeScript
import { type Page } from '@playwright/test';
|
|
import { getAccessAuthToken } from '../utils/getAccessAuthToken';
|
|
import { backendGraphQLUrl } from './backend';
|
|
|
|
export const destroyWorkflow = async ({
|
|
page,
|
|
workflowId,
|
|
}: {
|
|
page: Page;
|
|
workflowId: string;
|
|
}) => {
|
|
const { authToken } = await getAccessAuthToken(page);
|
|
|
|
return page.request.post(backendGraphQLUrl, {
|
|
headers: {
|
|
Authorization: `Bearer ${authToken}`,
|
|
},
|
|
data: {
|
|
operationName: 'DestroyOneWorkflow',
|
|
variables: { idToDestroy: workflowId },
|
|
query:
|
|
'mutation DestroyOneWorkflow($idToDestroy: UUID!) {\n destroyWorkflow(id: $idToDestroy) {\n id\n __typename\n }\n}',
|
|
},
|
|
});
|
|
};
|