frontend: Fix frontend tests after rebase - #331
Merged
René Dudfield (illume) merged 4 commits intoFeb 26, 2026
Conversation
Copilot started reviewing on behalf of
Oleksandr Dubenko (sniok)
February 26, 2026 17:13
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes test failures that occurred after rebasing with upstream changes. The changes address three main areas: updated expectations for plugin identification tests, more deterministic snapshot generation for EmptyContent, and refactored LogsButton tests to match upstream changes that now use Pod.useList instead of direct API calls.
Changes:
- Updated
identifyPackagestest expectations to include theaks-desktoppackage status in all test cases - Changed
EmptyContentcomponent to usesetTimeoutinstead ofrequestAnimationFramefor more deterministic snapshot generation - Refactored
LogsButtontests to mockPod.useListstatic method, aligning with upstream changes to the LogsViewer implementation - Updated snapshots for EmptyContent-based components to reflect the more deterministic rendering behavior
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/plugin/runPlugin.test.ts | Updated test expectations to include aks-desktop package status alongside @headlamp-k8s/minikube |
| frontend/src/components/common/EmptyContent.tsx | Changed from requestAnimationFrame to setTimeout for more deterministic test snapshots |
| frontend/src/components/common/Resource/LogsButton.test.tsx | Refactored to mock Pod.useList static method, updated test descriptions and assertions to match new upstream implementation |
| frontend/src/components/common/snapshots/EmptyContent.WithMultipleChildren.stories.storyshot | Updated snapshot to show rendered content from EmptyContent timing change |
| frontend/src/components/App/Settings/snapshots/SettingsClusters.NullClusterState.stories.storyshot | Updated snapshot to show rendered content from EmptyContent timing change |
| frontend/src/components/App/Settings/snapshots/SettingsClusters.EmptyClusterList.stories.storyshot | Updated snapshot to show rendered content from EmptyContent timing change |
| frontend/src/components/App/PluginSettings/snapshots/PluginSettings.Empty.stories.storyshot | Updated snapshot to show rendered content from EmptyContent timing change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
Looks like i18n check is failing.
Apps failures... I merged the other PR for fixing them. |
Oleksandr Dubenko (sniok)
force-pushed
the
fix-frontend-tests
branch
from
February 26, 2026 20:20
d05ca53 to
4347a53
Compare
René Dudfield (illume)
approved these changes
Feb 26, 2026
René Dudfield (illume)
left a comment
Collaborator
There was a problem hiding this comment.
🎉 thanks!
René Dudfield (illume)
merged commit Feb 26, 2026
02feb87
into
Azure:headlamp-downstream
11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes various test failures after rebasing
EmptyContent is now generating more deterministic snapshots, updated those
LogsButton test from upstream was fixed because we have modified logs in aks-desktop
runPlugin test was failing because aks-desktop value was missing