Skip to content

Commit

Permalink
start example vm
Browse files Browse the repository at this point in the history
  • Loading branch information
gouyang committed Dec 3, 2024
1 parent c0b910f commit 3b4bac6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
29 changes: 27 additions & 2 deletions cypress/tests/e2e/check-tab-yaml.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { Example, WithYAML } from '../../utils/const/string';
import { TEMPLATE } from '../../utils/const/template';
import { breadcrumb, itemCreateBtn, nameFilter, saveBtn } from '../../views/selector';
import {
breadcrumb,
iconStartBtn,
itemCreateBtn,
nameFilter,
saveBtn,
vmStatusOnOverview,
} from '../../views/selector';
import { tab } from '../../views/tab';

describe('Check all virtualization pages can be loaded', () => {
Expand All @@ -19,6 +26,24 @@ describe('Check all virtualization pages can be loaded', () => {
cy.get(saveBtn).click();
});

it('start example vm', () => {
cy.get(iconStartBtn).click();
cy.wait(15000);
});

it(
'check the status of example vm',
{
retries: {
runMode: 8,
},
},
() => {
cy.contains(vmStatusOnOverview, 'Running').should('be.visible');
cy.wait(10000);
},
);

it('vm tabs are loaded', () => {
cy.contains('Machine type').should('be.visible');

Expand All @@ -32,7 +57,7 @@ describe('Check all virtualization pages can be loaded', () => {
cy.contains('event').should('be.visible');

tab.navigateToConsole();
cy.contains('This VirtualMachine is down').should('be.visible');
cy.contains('Guest login credentials').should('be.visible');

// skip the test due to error happens on this page
// tab.navigateToSnapshots();
Expand Down
1 change: 1 addition & 0 deletions cypress/views/selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const vmStatusOnOverview = '[data-test-id="virtual-machine-overview-detai
export const itemCreateBtn = '[data-test="item-create"]';
export const saveBtn = '[data-test="save-changes"]';
export const vmActionStart = '[data-test-id="vm-action-start"]';
export const iconStartBtn = '[data-test-id="vm-action-start-button"]';
export const virtualizationNav = '[data-test-id="virtualization-nav-item"]';
export const overviewNav = '[data-test-id="virtualization-overview-nav-item"]';
export const catalogNav = '[data-test-id="virtualization-catalog-nav-item"]';
Expand Down

0 comments on commit 3b4bac6

Please sign in to comment.