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

Fix failing integration test on Windows with Chrome #18860

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

calixteman
Copy link
Contributor

It fixes #18775.

@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/00b997dc5c2d57e/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/cdbd7908806881b/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/00b997dc5c2d57e/output.txt

Total script time: 9.80 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/cdbd7908806881b/output.txt

Total script time: 19.60 mins

  • Integration Tests: FAILED

@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/ec07e899a32bca4/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/5ed9c8e29197288/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/ec07e899a32bca4/output.txt

Total script time: 9.68 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/5ed9c8e29197288/output.txt

Total script time: 19.89 mins

  • Integration Tests: FAILED

@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/3158c6694f86b07/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/76636f2dc0bf9d6/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/76636f2dc0bf9d6/output.txt

Total script time: 9.68 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/3158c6694f86b07/output.txt

Total script time: 20.11 mins

  • Integration Tests: FAILED

@calixteman
Copy link
Contributor Author

/botio-windows integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/b2c2aa87f913827/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/b2c2aa87f913827/output.txt

Total script time: 3.77 mins

  • Integration Tests: Passed

@calixteman
Copy link
Contributor Author

/botio-windows integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/db45f8c6591100e/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/db45f8c6591100e/output.txt

Total script time: 20.81 mins

  • Integration Tests: FAILED

@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/1c357fb457d8fb2/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/91d5aa039bf288d/output.txt

@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/85dad2660bf7ee8/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/a4b700834c0b016/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/a4b700834c0b016/output.txt

Total script time: 9.71 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/85dad2660bf7ee8/output.txt

Total script time: 21.12 mins

  • Integration Tests: FAILED

@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/23e6bce3ea03d35/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/33fdf3a278a4eb0/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/33fdf3a278a4eb0/output.txt

Total script time: 9.71 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/23e6bce3ea03d35/output.txt

Total script time: 20.43 mins

  • Integration Tests: FAILED

@calixteman
Copy link
Contributor Author

calixteman commented Oct 6, 2024

@timvandermeij The issue is fixed now: the root cause was about not having integer coordinates. I don't know if some was selected but for sure the selectionchange event wasn't triggered because of that.
So thank you for the tip (about rounding the coordinates) 😃

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy that we have a solution in the works for this test now. Mostly looks good to me, with a few questions and s/Windws/Windows in the commit message.

test/integration/highlight_editor_spec.mjs Show resolved Hide resolved
test/integration/highlight_editor_spec.mjs Show resolved Hide resolved
@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/78239c26e58b0f3/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/fa6441345a50bbe/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/fa6441345a50bbe/output.txt

Total script time: 9.72 mins

  • Integration Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/78239c26e58b0f3/output.txt

Total script time: 19.96 mins

  • Integration Tests: FAILED

@calixteman
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/72207c8f55103c7/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/394c96f2c8d83ab/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/72207c8f55103c7/output.txt

Total script time: 9.69 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/394c96f2c8d83ab/output.txt

Total script time: 19.64 mins

  • Integration Tests: Passed

Copy link
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with the comments below addressed. Thank you for doing this!

@@ -1811,6 +1815,9 @@ describe("Highlight Editor", () => {
}
Copy link
Contributor

@timvandermeij timvandermeij Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also use Math.round(y) in the line above since y is divided in the loop? That'd also make it equal to the test below.

let y = rect.y + rect.height / 2;
await page.mouse.click(x, y, { count: 3, delay: 100 });
await page.waitForSelector(editorSelector);
await waitForSerialized(page, 1);
await page.keyboard.press("Escape");
await page.waitForSelector(`${editorSelector}:not(.selectedEditor)`);

const clickHandle = await waitForPointerUp(page);
y = rect.y - 3 * rect.height;
await page.mouse.move(x, Math.round(y));
Copy link
Contributor

@timvandermeij timvandermeij Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To increase similarity with the other test updated above in this PR I suggest we move the Math.round call for y here to line 1852 where the actual division happens.

@@ -39,15 +39,21 @@ describe("Text layer", () => {
}

function middlePosition(rect) {
return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 };
return {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked out this patch locally, but unfortunately these changes aren't enough to fix #18774. I'd therefore suggest we remove the changes to this file from this PR and work on this test in a separate PR, to speed up landing this PR first because the highlight test is more important as it fails on the bots.

(I initially thought both issues shared the same root cause after playing around with rounding in getSpanRect, but I should probably have thought about that better before suggesting we try to fix that one too in this PR; sorry for that.)

@Snuffleupagus Snuffleupagus changed the title Fix failing integration test on Windws with Chrome Fix failing integration test on Windows with Chrome Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants