Skip to content

Commit

Permalink
Remove old test for input js
Browse files Browse the repository at this point in the history
  • Loading branch information
adi-unni committed Nov 14, 2023
1 parent 98d2dd7 commit a3a83e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
18 changes: 0 additions & 18 deletions src/components/input/_macro.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,24 +424,6 @@ describe('macro: input', () => {
expect($('.ons-input-type--prefix .ons-js-input-abbr').text().trim()).toBe('Example prefix text');
});

// it('focuses input when abbreviation is clicked', async () => {
// const $ = cheerio.load(
// renderComponent('input', {
// ...EXAMPLE_INPUT_MINIMAL,
// prefix: {
// id: 'example-prefix-id',
// title: 'Example prefix title',
// text: 'Example prefix text',
// },
// }),
// );

// await page.$('.ons-js-input-abbr').click();
// const focusedElementId = await page.evaluate(() => document.activeElement.id);

// expect($(focusedElementId).attr('id')).toBe('example-prefix-id');
// });

it('does not render prefix element when `prefix.id` not set', () => {
const $ = cheerio.load(
renderComponent('input', {
Expand Down
4 changes: 2 additions & 2 deletions src/components/input/input.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('script: input', () => {
}),
);
await page.click('.ons-js-input-abbr');
const focusedElementId = await page.evaluate(() => document.activeElement.id === 'example-id');
expect(focusedElementId).toBe(true);
const focusedElementId = await page.evaluate(() => document.activeElement.id);
expect(focusedElementId).toEqual('example-id');
});
});

0 comments on commit a3a83e6

Please sign in to comment.