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

First pass audit of the playwright tests #1871

Merged
merged 10 commits into from
Feb 13, 2025
Merged

First pass audit of the playwright tests #1871

merged 10 commits into from
Feb 13, 2025

Conversation

ryan-pratt
Copy link
Contributor

@ryan-pratt ryan-pratt commented Jan 31, 2025

Went through all the tests, fixed some reliability issues and things the LSP was mad about, and made sure each individual test is runnable on its own in preparation for parallelization

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.46%. Comparing base (d9b0bda) to head (0c735b0).
Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1871   +/-   ##
=======================================
  Coverage   79.46%   79.46%           
=======================================
  Files         523      523           
  Lines       40918    40926    +8     
=======================================
+ Hits        32514    32522    +8     
  Misses       8404     8404           
Flag Coverage Δ
ruby-api 48.45% <ø> (ø)
ruby-backend 82.56% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

await utils.sleep(100)
await page.locator('[data-test=file-open-save-search]').type('nect')
await page.locator('[data-test=file-open-save-search] input').fill('nect')
await utils.sleep(100)
Copy link
Member

Choose a reason for hiding this comment

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

The idea here was to type it like the user would which is what the incremental type with delay is. But I see in the script-runner/api.spec that you just removed it all and did a simple fill. If that works here great.

await utils.sleep(100)
await page.locator('[data-test=file-open-save-search]').type('data')
await page.locator('[data-test=file-open-save-search] input').fill('data')
await utils.sleep(100)
Copy link
Member

Choose a reason for hiding this comment

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

Same here with the typing and sleep.

@@ -161,12 +166,12 @@ test('loads Suite controls when opening a suite', async ({ page, utils }) => {
await page.locator('[data-test=script-runner-file]').click()
await page.locator('text=Open File').click()
await utils.sleep(1000)
await page.locator('[data-test=file-open-save-search]').type('dis')
await page.locator('[data-test=file-open-save-search] input').fill('dis')
Copy link
Member

Choose a reason for hiding this comment

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

Is type deprecated?

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 according to my LSP, but I can't find that reflected in their documentation exactly... they just say you should avoid it: https://playwright.dev/docs/input#type-characters

@@ -145,23 +173,36 @@ test('shrinks and expands a graph height', async ({ page, utils }) => {
test('shrinks and expands both width and height', async ({ page, utils }) => {
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 a bunch of shrink and expand tests but I'd like to see you add a grid layout and prove we can put 4 in a grid pattern.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's on my to-do list. I'll add new tests and improve coverage in a later PR once parallelization is working

@ryan-pratt ryan-pratt changed the title First pass audit of most of the playwright tests First pass audit of the playwright tests Feb 12, 2025
@ryan-pratt ryan-pratt marked this pull request as ready for review February 12, 2025 20:11
Copy link
Member

@ryanmelt ryanmelt left a comment

Choose a reason for hiding this comment

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

Investigate playwright test that file in most recent run.

@ryan-pratt
Copy link
Contributor Author

The bucket explorer test is failing consistently, so I'm going to hold off on merging until I figure that out. I think the app is running too slowly to generate enough logs, so the test probably needs to wait longer

@ryan-pratt
Copy link
Contributor Author

Note: python unit tests fixed in #1898

@ryan-pratt ryan-pratt merged commit 92b60ed into main Feb 13, 2025
28 of 30 checks passed
@ryan-pratt ryan-pratt deleted the playwright branch February 13, 2025 19:09
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.

3 participants