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:
parent
ae764d6465
commit
d2bee3069b
3 changed files with 749 additions and 821 deletions
File diff suppressed because one or more lines are too long
|
|
@ -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"}
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue