Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Editor] Avoid to click on the delete button in the freetext integration tests #17264

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 9 additions & 10 deletions test/integration/freetext_editor_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ describe("FreeText Editor", () => {

// Commit.
await page.mouse.click(
editorRect.x,
editorRect.y + 2 * editorRect.height
editorRect.x + 1.5 * editorRect.width,
editorRect.y
);
await page.waitForSelector(
`${getEditorSelector(9)} .overlay.enabled`
Expand Down Expand Up @@ -548,8 +548,8 @@ describe("FreeText Editor", () => {

// Commit.
await page.mouse.click(
editorRect.x,
editorRect.y + 2 * editorRect.height
editorRect.x + 1.5 * editorRect.width,
editorRect.y
);
await page.waitForSelector(`${getEditorSelector(9)} .overlay.enabled`);

Expand Down Expand Up @@ -583,12 +583,10 @@ describe("FreeText Editor", () => {
});

const editorCenters = [];
let lastX = rect.x + rect.width / 10;
for (let i = 0; i < 4; i++) {
const data = `FreeText ${i}`;
await page.mouse.click(
rect.x + ((i + 1) * rect.width) / 10,
rect.y + ((i + 1) * rect.height) / 10
);
await page.mouse.click(lastX, rect.y + rect.height / 10);
await page.waitForSelector(getEditorSelector(i), {
visible: true,
});
Expand All @@ -603,15 +601,16 @@ describe("FreeText Editor", () => {
height,
};
});
lastX = editorRect.x + editorRect.width + 10;
editorCenters.push({
x: editorRect.x + editorRect.width / 2,
y: editorRect.y + editorRect.height / 2,
});

// Commit.
await page.mouse.click(
editorRect.x,
editorRect.y + 2 * editorRect.height
editorRect.x + 1.5 * editorRect.width,
editorRect.y
);
await page.waitForSelector(
`${getEditorSelector(i)} .overlay.enabled`
Expand Down