Skip to content

Commit

Permalink
fix playwright test
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Sep 27, 2024
1 parent 7dcddc1 commit ae58be4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions sites/main-site/src/components/ThemeSwitch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@
</script>

<div class="dropdown" title="Change theme" data-bs-toggle="tooltip" data-bs-placement="bottom">
<button
class="nav-link dropdown-toggle"
type="button"
data-bs-toggle="dropdown"
aria-expanded="false"
title="Change theme"
>
<button class="nav-link dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="theme-icon-light" class:d-none={theme !== 'light'}>
<slot name="light" />
</i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ if (name == 'Input') {
params.length > 0 && (
<div class="row border-bottom border-3">
<div class="col-12 col-md-4 col-xxl-3">
<span class="text-body-secondary">
<span class="text-body-secondary ps-3">
name<span class="ps-0 font-monospace opacity-75 small">:type</span>
</span>
</div>
<div class="col-12 col-md-7">
<span class="text-body-secondary text-start">description</span>
<span class="text-body-secondary text-start ps-3">description</span>
</div>
<div class="col-12 col-md">
<span class="text-body-secondary float-end">pattern</span>
Expand Down
2 changes: 1 addition & 1 deletion sites/main-site/tests/main-site.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ test('dark mode', async ({ page }) => {
// get background-color value
const bodyBackgroundColorLight = await page.evaluate(() => getComputedStyle(document.body).backgroundColor);
//click dark mode dropdown
await page.getByRole('button', { name: 'Change theme' }).click();
await page.getByRole('button', { name: 'Change theme button' }).click();
//click dark mode
await page.getByRole('button', { name: 'dark' }).click();
const bodyBackgroundColorDark = await page.evaluate(() => getComputedStyle(document.body).backgroundColor);
Expand Down

0 comments on commit ae58be4

Please sign in to comment.