📝 (index.tsx): remove unused import of cn function from utils/utils file
🐛 (index.tsx): fix condition for checking if event.shiftKey is true in NodeToolbarComponent 🐛 (index.tsx): fix button data-testid attribute value for duplicate button in NodeToolbarComponent 🐛 (intComponent.spec.ts): fix data-testid attribute value for model_specsChatOpenAI element in IntComponent test 🐛 (intComponent.spec.ts): fix data-testid attribute value for title-ChatOpenAI element in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test 🐛 (intComponent.spec.ts): remove unnecessary code for checking checkbox state in IntComponent test
This commit is contained in:
parent
5e9410cd89
commit
6216337ed9
5 changed files with 12 additions and 35 deletions
|
|
@ -29,7 +29,7 @@ import {
|
||||||
expandGroupNode,
|
expandGroupNode,
|
||||||
updateFlowPosition,
|
updateFlowPosition,
|
||||||
} from "../../../../utils/reactflowUtils";
|
} from "../../../../utils/reactflowUtils";
|
||||||
import { classNames, cn } from "../../../../utils/utils";
|
import { classNames } from "../../../../utils/utils";
|
||||||
import ToolbarSelectItem from "./toolbarSelectItem";
|
import ToolbarSelectItem from "./toolbarSelectItem";
|
||||||
|
|
||||||
export default function NodeToolbarComponent({
|
export default function NodeToolbarComponent({
|
||||||
|
|
@ -326,7 +326,8 @@ export default function NodeToolbarComponent({
|
||||||
if (
|
if (
|
||||||
selected &&
|
selected &&
|
||||||
!isGroup &&
|
!isGroup &&
|
||||||
(event.ctrlKey || event.metaKey) && event.shiftKey&&
|
(event.ctrlKey || event.metaKey) &&
|
||||||
|
event.shiftKey &&
|
||||||
event.key === "A"
|
event.key === "A"
|
||||||
) {
|
) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -409,15 +410,14 @@ export default function NodeToolbarComponent({
|
||||||
|
|
||||||
<ShadTooltip content={"Duplicate"} side="top">
|
<ShadTooltip content={"Duplicate"} side="top">
|
||||||
<button
|
<button
|
||||||
data-testid="save-button-modal"
|
data-testid="duplicate-button-modal"
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10",
|
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10"
|
||||||
)}
|
)}
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleSelectChange("duplicate");
|
handleSelectChange("duplicate");
|
||||||
}
|
}}
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<IconComponent name="Copy" className="h-4 w-4" />
|
<IconComponent name="Copy" className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ test("IntComponent", async ({ page }) => {
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
await page
|
await page
|
||||||
.getByTestId("modelsOpenAI")
|
.getByTestId("model_specsChatOpenAI")
|
||||||
.first()
|
.first()
|
||||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||||
await page.mouse.up();
|
await page.mouse.up();
|
||||||
|
|
@ -52,7 +52,7 @@ test("IntComponent", async ({ page }) => {
|
||||||
expect(false).toBeTruthy();
|
expect(false).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|
||||||
await page.getByTestId("title-OpenAI").click();
|
await page.getByTestId("title-ChatOpenAI").click();
|
||||||
await page
|
await page
|
||||||
.locator('//*[@id="react-flow-id"]/div[1]/div[2]/button[2]')
|
.locator('//*[@id="react-flow-id"]/div[1]/div[2]/button[2]')
|
||||||
.click();
|
.click();
|
||||||
|
|
@ -79,11 +79,6 @@ test("IntComponent", async ({ page }) => {
|
||||||
.getByTestId("edit-int-input-max_tokens")
|
.getByTestId("edit-int-input-max_tokens")
|
||||||
.fill("123456789123456789123456789");
|
.fill("123456789123456789123456789");
|
||||||
|
|
||||||
await page.locator('//*[@id="showinput_value"]').click();
|
|
||||||
expect(
|
|
||||||
await page.locator('//*[@id="showinput_value"]').isChecked()
|
|
||||||
).toBeFalsy();
|
|
||||||
|
|
||||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||||
expect(
|
expect(
|
||||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||||
|
|
@ -104,19 +99,11 @@ test("IntComponent", async ({ page }) => {
|
||||||
await page.locator('//*[@id="showopenai_api_key"]').isChecked()
|
await page.locator('//*[@id="showopenai_api_key"]').isChecked()
|
||||||
).toBeFalsy();
|
).toBeFalsy();
|
||||||
|
|
||||||
await page.locator('//*[@id="showstream"]').click();
|
|
||||||
expect(await page.locator('//*[@id="showstream"]').isChecked()).toBeFalsy();
|
|
||||||
|
|
||||||
await page.locator('//*[@id="showtemperature"]').click();
|
await page.locator('//*[@id="showtemperature"]').click();
|
||||||
expect(
|
expect(
|
||||||
await page.locator('//*[@id="showtemperature"]').isChecked()
|
await page.locator('//*[@id="showtemperature"]').isChecked()
|
||||||
).toBeFalsy();
|
).toBeFalsy();
|
||||||
|
|
||||||
await page.locator('//*[@id="showinput_value"]').click();
|
|
||||||
expect(
|
|
||||||
await page.locator('//*[@id="showinput_value"]').isChecked()
|
|
||||||
).toBeTruthy();
|
|
||||||
|
|
||||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||||
expect(
|
expect(
|
||||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||||
|
|
@ -137,19 +124,11 @@ test("IntComponent", async ({ page }) => {
|
||||||
await page.locator('//*[@id="showopenai_api_key"]').isChecked()
|
await page.locator('//*[@id="showopenai_api_key"]').isChecked()
|
||||||
).toBeTruthy();
|
).toBeTruthy();
|
||||||
|
|
||||||
await page.locator('//*[@id="showstream"]').click();
|
|
||||||
expect(await page.locator('//*[@id="showstream"]').isChecked()).toBeTruthy();
|
|
||||||
|
|
||||||
await page.locator('//*[@id="showtemperature"]').click();
|
await page.locator('//*[@id="showtemperature"]').click();
|
||||||
expect(
|
expect(
|
||||||
await page.locator('//*[@id="showtemperature"]').isChecked()
|
await page.locator('//*[@id="showtemperature"]').isChecked()
|
||||||
).toBeTruthy();
|
).toBeTruthy();
|
||||||
|
|
||||||
await page.locator('//*[@id="showinput_value"]').click();
|
|
||||||
expect(
|
|
||||||
await page.locator('//*[@id="showinput_value"]').isChecked()
|
|
||||||
).toBeFalsy();
|
|
||||||
|
|
||||||
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
await page.locator('//*[@id="showmodel_kwargs"]').click();
|
||||||
expect(
|
expect(
|
||||||
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
await page.locator('//*[@id="showmodel_kwargs"]').isChecked()
|
||||||
|
|
@ -170,9 +149,6 @@ test("IntComponent", async ({ page }) => {
|
||||||
await page.locator('//*[@id="showopenai_api_key"]').isChecked()
|
await page.locator('//*[@id="showopenai_api_key"]').isChecked()
|
||||||
).toBeFalsy();
|
).toBeFalsy();
|
||||||
|
|
||||||
await page.locator('//*[@id="showstream"]').click();
|
|
||||||
expect(await page.locator('//*[@id="showstream"]').isChecked()).toBeFalsy();
|
|
||||||
|
|
||||||
await page.locator('//*[@id="showtemperature"]').click();
|
await page.locator('//*[@id="showtemperature"]').click();
|
||||||
expect(
|
expect(
|
||||||
await page.locator('//*[@id="showtemperature"]').isChecked()
|
await page.locator('//*[@id="showtemperature"]').isChecked()
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ test("LangflowShortcuts", async ({ page }) => {
|
||||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||||
await page.mouse.up();
|
await page.mouse.up();
|
||||||
await page.mouse.down();
|
await page.mouse.down();
|
||||||
|
|
||||||
|
await page.locator('//*[@id="react-flow-id"]/div/div[2]/button[3]').click();
|
||||||
await page
|
await page
|
||||||
.locator('//*[@id="react-flow-id"]/div[1]/div[2]/button[2]')
|
.locator('//*[@id="react-flow-id"]/div[1]/div[2]/button[2]')
|
||||||
.click();
|
.click();
|
||||||
|
|
@ -41,7 +43,7 @@ test("LangflowShortcuts", async ({ page }) => {
|
||||||
.locator('//*[@id="react-flow-id"]/div[1]/div[2]/button[2]')
|
.locator('//*[@id="react-flow-id"]/div[1]/div[2]/button[2]')
|
||||||
.click();
|
.click();
|
||||||
await page.getByTestId("title-Ollama").click();
|
await page.getByTestId("title-Ollama").click();
|
||||||
await page.keyboard.press(`${control}+e`);
|
await page.keyboard.press(`${control}+Shift+A`);
|
||||||
await page.locator('//*[@id="saveChangesBtn"]').click();
|
await page.locator('//*[@id="saveChangesBtn"]').click();
|
||||||
|
|
||||||
await page.getByTestId("title-Ollama").click();
|
await page.getByTestId("title-Ollama").click();
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,6 @@ test("PromptTemplateComponent", async ({ page }) => {
|
||||||
.click();
|
.click();
|
||||||
await page.getByTestId("prompt-input-template").click();
|
await page.getByTestId("prompt-input-template").click();
|
||||||
|
|
||||||
// await page.getByTestId("edit-prompt-sanitized").click();
|
|
||||||
// await page.getByTestId("modal-title").click();
|
|
||||||
await page
|
await page
|
||||||
.getByTestId("modal-prompt-input-template")
|
.getByTestId("modal-prompt-input-template")
|
||||||
.fill("{prompt} example {prompt1}");
|
.fill("{prompt} example {prompt1}");
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ test("TextAreaModalComponent", async ({ page }) => {
|
||||||
await page.locator('//*[@id="new-project-btn"]').click();
|
await page.locator('//*[@id="new-project-btn"]').click();
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
|
await page.locator('//*[@id="new-project-btn"]').click();
|
||||||
await page.getByTestId("blank-flow").click();
|
await page.getByTestId("blank-flow").click();
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
await page.getByTestId("extended-disclosure").click();
|
await page.getByTestId("extended-disclosure").click();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue