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 the "must check that a value is correctly updated on a field and its siblings" scripting integration test #18624

Merged

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Aug 18, 2024

This integration test fails intermittently because we cache the initial total value to be able to compare it to the new total value at the end of the test to check that it's different before doing the assertions. However, this doesn't work as expected because the second clearInput call triggers an intermediate total value calculation because it clicks on another input field and that triggers a sandbox event.

This results in the waitForFunction calls always resolving immediately and since we don't use other means of waiting until the calculation is done (using e.g. waitForSandboxTrip) we basically rely on the time between the final click and the assertions to be enough for the sandbox to do its work. If it's is not done in that time, we do the assertions with older values and that makes the test fail.

This commit fixes the issue by simply waiting for the total value to be what we expect it to be. This requires less code, is more consistent with the other integration tests and removes the possibility of doing assertions against older values.

Fixes a part of #18396.

…its siblings" scripting integration test

This integration test fails intermittently because we cache the initial
total value to be able to compare it to the new total value at the end
of the test to check that it's different before doing the assertions.
However, this doesn't work as expected because the second `clearInput`
call triggers an intermediate total value calculation because it clicks
on another input field and that triggers a sandbox event.

This results in the `waitForFunction` calls always resolving immediately
and since we don't use other means of waiting until the calculation is
done (using e.g. `waitForSandboxTrip`) we basically rely on the time
between the final click and the assertions to be enough for the sandbox
to do its work. If it's is not done in that time, we do the assertions
with older values and that makes the test fail.

This commit fixes the issue by simply waiting for the total value to be
what we expect it to be. This requires less code, is more consistent
with the other integration tests and removes the possibility of doing
assertions against older values.
@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/726187eaf121414/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/726187eaf121414/output.txt

Total script time: 8.65 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

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

Total script time: 20.59 mins

  • Integration Tests: Passed

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@timvandermeij timvandermeij merged commit 88ea60d into mozilla:master Aug 19, 2024
6 checks passed
@timvandermeij timvandermeij deleted the intermittent-scripting-siblings branch August 19, 2024 17:04
@timvandermeij timvandermeij removed the request for review from Snuffleupagus August 19, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants