✨ (deleteComponentFlows.spec.ts): add steps to save API Key before deleting a flow to ensure proper authentication
✨ (deleteComponentFlows.spec.ts): update confirmation message selector to match the updated text ✨ (nestedComponent.spec.ts): update selector to click on "New Project" button ♻️ (nestedComponent.spec.ts): remove redundant code for clicking on "showpinecone_env" checkbox ♻️ (nestedComponent.spec.ts): remove redundant code for clicking on "showpinecone_env" checkbox ♻️ (nestedComponent.spec.ts): remove redundant code for clicking on "showpinecone_env" checkbox ♻️ (nestedComponent.spec.ts): remove redundant code for clicking on "showpinecone_env" checkbox ♻️ (saveComponents.spec.ts): update selector to click on "New Project" button ♻️ (saveComponents.spec.ts): remove redundant code for clicking on "title-PythonFunctionTool" element ♻️ (saveComponents.spec.ts): remove redundant code for clicking on "title-ChatOpenAI" element ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable instead of hardcoding it ♻️ (store.spec.ts): update API Key placeholder value to use environment variable ✅ (tweaks_test.spec.ts): update selectors to use getByText instead of locator for better readability and maintainability
This commit is contained in:
parent
cf7e664bfd
commit
7f4bd9779d
5 changed files with 26 additions and 57 deletions
|
|
@ -4,6 +4,14 @@ test("shoud delete a flow", async ({ page }) => {
|
|||
await page.goto("/");
|
||||
await page.waitForTimeout(2000);
|
||||
await page.getByText("Store").nth(0).click();
|
||||
|
||||
await page.getByText("API Key", { exact: true }).click();
|
||||
await page
|
||||
.getByPlaceholder("Insert your API Key", { exact: true })
|
||||
.fill(process.env.STORE_API_KEY ?? "");
|
||||
await page.getByText("Save").last().click();
|
||||
await page.waitForTimeout(8000);
|
||||
|
||||
await page.getByTestId("install-Website Content QA").click();
|
||||
await page.waitForTimeout(5000);
|
||||
await page.getByText("My Collection").nth(0).click();
|
||||
|
|
@ -16,7 +24,9 @@ test("shoud delete a flow", async ({ page }) => {
|
|||
await page.getByTestId("icon-Trash2").first().click();
|
||||
await page.waitForTimeout(2000);
|
||||
});
|
||||
await page.getByText("Confirm deletion of component?").isVisible();
|
||||
await page
|
||||
.getByText("Are you sure you want to delete the selected component?")
|
||||
.isVisible();
|
||||
await page.getByText("Delete").nth(1).click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Successfully").first().isVisible();
|
||||
|
|
@ -39,7 +49,9 @@ test("shoud delete a component", async ({ page }) => {
|
|||
await page.getByTestId("icon-Trash2").first().click();
|
||||
await page.waitForTimeout(2000);
|
||||
});
|
||||
await page.getByText("Confirm deletion of component?").isVisible();
|
||||
await page
|
||||
.getByText("Are you sure you want to delete the selected component?")
|
||||
.isVisible();
|
||||
await page.getByText("Delete").nth(1).click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Successfully").first().isVisible();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ test("NestedComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -70,13 +70,6 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
|
|
@ -98,13 +91,6 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
|
|
@ -126,13 +112,6 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
|
|
@ -154,13 +133,6 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
|
|
@ -182,13 +154,6 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
).toBeFalsy();
|
||||
|
||||
// showindex_name
|
||||
await page.locator('//*[@id="showindex_name"]').click();
|
||||
|
||||
|
|
@ -210,13 +175,6 @@ test("NestedComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showpinecone_api_key"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
// showpinecone_env
|
||||
await page.locator('//*[@id="showpinecone_env"]').click();
|
||||
|
||||
expect(
|
||||
await page.locator('//*[@id="showpinecone_env"]').isChecked()
|
||||
).toBeTruthy();
|
||||
|
||||
//showpool_threads
|
||||
await page.locator('//*[@id="showpool_threads"]').click();
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ test.describe("save component tests", () => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -61,9 +61,6 @@ test.describe("save component tests", () => {
|
|||
.locator('//*[@id="react-flow-id"]/div[1]/div[2]/button[3]')
|
||||
.click();
|
||||
|
||||
await page.getByTestId("title-PythonFunctionTool").click({
|
||||
modifiers: ["Control"],
|
||||
});
|
||||
await page.getByTestId("title-ChatOpenAI").click({
|
||||
modifiers: ["Control"],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ test("should add API-KEY", async ({ page }) => {
|
|||
await page.getByTestId("api-key-button-store").click();
|
||||
await page
|
||||
.getByPlaceholder("Insert your API Key")
|
||||
.fill("x1fOKU0v2e5zL5d-BZW6CxZBZvoyuFgF");
|
||||
.fill(process.env.STORE_API_KEY ?? "");
|
||||
await page.getByTestId("api-key-save-button-store").click();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
@ -165,7 +165,7 @@ test("should like and add components and flows", async ({ page }) => {
|
|||
|
||||
await page
|
||||
.getByPlaceholder("Insert your API Key")
|
||||
.fill("x1fOKU0v2e5zL5d-BZW6CxZBZvoyuFgF");
|
||||
.fill(process.env.STORE_API_KEY ?? "");
|
||||
await page.getByTestId("api-key-save-button-store").click();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
|
|
@ -174,6 +174,8 @@ test("should like and add components and flows", async ({ page }) => {
|
|||
await page.waitForTimeout(2000);
|
||||
await page.getByText("API Key Error").isHidden();
|
||||
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
const likedValue = await page
|
||||
.getByTestId("likes-Website Content QA")
|
||||
.innerText();
|
||||
|
|
@ -214,7 +216,7 @@ test("should like and add components and flows", async ({ page }) => {
|
|||
await page.getByText("My Collection").click();
|
||||
await page.getByText("Website Content QA").first().isVisible();
|
||||
|
||||
await page.getByTestId("sidebar-nav-Components").click();
|
||||
await page.getByText("Components").first().click();
|
||||
await page.getByText("Basic RAG").first().isVisible();
|
||||
});
|
||||
|
||||
|
|
@ -233,7 +235,7 @@ test("should share component with share button", async ({ page }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ test("curl_api_generation", async ({ page, context }) => {
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ test("curl_api_generation", async ({ page, context }) => {
|
|||
await page.getByRole("tab", { name: "cURL" }).click();
|
||||
await page.getByRole("button", { name: "Copy Code" }).click();
|
||||
const handle = await page.evaluateHandle(() =>
|
||||
navigator.clipboard.readText(),
|
||||
navigator.clipboard.readText()
|
||||
);
|
||||
const clipboardContent = await handle.jsonValue();
|
||||
const oldValue = clipboardContent;
|
||||
|
|
@ -50,7 +50,7 @@ test("curl_api_generation", async ({ page, context }) => {
|
|||
await page.getByRole("tab", { name: "cURL" }).click();
|
||||
await page.getByRole("button", { name: "Copy Code" }).click();
|
||||
const handle2 = await page.evaluateHandle(() =>
|
||||
navigator.clipboard.readText(),
|
||||
navigator.clipboard.readText()
|
||||
);
|
||||
const clipboardContent2 = await handle2.jsonValue();
|
||||
const newValue = clipboardContent2;
|
||||
|
|
@ -75,7 +75,7 @@ test("check if tweaks are updating when someothing on the flow changes", async (
|
|||
}
|
||||
|
||||
while (modalCount === 0) {
|
||||
await page.locator('//*[@id="new-project-btn"]').click();
|
||||
await page.getByText("New Project", { exact: true }).click();
|
||||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue