test: update first app as azure-openai
This commit is contained in:
@@ -11,7 +11,9 @@ test.describe('Apps page', () => {
|
|||||||
await applicationsPage.page.getByTestId('apps-loader').waitFor({
|
await applicationsPage.page.getByTestId('apps-loader').waitFor({
|
||||||
state: 'detached',
|
state: 'detached',
|
||||||
});
|
});
|
||||||
await expect(applicationsPage.page.getByTestId('app-row')).not.toHaveCount(0);
|
await expect(applicationsPage.page.getByTestId('app-row')).not.toHaveCount(
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
await applicationsPage.screenshot({
|
await applicationsPage.screenshot({
|
||||||
path: 'Applications.png',
|
path: 'Applications.png',
|
||||||
@@ -22,27 +24,31 @@ test.describe('Apps page', () => {
|
|||||||
test.beforeEach(async ({ applicationsPage }) => {
|
test.beforeEach(async ({ applicationsPage }) => {
|
||||||
await expect(applicationsPage.addConnectionButton).toBeClickableLink();
|
await expect(applicationsPage.addConnectionButton).toBeClickableLink();
|
||||||
await applicationsPage.addConnectionButton.click();
|
await applicationsPage.addConnectionButton.click();
|
||||||
await applicationsPage
|
await applicationsPage.page
|
||||||
.page
|
|
||||||
.getByTestId('search-for-app-loader')
|
.getByTestId('search-for-app-loader')
|
||||||
.waitFor({ state: 'detached' });
|
.waitFor({ state: 'detached' });
|
||||||
});
|
});
|
||||||
|
|
||||||
test('lists applications', async ({ applicationsPage }) => {
|
test('lists applications', async ({ applicationsPage }) => {
|
||||||
const appListItemCount = await applicationsPage.page.getByTestId('app-list-item').count();
|
const appListItemCount = await applicationsPage.page
|
||||||
|
.getByTestId('app-list-item')
|
||||||
|
.count();
|
||||||
expect(appListItemCount).toBeGreaterThan(10);
|
expect(appListItemCount).toBeGreaterThan(10);
|
||||||
|
|
||||||
await applicationsPage.clickAway();
|
await applicationsPage.clickAway();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('searches an application', async ({ applicationsPage }) => {
|
test('searches an application', async ({ applicationsPage }) => {
|
||||||
await applicationsPage.page.getByTestId('search-for-app-text-field').fill('DeepL');
|
await applicationsPage.page
|
||||||
await applicationsPage
|
.getByTestId('search-for-app-text-field')
|
||||||
.page
|
.fill('DeepL');
|
||||||
|
await applicationsPage.page
|
||||||
.getByTestId('search-for-app-loader')
|
.getByTestId('search-for-app-loader')
|
||||||
.waitFor({ state: 'detached' });
|
.waitFor({ state: 'detached' });
|
||||||
|
|
||||||
await expect(applicationsPage.page.getByTestId('app-list-item')).toHaveCount(1);
|
await expect(
|
||||||
|
applicationsPage.page.getByTestId('app-list-item')
|
||||||
|
).toHaveCount(1);
|
||||||
|
|
||||||
await applicationsPage.clickAway();
|
await applicationsPage.clickAway();
|
||||||
});
|
});
|
||||||
@@ -54,8 +60,12 @@ test.describe('Apps page', () => {
|
|||||||
test.setTimeout(60000);
|
test.setTimeout(60000);
|
||||||
|
|
||||||
await applicationsPage.page.getByTestId('app-list-item').first().click();
|
await applicationsPage.page.getByTestId('app-list-item').first().click();
|
||||||
await expect(applicationsPage.page).toHaveURL('/app/carbone/connections/add?shared=false');
|
await expect(applicationsPage.page).toHaveURL(
|
||||||
await expect(applicationsPage.page.getByTestId('add-app-connection-dialog')).toBeVisible();
|
'/app/azure-openai/connections/add?shared=false'
|
||||||
|
);
|
||||||
|
await expect(
|
||||||
|
applicationsPage.page.getByTestId('add-app-connection-dialog')
|
||||||
|
).toBeVisible();
|
||||||
|
|
||||||
await applicationsPage.clickAway();
|
await applicationsPage.clickAway();
|
||||||
});
|
});
|
||||||
@@ -64,11 +74,19 @@ test.describe('Apps page', () => {
|
|||||||
applicationsPage,
|
applicationsPage,
|
||||||
}) => {
|
}) => {
|
||||||
await applicationsPage.page.getByTestId('app-list-item').first().click();
|
await applicationsPage.page.getByTestId('app-list-item').first().click();
|
||||||
await expect(applicationsPage.page).toHaveURL('/app/carbone/connections/add?shared=false');
|
await expect(applicationsPage.page).toHaveURL(
|
||||||
await expect(applicationsPage.page.getByTestId('add-app-connection-dialog')).toBeVisible();
|
'/app/azure-openai/connections/add?shared=false'
|
||||||
|
);
|
||||||
|
await expect(
|
||||||
|
applicationsPage.page.getByTestId('add-app-connection-dialog')
|
||||||
|
).toBeVisible();
|
||||||
await applicationsPage.clickAway();
|
await applicationsPage.clickAway();
|
||||||
await expect(applicationsPage.page).toHaveURL('/app/carbone/connections');
|
await expect(applicationsPage.page).toHaveURL(
|
||||||
await expect(applicationsPage.page.getByTestId('add-app-connection-dialog')).toBeHidden();
|
'/app/azure-openai/connections'
|
||||||
|
);
|
||||||
|
await expect(
|
||||||
|
applicationsPage.page.getByTestId('add-app-connection-dialog')
|
||||||
|
).toBeHidden();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user