diff --git a/e2e/actionsOnSaveLayout.spec.ts b/e2e/actionsOnSaveLayout.spec.ts index 5d2837a05b..2941629865 100644 --- a/e2e/actionsOnSaveLayout.spec.ts +++ b/e2e/actionsOnSaveLayout.spec.ts @@ -20,13 +20,15 @@ test("Actions on Save aligns each enabled action with its trigger in wide and na const heading = table.getByRole("columnheader", { name: "Activated on", exact: true }); const format = table.getByRole("row", { name: /Reformat code/ }); const imports = table.getByRole("row", { name: /Optimize imports/ }); + const rearrange = table.getByRole("row", { name: /Rearrange code/ }); const cleanup = table.getByRole("row", { name: /Run code cleanup/ }); const trigger = (action: typeof format) => action.getByRole("cell").nth(1); - await expect(table.getByRole("row")).toHaveCount(4); + await expect(table.getByRole("row")).toHaveCount(5); await format.getByRole("checkbox").check(); await imports.getByRole("checkbox").press("Space"); await expect(trigger(format)).toHaveText("Save or Save All"); await expect(trigger(imports)).toHaveText("Save or Save All"); + await expect(trigger(rearrange)).toBeEmpty(); await expect(trigger(cleanup)).toBeEmpty(); for (const width of [1120, 520]) { @@ -42,7 +44,7 @@ test("Actions on Save aligns each enabled action with its trigger in wide and na return range.getClientRects().length; }), ).toBe(1); - for (const row of [format, imports, cleanup]) { + for (const row of [format, imports, rearrange, cleanup]) { const cell = (await trigger(row).boundingBox())!; expect(Math.abs(column.x - cell.x)).toBeLessThan(1); expect(Math.abs(column.width - cell.width)).toBeLessThan(1);