fix download button not appearing

This commit is contained in:
cristhianzl 2024-06-18 12:14:40 -03:00
commit 05f18ddfa8
2 changed files with 48 additions and 14 deletions

View file

@ -122,7 +122,7 @@ export default function NodeToolbarComponent({
function handleAdvancedWShortcut(e: KeyboardEvent) {
e.preventDefault();
if (isThereModal() && !showModalAdvanced) return;
setShowModalAdvanced((state) => !state);
setShowModalAdvanced((state) => !state);
}
function handleSaveWShortcut(e: KeyboardEvent) {
@ -687,19 +687,16 @@ export default function NodeToolbarComponent({
style={`${frozen ? " text-ice" : ""} transition-all`}
/>
</SelectItem>
{(!hasStore || !hasApiKey || !validApiKey) && (
<SelectItem value="Download">
<ToolbarSelectItem
shortcut={
shortcuts.find((obj) => obj.name === "Download")
?.shortcut!
}
value={"Download"}
icon={"Download"}
dataTestId="download-button-modal"
/>
</SelectItem>
)}
<SelectItem value="Download">
<ToolbarSelectItem
shortcut={
shortcuts.find((obj) => obj.name === "Download")?.shortcut!
}
value={"Download"}
icon={"Download"}
dataTestId="download-button-modal"
/>
</SelectItem>
<SelectItem
value={"delete"}
className="focus:bg-red-400/[.20]"

View file

@ -0,0 +1,37 @@
import { expect, test } from "@playwright/test";
test("user should be able to see multiple edges and interact with them", async ({
page,
}) => {
await page.goto("/");
await page.waitForTimeout(2000);
let modalCount = 0;
try {
const modalTitleElement = await page?.getByTestId("modal-title");
if (modalTitleElement) {
modalCount = await modalTitleElement.count();
}
} catch (error) {
modalCount = 0;
}
while (modalCount === 0) {
await page.getByText("New Project", { exact: true }).click();
await page.waitForTimeout(5000);
modalCount = await page.getByTestId("modal-title")?.count();
}
await page.waitForTimeout(1000);
await page.getByText("Vector Store RAG", { exact: true }).last().click();
await page.waitForTimeout(3000);
await page.getByText("Vector Store", { exact: true }).first().isVisible();
await page.getByText("Base Retriever", { exact: true }).first().isVisible();
await page.getByText("Search Results", { exact: true }).first().isVisible();
await page.getByTestId("icon-Eye").nth(24).click();
await page.getByTestId("icon-Eye").nth(25).click();
await page.getByTestId("icon-Eye").nth(26).click();
await page.getByText("Vector Store", { exact: true }).first().isHidden();
await page.getByText("Base Retriever", { exact: true }).first().isHidden();
await page.getByText("Search Results", { exact: true }).first().isHidden();
});