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({
|
||||
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({
|
||||
path: 'Applications.png',
|
||||
@@ -22,27 +24,31 @@ test.describe('Apps page', () => {
|
||||
test.beforeEach(async ({ applicationsPage }) => {
|
||||
await expect(applicationsPage.addConnectionButton).toBeClickableLink();
|
||||
await applicationsPage.addConnectionButton.click();
|
||||
await applicationsPage
|
||||
.page
|
||||
await applicationsPage.page
|
||||
.getByTestId('search-for-app-loader')
|
||||
.waitFor({ state: 'detached' });
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
await applicationsPage.clickAway();
|
||||
});
|
||||
|
||||
test('searches an application', async ({ applicationsPage }) => {
|
||||
await applicationsPage.page.getByTestId('search-for-app-text-field').fill('DeepL');
|
||||
await applicationsPage
|
||||
.page
|
||||
await applicationsPage.page
|
||||
.getByTestId('search-for-app-text-field')
|
||||
.fill('DeepL');
|
||||
await applicationsPage.page
|
||||
.getByTestId('search-for-app-loader')
|
||||
.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();
|
||||
});
|
||||
@@ -54,8 +60,12 @@ test.describe('Apps page', () => {
|
||||
test.setTimeout(60000);
|
||||
|
||||
await applicationsPage.page.getByTestId('app-list-item').first().click();
|
||||
await expect(applicationsPage.page).toHaveURL('/app/carbone/connections/add?shared=false');
|
||||
await expect(applicationsPage.page.getByTestId('add-app-connection-dialog')).toBeVisible();
|
||||
await expect(applicationsPage.page).toHaveURL(
|
||||
'/app/azure-openai/connections/add?shared=false'
|
||||
);
|
||||
await expect(
|
||||
applicationsPage.page.getByTestId('add-app-connection-dialog')
|
||||
).toBeVisible();
|
||||
|
||||
await applicationsPage.clickAway();
|
||||
});
|
||||
@@ -64,11 +74,19 @@ test.describe('Apps page', () => {
|
||||
applicationsPage,
|
||||
}) => {
|
||||
await applicationsPage.page.getByTestId('app-list-item').first().click();
|
||||
await expect(applicationsPage.page).toHaveURL('/app/carbone/connections/add?shared=false');
|
||||
await expect(applicationsPage.page.getByTestId('add-app-connection-dialog')).toBeVisible();
|
||||
await expect(applicationsPage.page).toHaveURL(
|
||||
'/app/azure-openai/connections/add?shared=false'
|
||||
);
|
||||
await expect(
|
||||
applicationsPage.page.getByTestId('add-app-connection-dialog')
|
||||
).toBeVisible();
|
||||
await applicationsPage.clickAway();
|
||||
await expect(applicationsPage.page).toHaveURL('/app/carbone/connections');
|
||||
await expect(applicationsPage.page.getByTestId('add-app-connection-dialog')).toBeHidden();
|
||||
await expect(applicationsPage.page).toHaveURL(
|
||||
'/app/azure-openai/connections'
|
||||
);
|
||||
await expect(
|
||||
applicationsPage.page.getByTestId('add-app-connection-dialog')
|
||||
).toBeHidden();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user