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
|
|
@ -39,8 +39,7 @@ test(
|
|||
await page.getByTestId("side_nav_options_all-templates").click();
|
||||
await page.getByRole("heading", { name: "Basic Prompting" }).click();
|
||||
await page.waitForSelector("text=playground", { timeout: 30000 });
|
||||
await page.waitForSelector("text=api", { timeout: 30000 });
|
||||
await page.waitForSelector("text=share", { timeout: 30000 });
|
||||
await page.waitForSelector("text=publish", { timeout: 30000 });
|
||||
|
||||
await expect(page.getByTestId("button_run_chat output")).toBeVisible({
|
||||
timeout: 30000,
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import * as dotenv from "dotenv";
|
||||
import path from "path";
|
||||
import { adjustScreenView } from "../../utils/adjust-screen-view";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
test(
|
||||
"should use webhook component on API",
|
||||
{
|
||||
tag: ["@release"],
|
||||
},
|
||||
async ({ page }) => {
|
||||
test.skip(
|
||||
!process?.env?.OPENAI_API_KEY,
|
||||
"OPENAI_API_KEY required to run this test",
|
||||
);
|
||||
if (!process.env.CI) {
|
||||
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
|
||||
}
|
||||
await awaitBootstrapTest(page);
|
||||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("webhook");
|
||||
|
||||
await page.waitForSelector('[data-testid="dataWebhook"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("dataWebhook")
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
|
||||
await adjustScreenView(page);
|
||||
|
||||
// wait for the update to be applied
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.getByText("API", { exact: true }).click();
|
||||
|
||||
await page.getByText("Webhook cURL", { exact: true }).click();
|
||||
await page.getByRole("tab", { name: "Webhook cURL" }).click();
|
||||
|
||||
await page.getByTestId("icon-Copy").last().click();
|
||||
|
||||
const handle = await page.evaluateHandle(() =>
|
||||
navigator.clipboard.readText(),
|
||||
);
|
||||
const clipboardContent = await handle.jsonValue();
|
||||
expect(clipboardContent.length).toBeGreaterThan(0);
|
||||
expect(clipboardContent).toContain("curl -X POST");
|
||||
expect(clipboardContent).toContain("webhook");
|
||||
await page.getByRole("tab", { name: "Tweaks" }).click();
|
||||
},
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue