Skip to content

Commit

Permalink
Fix VM errors
Browse files Browse the repository at this point in the history
  • Loading branch information
n313893254 authored and noahgildersleeve committed Jul 6, 2022
1 parent 9e74266 commit 2ff6ce6
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 15 deletions.
1 change: 1 addition & 0 deletions cypress/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default defineConfig({
url: 'https://download.opensuse.org/pub/opensuse/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-15.3-OpenStack-Cloud-Current.qcow2',
},
nfsEndPoint: 'nfs://ip',
vlans: ['[vlan name1]', '[vlan name2]'],
},
retries: {
runMode: 1,
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobjects/image.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ImagePage {
private pageHead = 'main .outlet header h1';

name() {
return new LabeledInputPo('.namespace-select > .labeled-input', `:contains("Name")`)
return new LabeledInputPo('.span-3 > .labeled-input', `:contains("Name")`)
}

url() {
Expand Down
11 changes: 2 additions & 9 deletions cypress/pageobjects/virtualmachine.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,10 @@ export class VmsPage extends CruResourcePo {
cy.url().should('contain', 'as=config')
}

goToYamlDetail(name: string) {
goToYamlEdit(name: string) {
this.goToList();
cy.get('.search').type(name)
const vm = cy.contains(name)
expect(vm.should('be.visible'))
vm.click()

const config = cy.get('.masthead button').contains('YAML')
expect(config.should('be.visible'));
config.click()
cy.url().should('contain', 'as=yaml')
this.clickAction(name, 'Edit YAML')
}

public init() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/testcases/image/images.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ describe('Update image labels after deleting source VM', () => {

// // check VM state
// vms.goToConfigDetail(VM_NAME);
// vms.goToYamlDetail(VM_NAME);
// vms.goToYamlEdit(VM_NAME);

// // delete VM
// vms.delete(VM_NAME)
Expand Down
2 changes: 1 addition & 1 deletion cypress/testcases/virtualmachines/advanced.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Create a new VM and add Enable USB tablet option', () => {

cy.intercept('GET', `/apis/kubevirt.io/v1/namespaces/*/virtualmachines/${VM_NAME}`).as('vmDetail');

vms.goToYamlDetail(VM_NAME);
vms.goToYamlEdit(VM_NAME);

cy.wait('@vmDetail').then(res => {
expect(res.response?.statusCode).to.equal(200);
Expand Down
2 changes: 1 addition & 1 deletion cypress/testcases/virtualmachines/virtual-machine.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Create a vm with all the default values', () => {

vms.goToConfigDetail(VM_NAME);

vms.goToYamlDetail(VM_NAME);
vms.goToYamlEdit(VM_NAME);

vms.delete(namespace, VM_NAME)
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/utils/components/cru-resource.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class CruResourcePo extends PagePo {
}

name() {
return new LabeledInputPo('.namespace-select > .labeled-input', `:contains("Name")`)
return new LabeledInputPo('.span-3 >.labeled-input', `:contains("Name")`)
}

description() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/utils/components/labeled-input.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ComponentPo from './component.po';
export default class LabeledInputPo extends ComponentPo {
input(string: string | undefined) {
if (string) {
this.self().find('input').clear()
this.self().find('input').clear({force: true})
this.self().type(string)
}

Expand Down

0 comments on commit 2ff6ce6

Please sign in to comment.