Skip to content

Commit

Permalink
✨ (index.tsx): add data-testid attribute to anchor element for testin…
Browse files Browse the repository at this point in the history
…g purposes

🔧 (userSettings.spec.ts): update test to use correct data-testid attribute value for anchor element
  • Loading branch information
Cristhianzl committed Oct 25, 2024
1 parent 3c1a1c5 commit 07c3651
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const CustomInputPopover = ({
<Popover modal open={showOptions} onOpenChange={setShowOptions}>
<PopoverAnchor>
<div
data-testid={`anchor-${id}`}
className={cn(
"primary-input border-1 flex h-full min-h-[43px] flex-wrap items-center px-3 placeholder:text-placeholder",
editNode && "min-h-7 p-0",
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/tests/extended/features/userSettings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test("should see general profile gradient", async ({ page }) => {
await page.waitForTimeout(1000);

await page.getByText("Settings").click();
await page.waitForTimeout(3000);
await page.waitForTimeout(2000);

await page.getByText("General").nth(2).isVisible();
await page.getByText("Profile Gradient").isVisible();
Expand All @@ -35,7 +35,7 @@ test("should interact with global variables", async ({ page }) => {
await page
.getByPlaceholder("Insert a name for the variable...")
.fill(randomName);
await page.getByTestId("popover-anchor-type-global-variables").click();
await page.getByTestId("anchor-popover-anchor-type-global-variables").click();
await page.getByPlaceholder("Search options...").fill("Generic");
await page.waitForTimeout(1000);
await page.getByText("Generic", { exact: true }).last().isVisible();
Expand Down

0 comments on commit 07c3651

Please sign in to comment.