Skip to content

Commit

Permalink
chore: update on select test case
Browse files Browse the repository at this point in the history
  • Loading branch information
harshith-venkatesh-freshworks committed Oct 3, 2024
1 parent efba7d1 commit af29b29
Showing 1 changed file with 0 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,47 +151,4 @@ describe('fw-select-option', () => {
expect(metaText.email).toBe('[email protected]');
expect(metaText.mobile).toBe('123-456-7890');
});

it.only('should render fw-select-option with conversation variant and verify attributes', async () => {
const page = await newE2EPage();

await page.setContent(`<fw-select-option></fw-select-option>`);

await page.$eval('fw-select-option', (elm: any) => {
elm.variant = 'conversation';
elm.text = 'This is a select option description';
elm.subText = 'This is selected option subtext';
elm.metaText = JSON.stringify({
name: 'Author Name',
email: '[email protected]',
mobile: '123-456-7890',
});
});
await page.waitForChanges();

const description = await page.find('fw-select-option >>> .description');
expect(description).toBeTruthy();

const descriptionText = await page.find(
'fw-select-option >>> .description-text'
);
expect(descriptionText).toBeTruthy();
expect(descriptionText.textContent).toBe(
'This is a select option description'
);

const subText = await page.find(
'fw-select-option >>> .description-subText-conversation'
);
expect(subText).toBeTruthy();
expect(subText.textContent).toBe('This is selected option subtext');

const metaTextDetails = await page.find(
'fw-select-option >>> .description-metaText-details'
);
expect(metaTextDetails).toBeTruthy();
expect(metaTextDetails.textContent).toBe(
'Author Name | [email protected] | 123-456-7890'
);
});
});

0 comments on commit af29b29

Please sign in to comment.