mirror of
https://github.com/twentyhq/twenty.git
synced 2026-06-12 01:46:39 -04:00
## Summary - **Merge queue optimization**: Created a dedicated `ci-merge-queue.yaml` workflow that only runs Playwright E2E tests on `ubuntu-latest-8-cores`. Removed `merge_group` trigger from all 7 existing CI workflows (front, server, shared, website, sdk, zapier, docker-compose). The merge queue goes from ~30+ parallel jobs to a single focused E2E job. - **Label-based merge queue simulation**: Added `run-merge-queue` label support so developers can trigger the exact merge queue E2E pipeline on any open PR before it enters the queue. - **Prettier in lint**: Chained `prettier --check` into `lint` and `prettier --write` into `lint --configuration=fix` across `nx.json` defaults, `twenty-front`, and `twenty-server`. Prettier formatting errors are now caught by `lint` and fixed by `lint:fix` / `lint:diff-with-main --configuration=fix`. ## After merge (manual repo settings) Update GitHub branch protection required status checks: 1. Remove old per-workflow merge queue checks (`ci-front-status-check`, `ci-e2e-status-check`, `ci-server-status-check`, etc.) 2. Add `ci-merge-queue-status-check` as the required check for the merge queue
66 lines
1.9 KiB
TypeScript
66 lines
1.9 KiB
TypeScript
import { expect, test } from '../lib/fixtures/screenshot';
|
|
import { deleteWorkflow } from '../lib/requests/delete-workflow';
|
|
import { destroyWorkflow } from '../lib/requests/destroy-workflow';
|
|
|
|
test('Create workflow', async ({ page }) => {
|
|
const NEW_WORKFLOW_NAME = 'Test Workflow';
|
|
|
|
await page.goto(process.env.LINK);
|
|
|
|
const workflowsFolder = page.getByRole('button', { name: 'Workflows' });
|
|
await workflowsFolder.click();
|
|
|
|
const workflowsLink = page.getByRole('link', { name: 'Workflows' });
|
|
await workflowsLink.click();
|
|
|
|
const createWorkflowButton = page.getByRole('button', {
|
|
name: 'Create new workflow',
|
|
});
|
|
|
|
const [createWorkflowResponse] = await Promise.all([
|
|
page.waitForResponse(async (response) => {
|
|
if (!response.url().endsWith('/graphql')) {
|
|
return false;
|
|
}
|
|
|
|
const requestBody = response.request().postDataJSON();
|
|
|
|
return requestBody.operationName === 'CreateOneWorkflow';
|
|
}),
|
|
|
|
createWorkflowButton.click()
|
|
]);
|
|
|
|
|
|
const recordName = page.getByTestId('top-bar-title').getByPlaceholder('Name');
|
|
await expect(recordName).toBeVisible();
|
|
await recordName.fill(NEW_WORKFLOW_NAME);
|
|
|
|
const workflowDiagramContainer = page.locator('.react-flow__renderer');
|
|
await workflowDiagramContainer.click();
|
|
|
|
const body = await createWorkflowResponse.json();
|
|
const newWorkflowId = body.data.createWorkflow.id;
|
|
|
|
try {
|
|
const workflowName = page
|
|
.getByTestId('top-bar-title')
|
|
.getByText(NEW_WORKFLOW_NAME);
|
|
|
|
// Wait for the name to be visible and not hidden
|
|
await workflowName.waitFor({ state: 'visible' });
|
|
await expect(workflowName).toBeVisible();
|
|
|
|
await expect(page).toHaveURL(`/object/workflow/${newWorkflowId}`);
|
|
} finally {
|
|
await deleteWorkflow({
|
|
page,
|
|
workflowId: newWorkflowId,
|
|
});
|
|
await destroyWorkflow({
|
|
page,
|
|
workflowId: newWorkflowId,
|
|
});
|
|
}
|
|
});
|