-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
feat: show running builds in the Debug page #25936
Conversation
…vantRunSpecsDataSource
I am still going over the code, but this worked well when I tested it. I did real world testing, against an actual production app where I use Cypress for CT and E2E. I did have to change from and back to the tab to see it update real time - I was just staring at it, expecting it to change - I guess the subscription only triggers if there is a run in progress when you open the page? Watching it real time was really good - I could start debugging my tests (failed ones) without waiting! Very useful. |
@lmiller1990 I saw this when developing but then was not able to reproduce it. I will try this scenario again and see if I can make it happen. |
@astone123 I have also seen this happen. It seems to only happen once for me and then stop acting that way. If you are able to consistently see it, please try to recall the steps you took to get it to happen. |
Feedback from acceptance testing with Product and Design
|
@lmiller1990 I tested again and I think this is just a matter of waiting for the next outer poll to happen which is every 30 seconds. The "outer" poll is the one from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good to me - I'll do a little more testing but the code seems mostly straight forward.
packages/data-context/test/unit/sources/RelevantRunSpecsDataSource.spec.ts
Show resolved
Hide resolved
Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only remaining feedback is that I would like to see a few Percy snapshots added for the new UI behaviors, but that's non-blocking
@@ -147,5 +152,41 @@ describe('RelevantRunsDataSource', () => { | |||
commitsAhead: 0, | |||
}) | |||
}) | |||
|
|||
it('preserves running if switched', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "switching" imply here - when you click on "Change to this run" (or whatever the button says)?
I'm guessing the reason no-one found this edge case in testing was because it was closely related to the timing of when you change runs?
Hope we can find a good way to E2E test this at some point - unit tests do the job, but I imagine it'd be hard to fully grok what this does from a user point of view without an E2E test.
Let's merge it! Asked a question around the latest commit but it's just a question, not a blocker on merging. |
Additional details
Before this update, a developer would have to wait for a run to complete before being able to see the failed tests that may be a part of the run. This change will allow the developer to switch to a running run and see any failed tests as they get recorded to the Cloud run.
Updates
DebugNewRelevantRunBar
Before


After


DebugTestingProgress
componentcompletionScheduledAt
timestampNOTE I have not implemented the "Run Completion Delay" tooltip and indication at the end of the progress bar. I need to review with Product to see if we want to do this in a fast-follow
DebugPendingRunSplash
DebugTestingProgress
componentUpdate
DebugPageHeader
Updated Sidebar badge to show when status of run is RUNNING
Updates to support animating the changing parts of the UI
Debug.vue
to cache and replace the data being passed to theDebugContainer
to make sure the page does not flash when the query is rerunning to update the pageTransition
andTransitionGroup
components to fade components in and outStatsMetadata
to support a "prefix" slot so that the render inDebugSpec
did not render a list (ul
) within another list using incorrect DOMBackend updates
moveToNext
mutation to move to a specific runRelevantRunSpecsDataSource
scheduledToCompleteAt
to know when to switch the page to the "scheduled to complete" stateExtra credit
LayeredBrowserIcons
and added a placeholder. Filed a ticket to get the real icon added.useDurationFormat
to show milliseconds if the duration is less than 1 secondSteps to test
Component tests to review
packages/app/src/debug/DebugContainer.cy.tsx
packages/app/src/debug/DebugNewRelevantRunBar.cy.tsx
packages/app/src/debug/DebugPageHeader.cy.tsx
packages/app/src/debug/DebugPendingRunSplash.cy.tsx
packages/app/src/debug/DebugTestingProgress.cy.tsx
packages/app/src/debug/StatsMetadata.cy.tsx
packages/app/src/navigation/SidebarNavigation.cy.tsx
E2E tests
debug.cy.ts
tests started to fail after including thescheduledToCompleteAt
field in the query fromDebugContainer
. When running locally, the page would thrash between states. I believe the cause was the mocked up responses inpackages/app/cypress/fixtures/debug-Passing/gql-Debug.json
andpackages/app/cypress/fixtures/debug-Failing/gql-Debug.json
not containing this field. Thus, Urql which see that it was not present and requery causing other queries to also rerun. After adding thescheduledToCompleteAt
field, the tests started passing again.Options for real world testing
How has the user experience changed?
See screenshots above
PR Tasks
cypress-documentation
?type definitions
?