Skip to content

Commit 7de7b8d

Browse files
committed
test(headless/combobox): renamed test data
1 parent 2e5b038 commit 7de7b8d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/kit-headless/src/components/combobox/test-data.ts renamed to packages/kit-headless/src/components/combobox/combobox.faketory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default function TestData() {
1+
export default function createFakeFruitsList() {
22
const fruits = [
33
'Apple',
44
'Apricot',

packages/kit-headless/src/components/combobox/combobox.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import {
1313

1414
import { QwikUIProvider } from '../qwik-ui-provider';
1515
import './combobox-test.css';
16-
import TestData from './test-data';
16+
import createFakeFruitsList from './combobox.faketory';
1717

1818
type StringCombobox = {
1919
defaultLabel?: string;
2020
};
2121

2222
const StringCombobox = component$(({ defaultLabel, ...props }: StringCombobox) => {
23-
const fruits = TestData();
23+
const fruits = createFakeFruitsList();
2424

2525
return (
2626
<>
@@ -258,12 +258,12 @@ describe('Keyboard Navigation', () => {
258258
cy.findByRole('listbox').should('not.exist');
259259
});
260260

261-
it(`GIVEN a Combobox component with an input,
261+
it(`GIVEN a Combobox component with an input,
262262
WHEN the user hits the downarrow key twice, then the end key, and then the home key,
263263
THEN the first option in the listbox should be selected.`, () => {
264264
cy.mount(<StringCombobox />);
265265

266-
cy.get('input').type(`{downarrow}{downarrow}{end}{home}`);
266+
cy.get('input').type(`{downarrow}{downarrow}{home}`);
267267

268268
cy.get('li').first().should('have.attr', 'aria-selected', 'true');
269269
});

0 commit comments

Comments
 (0)