-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(wdio): migrate slot-no-default to wdio
port the `test/karma/test-app/slot-no-default` test suite to webdriverio git history has been preserved as much as possible here, using `git mv` to move files from the `karma` dir to `wdio/` in all possible cases. however, git may fail to mark some files as 'moved' if we change a file enough that it exceeds git's "sameness threshold". STENCIL-1191
- Loading branch information
1 parent
92e5fca
commit 9193e67
Showing
5 changed files
with
28 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { h } from '@stencil/core'; | ||
import { render } from '@wdio/browser-runner/stencil'; | ||
|
||
describe('slot-no-default', () => { | ||
beforeEach(async () => { | ||
render({ | ||
template: () => ( | ||
<slot-no-default> | ||
<a slot="a-slot-name">A-Show</a> | ||
<header slot="header-slot-name">Header-No-Show</header> | ||
<main>Default-Slot-No-Show</main> | ||
<nav slot="nav-slot-name">Nav-Show</nav> | ||
<footer slot="footer-slot-name">Footer-Show</footer> | ||
</slot-no-default> | ||
), | ||
}); | ||
|
||
await $('slot-no-default').waitForExist(); | ||
}); | ||
|
||
it('only renders slots that have a location', async () => { | ||
await expect($('slot-no-default a')).not.toHaveAttribute('hidden'); | ||
await expect($('slot-no-default header')).toHaveAttribute('hidden', 'true'); | ||
await expect($('slot-no-default main')).toHaveAttribute('hidden', 'true'); | ||
await expect($('slot-no-default nav')).not.toHaveAttribute('hidden'); | ||
await expect($('slot-no-default footer')).not.toHaveAttribute('hidden'); | ||
}); | ||
}); |
File renamed without changes.