ref: Portfolio Website Code Generator template (#8823)

* Update Portfolio Website Code Generator.json

* Update Portfolio Website Code Generator.json

* Update Portfolio Website Code Generator.json

*  (dropdownComponent/index.tsx): add data-testid attribute to dropdown option container for improved testing
🔧 (refresh-dropdown-list.spec.ts): update test to click on the correct dropdown option container for refreshing the dropdown list

---------

Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
Edwin Jose 2025-07-02 13:49:50 -05:00 committed by GitHub
commit d2bee3069b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 749 additions and 821 deletions

View file

@ -394,7 +394,10 @@ export default function Dropdown({
className="w-full items-center rounded-none"
data-testid={`${option}-${index}-option`}
>
<div className="flex w-full items-center gap-2">
<div
className="flex w-full items-center gap-2"
data-testid={`dropdown-option-${index}-container`}
>
{filteredMetadata?.[index]?.icon && (
<ForwardedIconComponent
name={filteredMetadata?.[index]?.icon || "Unknown"}

View file

@ -37,7 +37,7 @@ test(
await page.waitForTimeout(3000);
await page.getByTestId("dropdown_str_model_name").first().click();
await page.getByTestId("refresh-dropdown-list-model_name").first().click();
await page.getByTestId("dropdown-option-0-container").first().click();
await page.getByText("Loading Options").isVisible({ timeout: 5000 });
},
);