Skip to content

Commit 2bde05f

Browse files
rivka-ungarclaude
andcommitted
fix(testkit): revert Dropdown story change, use Searchable story for tests
Instead of modifying the Overview story to add searchable/inputAriaLabel, point the Dropdown testkit to the existing Searchable story which already has the searchable prop set. Update the attribute test to check data-vibe on the root element instead of aria-label on the input. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 68bb28e commit 2bde05f

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

packages/docs/src/pages/components/Dropdown/DropdownBasicDropdown.stories.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ export const Overview: Story = {
5959
id: "overview-dropdown",
6060
"aria-label": "Overview dropdown",
6161
placeholder: "Placeholder text here",
62-
clearAriaLabel: "Clear",
63-
searchable: true,
64-
inputAriaLabel: "Dropdown input"
62+
clearAriaLabel: "Clear"
6563
},
6664
parameters: {
6765
docs: {

packages/testkit/__tests__/Dropdown.test.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { test, expect, FrameLocator } from "@playwright/test";
2-
import { BaseElement, Dropdown } from "../components";
2+
import { Dropdown } from "../components";
33
import { dropdownStory } from "./utils/url-helper";
44

55
let frame: FrameLocator;
@@ -37,11 +37,7 @@ test.describe("Testkit - Unit Tests - Dropdown", () => {
3737
});
3838

3939
test("should handle attribute retrieval", async () => {
40-
const attributeValue = await new BaseElement(
41-
dropdown.getPage(),
42-
dropdown.getLocator().locator("input"),
43-
"Dropdown"
44-
).getAttributeValue("aria-label");
45-
expect(attributeValue).toContain("Dropdown input");
40+
const attributeValue = await dropdown.getAttributeValue("data-vibe");
41+
expect(attributeValue).toContain("Dropdown");
4642
});
4743
});

packages/testkit/__tests__/utils/url-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const buttonToastStory = "/?path=/story/components-toast--default-with-bu
44
export const checkboxStory = "/?path=/story/components-checkbox--overview";
55
export const colorPickerStory = "/?path=/story/components-colorpicker--overview";
66
export const comboboxStory = "/?path=/story/components-combobox-deprecated--overview";
7-
export const dropdownStory = "/?path=/story/components-dropdown-basic-dropdown--overview";
7+
export const dropdownStory = "/?path=/story/components-dropdown-basic-dropdown--searchable";
88
export const editableHeadingStory = "/?path=/story/components-editableheading--overview";
99
export const editableTextStory = "/?path=/story/components-editabletext--overview";
1010
export const expandCollapseStory = "/?path=/story/components-expandcollapse--overview";

0 commit comments

Comments
 (0)