Skip to content

Commit

Permalink
feat: further delay the model details test
Browse files Browse the repository at this point in the history
  • Loading branch information
EiffelFly committed Feb 19, 2023
1 parent 30f5308 commit bb0e955
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
10 changes: 5 additions & 5 deletions integration-test/common/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const expectCorrectModelDetails = async ({
additionalRules,
}: ExpectCorrectModelDetailsProps) => {
// Mimic the behavior of long running operation
await delay(10000);
await delay(20000);

await page.goto(`/models/${modelId}`, { waitUntil: "networkidle" });

Expand Down Expand Up @@ -168,16 +168,16 @@ export const expectCorrectModelDetails = async ({
const modelStateLabel = page.locator("data-testid=state-label");
const stateToggle = page.locator("#pipelineStateToggleButton");
if (modelState === "STATE_ONLINE") {
await expect(modelStateLabel).toHaveText("Online");
await expect(modelStateLabel).toHaveText("Online", { timeout: 20000 });
expect(await stateToggle.isChecked()).toBeTruthy();
} else if (modelState === "STATE_OFFLINE") {
await expect(modelStateLabel).toHaveText("Offline");
await expect(modelStateLabel).toHaveText("Offline", { timeout: 20000 });
expect(await stateToggle.isChecked()).not.toBeTruthy();
} else if (modelState === "STATE_UNSPECIFIED") {
await expect(modelStateLabel).toHaveText("Unspecified");
await expect(modelStateLabel).toHaveText("Unspecified", { timeout: 20000 });
expect(await stateToggle.isChecked()).not.toBeTruthy();
} else {
await expect(modelStateLabel).toHaveText("Error");
await expect(modelStateLabel).toHaveText("Error", { timeout: 20000 });
expect(await stateToggle.isChecked()).not.toBeTruthy();
}

Expand Down
2 changes: 2 additions & 0 deletions integration-test/model-artivc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ test.use({
});

test.describe.serial("Artivc model", () => {
test.setTimeout(75000);

test("should create artivc model", async ({ page }) => {
await page.goto("/models/create");

Expand Down
2 changes: 2 additions & 0 deletions integration-test/model-github.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ test.use({
});

test.describe.serial("GitHub model", () => {
test.setTimeout(75000);

test("should create github model", async ({ page }) => {
await page.goto("/models/create");

Expand Down
2 changes: 2 additions & 0 deletions integration-test/model-huggingface.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ test.use({
});

test.describe.serial("Hugging face model", () => {
test.setTimeout(75000);

test("should create huggingface model", async ({ page }) => {
await page.goto("/models/create", { waitUntil: "networkidle" });

Expand Down
2 changes: 2 additions & 0 deletions integration-test/model-local.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ test.use({
});

test.describe.serial("Local model", () => {
test.setTimeout(75000);

test("should create local model", async ({ page }) => {
await page.goto("/models/create", { waitUntil: "networkidle" });

Expand Down

0 comments on commit bb0e955

Please sign in to comment.