Skip to content

Conversation

timvandermeij
Copy link
Contributor

The commit messages contain more information about the individual changes.

@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/e4b49f80e27d9af/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/15189469c37f312/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/15189469c37f312/output.txt

Total script time: 14.54 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

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

Total script time: 31.38 mins

  • Integration Tests: Passed

await page.waitForFunction(
`document.querySelector("[data-annotation-id='25R']").hidden === false`
`document.querySelector('${selector}').hidden === false`
Copy link
Contributor

Choose a reason for hiding this comment

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

In cases like this, it would be better to do

Suggested change
`document.querySelector('${selector}').hidden === false`
`document.querySelector(${JSON.stringify(selector)}).hidden === false`

so that JSON.stringify takes care of properly handling quotes. Otherwise we need to rely on the "implementation detail" that getAnnotationSelector returns a string containing " and no '.

Copy link
Contributor Author

@timvandermeij timvandermeij Aug 19, 2025

Choose a reason for hiding this comment

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

Good point. I agree that relying on the quoting in getAnnotationSelector is not optimal, but while the JSON.stringify approach works for the case where we only have a single selector I don't yet see how this can work for cases like document.querySelector('${selector} > :first-child').checked where the selector is the inner part of a bigger string, as the surrounding string will still need quotes that aren't equal to the inner ones. From the console:

> const selector = '[data-annotation-id="7R"]';
> `document.querySelector(JSON.stringify("${selector} > :first-child")).checked`  
  'document.querySelector(JSON.stringify("[data-annotation-id="7R"] > :first-child")).checked' 
> document.querySelector(JSON.stringify("[data-annotation-id="7R"] > :first-child")).checked'
  Uncaught SyntaxError: identifier starts immediately after numeric literal

In this case we'd still need to know that the surrounding quotes need to be single quotes. I'm probably missing something here, but how would we handle such cases with this approach?

@timvandermeij timvandermeij force-pushed the misc-test-improvements branch 2 times, most recently from 35aa389 to 04eb081 Compare August 23, 2025 20:04
@timvandermeij timvandermeij force-pushed the misc-test-improvements branch 2 times, most recently from d5e59f0 to b4367f0 Compare August 25, 2025 19:37
@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@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/9d7197f7ba2fa30/output.txt

@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/eee4754c646368f/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/9d7197f7ba2fa30/output.txt

Total script time: 18.54 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

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

Total script time: 39.69 mins

  • Integration Tests: FAILED

@timvandermeij timvandermeij force-pushed the misc-test-improvements branch 2 times, most recently from 8b139d1 to 8e988d3 Compare August 31, 2025 16:15
This test called `closeSinglePage` manually at the end of the test,
which is inconsistent with all other tests that call `closePages` in an
`afterEach` block. This commit fixes the difference for consistency.
…on test code

The helper function was used in a number of places, but also a lot of
places contained the annotation selector string inline. This commit
makes sure that all places use `getAnnotationSelector` consistently to
make sure the annotation selector string is only defined in a single
place and to improve readability of the test code.
Most places have a newline before/after `before{Each,All}`,
`after{Each,All}` and `it` to visually separate the blocks for clarity,
but in a handful of places this wasn't done. This commit removes the
inconsistencies so that the test code is formatted consistently.
@timvandermeij timvandermeij force-pushed the misc-test-improvements branch from 8e988d3 to 6d482be Compare August 31, 2025 16:57
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