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 some flaky ui tests #16430

Merged
merged 5 commits into from
Jun 6, 2024
Merged

Fix some flaky ui tests #16430

merged 5 commits into from
Jun 6, 2024

Conversation

brichet
Copy link
Contributor

@brichet brichet commented Jun 4, 2024

This PR may fix some flaky UI tests.

  • replace some of the deprecated Locator.type() with Locator.fill(), to try to fix some tests writing in the cell input.
    For example test/jupyterlab/notebook-max-outputs.test.ts:37:5 › Don't limit cell outputs if input is requested often fails due to indentation error in cell input.

image

In the screenshot above, the input should not be indented

  • set 'docmanager:open' as async, according to VSCode warning "This may be converted to an async function.ts(80006)".
    Not sure to understand why, but it seems to fix (locally) test/jupyterlab/settings.test.ts:129:7 › change font-size › should Increase Content Font Size and test/jupyterlab/settings.test.ts:129:7 › change font-size › should Decrease Content Font Size, which also often fails withe the following error:

image

References

related to #14947

Code changes

None

User-facing changes

None

Backwards-incompatible changes

None

brichet added 2 commits June 4, 2024 10:27
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@brichet brichet changed the title Galata flaky Fix some flaky ui tests Jun 4, 2024
@brichet brichet marked this pull request as ready for review June 4, 2024 15:59
@krassowski krassowski added this to the 4.2.x milestone Jun 4, 2024
Comment on lines 63 to 65
.pressSequentially(
'Not active\nActive line with >>selected text<<\nNot active'
);
Copy link
Member

Choose a reason for hiding this comment

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

I would expect fill to work here. Does it not?

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 should, yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated it

brichet and others added 2 commits June 4, 2024 22:38
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

Thank you so much for working on it @brichet!

@jtpio
Copy link
Member

jtpio commented Jun 6, 2024

Nice, thanks @brichet!

@jtpio jtpio merged commit 963cbd6 into jupyterlab:main Jun 6, 2024
82 checks passed
@jtpio
Copy link
Member

jtpio commented Jun 6, 2024

@meeseeksdev please backport to 4.2.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyterlab that referenced this pull request Jun 6, 2024
@brichet brichet deleted the galata-flaky branch June 6, 2024 14:01
jtpio pushed a commit that referenced this pull request Jun 7, 2024
Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
ImpSy pushed a commit to spotinst/jupyterlab that referenced this pull request Jan 7, 2025
* Replace deprecated 'Locator.press()' with 'Locator.fill()' or Locator.pressSequentially()'

* Set 'docmanager:open' and 'docmanager:new-untitled' commands as async, to be able to properly await it

* Use to fill the cell content, to avoid backward incompatibility

* Update galata/test/jupyterlab/texteditor.test.ts

Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>

* Use preferably 'Locator.fill()'

---------

Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants