Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccar committed Oct 28, 2024
1 parent ccf1589 commit 0b3bc20
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/components/summary/_macro.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,18 +456,16 @@ describe('macro: summary', () => {
const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));

expect(
$('.ons-summary__items .ons-summary__item .ons-summary__items:nth-of-type(1) .ons-summary__values .ons-summary__text')
.text()
.trim(),
$('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-summary__values .ons-summary__text').text().trim(),
).toBe('row value 1');
});

it('displays the `other` text', () => {
const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));

expect(
$('.ons-summary__items .ons-summary__item .ons-summary__items:nth-of-type(1) .ons-summary__values ul li').text().trim(),
).toBe('other value');
expect($('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-summary__values ul li').text().trim()).toBe(
'other value',
);
});

it('wraps the `valueList` in a ul if multiple values provided', () => {
Expand Down Expand Up @@ -595,7 +593,7 @@ describe('macro: summary', () => {
}),
);

expect($('.ons-summary__item .ons-summary__items:nth-of-type(2) .ons-summary__item-title span').text()).toBe(' — row value 2');
expect($('.ons-summary__items .ons-summary__item:nth-of-type(2) .ons-summary__item-title span').text()).toBe(' — row value 2');
});
});

Expand Down

0 comments on commit 0b3bc20

Please sign in to comment.