Skip to content

Commit

Permalink
Align kubevirt tests with ux changes, fix teardown in environment tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Radim Hrazdil committed Jun 9, 2020
1 parent ab42522 commit e08b9e0
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 202 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,26 @@ export class DiskDialog {
}
}

async selectAdvancedOptions(advancedOptions) {
if (advancedOptions) {
await this.openAdvancedSettingsDrawer();

if (advancedOptions.accessMode) {
await this.selectAccessMode(advancedOptions.accessMode);
}

if (advancedOptions.volumeMode) {
await this.selectVolumeMode(advancedOptions.volumeMode);
}
}
}

async openAdvancedSettingsDrawer() {
if (await view.advancedDrawerToggle.isPresent()) {
await click(view.advancedDrawerToggle);
if ((await view.advancedDrawerToggle.getAttribute('aria-expanded')) === 'false') {
// Only click the Advanced button if it isn't already expanded
await click(view.advancedDrawerToggle);
}
}
}

Expand Down Expand Up @@ -104,19 +121,7 @@ export class DiskDialog {
if (disk.size) {
await this.fillSize(disk.size);
}

if (disk.accessMode || disk.volumeMode) {
await this.openAdvancedSettingsDrawer();

if (disk.accessMode) {
await this.selectAccessMode(disk.accessMode);
}

if (disk.volumeMode) {
await this.selectVolumeMode(disk.volumeMode);
}
}

await this.selectAdvancedOptions(disk.advanced);
await click(saveButton);
await waitForNoLoaders();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const KUBEVIRT_STORAGE_CLASS_DEFAULTS = 'kubevirt-storage-class-defaults'
export const KUBEVIRT_PROJECT_NAME = 'openshift-cnv';

export const commonTemplateVersion = () => rhelTinyCommonTemplateName.match(/v\d+\.\d+\.\d+/)[0];
export const INNER_TEMPLATE_VERSION = 'v0.9.1';
export const INNER_TEMPLATE_VERSION = 'v0.11.0';

export const COMMON_TEMPLATES_NAMESPACE = 'openshift';
export const COMMON_TEMPLATES_REVISION = '1';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@ set password_prompt "Password: "
set prompt "$"

set response_delay 3
set timeout 10
set send_human {.1 .3 1 .05 2}

set source_path1 "/home/fedora/source1"
set source_path2 "/home/fedora/source2"
set source_path3 "/home/fedora/source3"

spawn virtctl console $vm_name -n $vm_namespace
spawn virtctl console $vm_name -n $vm_namespace --timeout 7

send -h "\n"

sleep 1
sleep 3

send -h \004

set timeout 300

# Enter username
expect $login_prompt {
sleep $response_delay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ export type StorageResource = {
size?: string;
storageClass: string;
interface: string;
volumeMode?: string;
accessMode?: string;
advanced?: {
volumeMode?: string;
accessMode?: string;
};
sourceConfig?: DiskSourceConfig;
source?: DISK_SOURCE;
};
Expand Down

0 comments on commit e08b9e0

Please sign in to comment.