Skip to content
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

start example vm #2297

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading