Skip to content

Conversation

@berhalak
Copy link
Contributor

@berhalak berhalak commented Sep 4, 2025

Context

  • webpack-cli package was outdated, which caused webpack-dev-server to fail.
  • projects tests are now added to CI

Related issues

#1811

Has this been tested?

Existing test should pass.

@berhalak berhalak force-pushed the jareks/projects-test-fixes branch from 5b6ab2e to 2b1e26b Compare September 9, 2025 10:04
@paulfitz
Copy link
Member

@berhalak what do you think about the test failure?

@paulfitz
Copy link
Member

paulfitz commented Sep 23, 2025

@berhalak I think I can replicate the failure locally with something like:

MOCHA_WEBDRIVER_SKIP_CLEANUP=1 MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:projects -g "contextMenu"

I think removing MOCHA_WEBDRIVER_SKIP_CLEANUP: 1 from projects run would be the simplest solution. It is there for when mocha is run in parallel mode.

@berhalak berhalak force-pushed the jareks/projects-test-fixes branch from 4daeefe to b1f178f Compare September 26, 2025 08:06
@berhalak
Copy link
Contributor Author

@berhalak I think I can replicate the failure locally with something like:

MOCHA_WEBDRIVER_SKIP_CLEANUP=1 MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:projects -g "contextMenu"

I think removing MOCHA_WEBDRIVER_SKIP_CLEANUP: 1 from projects run would be the simplest solution. It is there for when mocha is run in parallel mode.

Thanks for finding this out @paulfitz! I'm still not happy that this doesn't work for projects (while it does work for nbrowser tests), but couldn't find the reason, and I think this is good as it is.

Copy link
Member

@dsagal dsagal left a comment

Choose a reason for hiding this comment

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

Jumping in while Paul is out. This looks good, and thank you for fixing all those tests! I have a couple minor comments, non-blocking.


describe('UserManager', () => {
setupTestSuite();
gu.bigScreen();
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed? (I always have to adjust when I run such tests locally because bigScreen is bigger than my physical screen)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is. It will fail with the full browser without it. But the size of the window can be adjusted globally (Cyprian already raised that issue before), I will propose a change as a DIFF as more test will be affected.

Copy link
Member

Choose a reason for hiding this comment

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

We do have gu.bigScreen('medium'), and to me that would be a more convenient default. Totally fine to leave as is in this PR.

* Waits until all text in the given input element is selected and the element has focus.
* @param inputSelector Selector for the input element to check selection on.
*/
export async function waitForSelection(inputSelector: string) {
Copy link
Member

Choose a reason for hiding this comment

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

Might it be better to keep in "ColorSelect", since it's rather specific to the needs of that test? If you'd rather expose it here for other purposes, then I think it needs a clearer name, since "selection" is used for several different things in our tests (like cell ranges, or selected menu items). Maybe "waitForInputFullSelection"? It could also accept a WebElement, for better generality (you can pass one to executeScript, e.g. as for scrollIntoView)

@berhalak berhalak merged commit f1d9cc3 into main Sep 30, 2025
15 checks passed
@berhalak berhalak deleted the jareks/projects-test-fixes branch September 30, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants