forked from rancher/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vue3 fix workload storage (rancher#12070)
* 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
- Loading branch information
1 parent
3e89716
commit f28214f
Showing
14 changed files
with
325 additions
and
136 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import LabeledSelectPo from '@/cypress/e2e/po/components/labeled-select.po'; | ||
|
||
export default class ButtonDropdownPo extends LabeledSelectPo { | ||
toggle() { | ||
return this.self().find('[data-testid="dropdown-button"]').click(); | ||
} | ||
} |
This file contains 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
This file contains 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
37 changes: 37 additions & 0 deletions
37
cypress/e2e/po/components/workloads/container-mount-paths.po.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import ComponentPo from '@/cypress/e2e/po/components/component.po'; | ||
import ButtonDropdownPo from '@/cypress/e2e/po/components/button-dropdown.po'; | ||
import InputPo from '@/cypress/e2e/po/components/input.po'; | ||
|
||
class ContainerMountPo extends ComponentPo { | ||
constructor(selector = '.dashboard-root') { | ||
super(selector); | ||
} | ||
|
||
nthMountPoint(i: number) { | ||
return new InputPo(`[data-testid="mount-path-${ i }"] input:first-child`); | ||
} | ||
} | ||
|
||
export default class ContainerMountPathPo extends ComponentPo { | ||
constructor(selector = '.dashboard-root') { | ||
super(selector); | ||
} | ||
|
||
addVolumeButton() : ButtonDropdownPo { | ||
// return this.self().find('[data-testid="container-storage-add-button"]'); | ||
return new ButtonDropdownPo('[data-testid="container-storage-add-button"]'); | ||
} | ||
|
||
addVolume(label: string) { | ||
this.addVolumeButton().toggle(); | ||
this.addVolumeButton().clickOptionWithLabel(label); | ||
} | ||
|
||
nthVolumeMount(i: number): ContainerMountPo { | ||
return new ContainerMountPo(`[data-testid="container-storage-mount-${ i }"]`); | ||
} | ||
|
||
removeVolume(i: number) { | ||
this.self().find(`[data-testid="container-storage-array-list"] [data-testid="remove-item-${ i }"]`).click(); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import ComponentPo from '@/cypress/e2e/po/components/component.po'; | ||
import CodeMirrorPo from '@/cypress/e2e/po/components/code-mirror.po'; | ||
|
||
class WorkloadVolumePo extends ComponentPo { | ||
yamlEditor(): CodeMirrorPo { | ||
return CodeMirrorPo.bySelector(this.self(), '[data-testid="yaml-editor-code-mirror"]'); | ||
} | ||
} | ||
|
||
export default class WorkloadPodStoragePo extends ComponentPo { | ||
constructor(selector = '.dashboard-root') { | ||
super(selector); | ||
} | ||
|
||
nthVolumeComponent(n: number) { | ||
return new WorkloadVolumePo(`[data-testid="volume-component-${ n }"]`); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import CodeMirrorPo from '@/cypress/e2e/po/components/code-mirror.po'; | ||
import ComponentPo from '@/cypress/e2e/po/components/component.po'; | ||
|
||
export default class YamlEditorPo extends ComponentPo { | ||
input(): CodeMirrorPo { | ||
return CodeMirrorPo.bySelector(this.self(), '[data-testid="yaml-editor-code-mirror"]'); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.