Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(Accordion): add e2e test #800

Merged
merged 2 commits into from
Feb 2, 2024
Merged

test(Accordion): add e2e test #800

merged 2 commits into from
Feb 2, 2024

Conversation

endv-bogdanb
Copy link
Collaborator

No description provided.

@endv-bogdanb endv-bogdanb added the test 🧪 Uni tests or End-to-end tests related label Feb 1, 2024
@endv-bogdanb endv-bogdanb self-assigned this Feb 1, 2024
@endv-bogdanb endv-bogdanb force-pushed the test/add-accordion-e2e branch from eaea648 to 0f5c713 Compare February 1, 2024 13:08
Comment on lines 25 to 34
const page = await newE2EPage({
html: `<bq-accordion><span slot="header">Test text</span></bq-accordion>`,
});

const headerText = await page.$eval('bq-accordion >>> slot[name="header"]', (element) => {
return element.assignedElements({ flatten: true })[0].textContent;
});

expect(headerText).toEqualText('Test text');
expect(headerText).not.toBeNull();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could set "Test text" as constant instead

Copy link

sonarqubecloud bot commented Feb 2, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@dgonzalezr dgonzalezr merged commit 1415508 into main Feb 2, 2024
3 of 5 checks passed
@dgonzalezr dgonzalezr deleted the test/add-accordion-e2e branch February 2, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test 🧪 Uni tests or End-to-end tests related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants