-
Notifications
You must be signed in to change notification settings - Fork 261
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
Vue3 fix workload storage #12070
Vue3 fix workload storage #12070
Conversation
@@ -22,7 +22,9 @@ export default class LabeledSelectPo extends ComponentPo { | |||
} | |||
|
|||
clickLabel(label: string) { | |||
return this.getOptions().contains('li', label).click(); | |||
const labelRegex = new RegExp(`^${ label } $`, 'g'); |
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 caused issues for me when running tests locally because it'd match any dropdown option containing the label provided, eg clickLabel('default')
might select an option labeled cluster-fleet-default-c-9jtrc-35cc406cb29a
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.
Was it only happening locally? if so, any idea why? I think I may have run into something similar.
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.
I've only seen it locally, I'm guessing when the test runs in ci there aren't other namespaces containing default
available. There are probably other po methods that are using .contains without a regular expression and brittle in the same way though.
@@ -10,7 +10,7 @@ export default class TabbedPo extends ComponentPo { | |||
} | |||
|
|||
clickTabWithSelector(selector: string) { | |||
return this.self().get(`${ selector }`).click(); | |||
return this.self().find(`${ selector }`).click(); |
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.
Switching from get
to find
ensures we click the right tab when the page has multiple tab groups with the same tabs
// }, | ||
// need to refresh codemirror when the tab is opened and hash change === tab change | ||
watch: { | ||
'$route.hash': { |
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.
Tabs emit events when they're clicked, which is usually how codemirror refreshes are triggered in the dashboard. However; watching route.hash here saves us having to call refresh from 3 components up, where the tabs live in this case.
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.
} | ||
|
||
addVolumeButton() : ButtonDropdownPo { | ||
// return this.self().find('[data-testid="container-storage-add-button"]'); |
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.
aside from this dead code, everything lgtm from e2e test perspective
* fix workload storage codemirror not rendering * workload storage default component yamleditor instead of codemirror * test editing projected vols * add container mount test * fix lint * refactor deployment tests to improve retry-ability * add to workoad storage tests and improve retry
Summary
Fixes #11957
Fixes #12020
Occurred changes and/or fixed issues
This PR includes a few fixes for pod and container storage.
Technical notes summary
#11957 - corrected issue with codemirror not rendering
#12020 - fixed issue with slot content not rendering + issues with prop mutation in ContainerMountPaths
Areas or cases that should be tested
You will need a deployment with a projected volume defined to test #11957
sample workload
Screenshot/Video
Screen.Recording.2024-09-30.at.8.02.48.AM.mov
Checklist