fix: Enhance JSON filtering with special cases, update CI workflows, and improve frontend components and tests (nightly fix) (#7110)
* ✨ (index.tsx): Update inputComponent styles to improve UI design and user experience
🐛 (new-api-modal.tsx): Add data-testid attribute to tweaks button for testing purposes
🔧 (publish-flow.spec.ts): Update test cases to improve reliability and readability
📝 (tweaksTest.spec.ts): Refactor test cases to enhance maintainability and clarity
🔧 (nestedComponent.spec.ts): Update test description for clarity and consistency
🐛 (general-bugs-shard-3909.spec.ts): Fix waitForSelector calls to match correct text for improved test accuracy
* 🔧 (use-get-builds-polling-mutation.ts, use-get-builds.ts, use-post-retrieve-vertex-order.tsx): add retry and retryDelay options to improve error handling and resiliency in API queries
🗑️ (generalBugs-shard-2.spec.ts): delete outdated test file for general bugs related to shards in the frontend tests folder
* Revert "ci: fix false positive on ci sucess status (#6868)"
This reverts commit e18b248591.
* ✨ (jsonEditor/index.tsx): add support for dynamically setting width and height of the editor container to improve responsiveness
🔧 (dictAreaModal/index.tsx): set width to 100% and adjust height class to improve layout responsiveness
* fix backend tests
* [autofix.ci] apply automated fixes
---------
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
ee71a85638
commit
4e6c2da0d1
16 changed files with 1545 additions and 256 deletions
|
|
@ -42,20 +42,17 @@ test(
|
|||
).resolves.toBeTruthy();
|
||||
|
||||
await page.getByTestId("publish-switch").click();
|
||||
await page.getByTestId("shareable-playground").click();
|
||||
await expect(page.getByTestId("rf__wrapper")).toBeVisible();
|
||||
await page.getByTestId("publish-button").click();
|
||||
await page.getByTestId("publish-switch").click();
|
||||
await expect(page.getByTestId("rf__wrapper")).toBeVisible();
|
||||
await expect(page.getByTestId("publish-switch")).toBeChecked();
|
||||
const pagePromise = context.waitForEvent("page");
|
||||
await page.getByTestId("shareable-playground").click();
|
||||
const newPage = await pagePromise;
|
||||
await newPage.waitForTimeout(3000);
|
||||
const newUrl = newPage.url();
|
||||
await newPage.getByPlaceholder("Send a message...").fill("Hello");
|
||||
await newPage.getByTestId("button-send").click();
|
||||
await expect(newPage.getByText("Hello")).toBeVisible();
|
||||
await newPage.getByTestId("button-send").last().click();
|
||||
|
||||
const stopButton = newPage.getByRole("button", { name: "Stop" });
|
||||
await stopButton.waitFor({ state: "visible", timeout: 30000 });
|
||||
|
||||
await newPage.close();
|
||||
await page.bringToFront();
|
||||
// check if deactivate the publishworks
|
||||
|
|
@ -65,9 +62,17 @@ test(
|
|||
await expect(page.getByTestId("publish-switch")).toBeChecked({
|
||||
checked: false,
|
||||
});
|
||||
await page.getByTestId("shareable-playground").click();
|
||||
await expect(page.getByTestId("rf__wrapper")).toBeVisible();
|
||||
await page.goto(newUrl);
|
||||
await expect(page.getByTestId("mainpage_title")).toBeVisible();
|
||||
try {
|
||||
await expect(page.getByTestId("mainpage_title")).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
} catch (error) {
|
||||
await page.reload();
|
||||
await expect(page.getByTestId("mainpage_title")).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ test(
|
|||
|
||||
await page.getByTestId("side_nav_options_all-templates").click();
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
await page.getByText("API", { exact: true }).click();
|
||||
await page.getByTestId("publish-button").click();
|
||||
await page.getByTestId("api-access-item").click();
|
||||
await page.getByRole("tab", { name: "cURL" }).click();
|
||||
await page.getByTestId("icon-Copy").click();
|
||||
const handle = await page.evaluateHandle(() =>
|
||||
|
|
@ -19,7 +20,7 @@ test(
|
|||
const clipboardContent = await handle.jsonValue();
|
||||
const oldValue = clipboardContent;
|
||||
expect(clipboardContent.length).toBeGreaterThan(0);
|
||||
await page.getByRole("tab", { name: "Tweaks" }).click();
|
||||
await page.getByTestId("tweaks-button").click();
|
||||
await page
|
||||
.getByRole("heading", { name: "OpenAi" })
|
||||
.locator("div")
|
||||
|
|
@ -38,6 +39,8 @@ test(
|
|||
.first()
|
||||
.fill("teste");
|
||||
|
||||
await page.getByText("Close").last().click();
|
||||
|
||||
await page.getByRole("tab", { name: "cURL" }).click();
|
||||
await page.getByTestId("icon-Copy").click();
|
||||
const handle2 = await page.evaluateHandle(() =>
|
||||
|
|
@ -92,25 +95,41 @@ test("check if tweaks are updating when someothing on the flow changes", async (
|
|||
.fill("persist_directory_123123123!@#$&*(&%$@");
|
||||
|
||||
const focusElementsOnBoard = async ({ page }) => {
|
||||
await page.waitForSelector("text=API", { timeout: 30000 });
|
||||
const focusElements = await page.getByText("API", { exact: true }).first();
|
||||
const focusElements = await page.getByTestId("publish-button").first();
|
||||
await focusElements.click();
|
||||
};
|
||||
|
||||
await focusElementsOnBoard({ page });
|
||||
|
||||
await page.getByText("Tweaks").nth(1).click();
|
||||
await page.getByTestId("api-access-item").click();
|
||||
|
||||
await page.getByTestId("tweaks-button").click();
|
||||
|
||||
await page
|
||||
.getByRole("heading", { name: "Chroma" })
|
||||
.locator("div")
|
||||
.first()
|
||||
.click();
|
||||
|
||||
await page.getByText("collection_name_test_123123123!@#$&*(&%$@").isVisible();
|
||||
await page.getByText("persist_directory_123123123!@#$&*(&%$@").isVisible();
|
||||
|
||||
await page.getByText("Python API", { exact: true }).click();
|
||||
await page.getByText("Close").last().click();
|
||||
|
||||
await page.getByText("Python", { exact: true }).click();
|
||||
|
||||
await page.getByText("collection_name_test_123123123!@#$&*(&%$@").isVisible();
|
||||
await page.getByText("persist_directory_123123123!@#$&*(&%$@").isVisible();
|
||||
|
||||
await page.getByText("Python Code", { exact: true }).click();
|
||||
await page.getByText("JavaScript", { exact: true }).click();
|
||||
|
||||
await page.getByText("collection_name_test_123123123!@#$&*(&%$@").isVisible();
|
||||
await page.getByText("persist_directory_123123123!@#$&*(&%$@").isVisible();
|
||||
|
||||
await page.getByText("cURL", { exact: true }).click();
|
||||
|
||||
await page.getByText("collection_name_test_123123123!@#$&*(&%$@").isVisible();
|
||||
await page.getByText("persist_directory_123123123!@#$&*(&%$@").isVisible();
|
||||
|
||||
expect(await page.getByText("Tweaks (2)", { exact: true }).isVisible());
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { adjustScreenView } from "../../utils/adjust-screen-view";
|
|||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
test(
|
||||
"NestedComponent",
|
||||
"user should be able to use nested component",
|
||||
{ tag: ["@release", "@workspace"] },
|
||||
async ({ page }) => {
|
||||
await awaitBootstrapTest(page);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue