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();
|
2023-08-08 14:13:22 +03:00
|
|
|
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':
|
2023-08-08 14:13:22 +03:00
|
|
|
await page1.getByRole('tab', { name: 'slurm1' }).click();
|
2023-05-30 17:49:14 +03:00
|
|
|
break;
|
|
|
|
case 'openpbs':
|
2023-08-08 14:13:22 +03:00
|
|
|
await page1.getByRole('tab', { name: 'pbs1' }).click();
|
2023-05-30 17:49:14 +03:00
|
|
|
break;
|
|
|
|
}
|
2023-08-08 14:13:22 +03:00
|
|
|
await page1.waitForLoadState('networkidle');
|
2021-12-17 16:25:58 +03:00
|
|
|
// Click text=Arrays
|
2023-08-08 14:13:22 +03:00
|
|
|
await page1.click('text=Arrays');
|
2023-10-21 11:32:45 +03:00
|
|
|
await page1.click('#CloudStatus-NodeArraysTable-tbody >> text=htc');
|
2021-12-17 16:25:58 +03:00
|
|
|
|
|
|
|
// Click text=Activity
|
2023-08-08 14:13:22 +03:00
|
|
|
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
|
|
|
|
2023-08-08 14:13:22 +03:00
|
|
|
await page1.close()
|
2021-12-17 16:25:58 +03:00
|
|
|
|
|
|
|
// Close the browser
|
|
|
|
await context.close();
|
|
|
|
});
|