az-hop/tests/cyclecloud_home.spec.ts

41 строка
1.3 KiB
TypeScript
Исходник Постоянная ссылка Обычный вид История

2021-12-17 16:25:58 +03:00
import {test, expect} from '@playwright/test';
2023-05-30 17:49:14 +03:00
import azhopConfig from './azhop.config';
2021-12-17 16:25:58 +03:00
test('CycleCloud', async ({browser}) => {
// create context with HTTP credentials
const context = await browser.newContext();
// Open CycleCloud
const page = await context.newPage();
await page.goto('/', { waitUntil: 'networkidle' });
await page.getByRole('button', { name: 'Monitoring' }).click();
const page1Promise = page.waitForEvent('popup');
await page.getByRole('link', { name: 'Azure CycleCloud' }).click();
const page1 = await page1Promise;
2021-12-17 16:25:58 +03:00
2023-05-30 17:49:14 +03:00
// Read the queue manager from the config file
switch (azhopConfig.queue_manager) {
case 'slurm':
await page1.getByRole('tab', { name: 'slurm1' }).click();
2023-05-30 17:49:14 +03:00
break;
case 'openpbs':
await page1.getByRole('tab', { name: 'pbs1' }).click();
2023-05-30 17:49:14 +03:00
break;
}
await page1.waitForLoadState('networkidle');
2021-12-17 16:25:58 +03:00
// Click text=Arrays
await page1.click('text=Arrays');
await page1.click('#CloudStatus-NodeArraysTable-tbody >> text=htc');
2021-12-17 16:25:58 +03:00
// Click text=Activity
await page1.click('text=Activity');
2021-12-17 16:25:58 +03:00
// Click text=Monitoring
2022-04-12 18:05:19 +03:00
//await page.click('text=Monitoring');
2021-12-17 16:25:58 +03:00
await page1.close()
2021-12-17 16:25:58 +03:00
// Close the browser
await context.close();
});