mirror of https://github.com/sveltejs/svelte
This reverts commitpull/4886/headdeab67bb04
, reversing changes made toaff9f42673
.
parent
40de1feb95
commit
47bb5bbe94
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
question: Is svelte.dev down?
|
||||||
|
---
|
||||||
|
|
||||||
|
Probably not, but it's possible. If you can't seem to access any `.dev` sites, check out [this SuperUser question and answer](https://superuser.com/q/1413402).
|
@ -1,34 +0,0 @@
|
|||||||
export default {
|
|
||||||
props: {
|
|
||||||
items: [],
|
|
||||||
selected: 'two'
|
|
||||||
},
|
|
||||||
|
|
||||||
html: `
|
|
||||||
<select></select>
|
|
||||||
<p>selected: two</p>
|
|
||||||
`,
|
|
||||||
|
|
||||||
ssrHtml: `
|
|
||||||
<select value="two"></select>
|
|
||||||
<p>selected: two</p>
|
|
||||||
`,
|
|
||||||
|
|
||||||
test({ assert, component, target }) {
|
|
||||||
component.items = [ 'one', 'two', 'three' ];
|
|
||||||
|
|
||||||
const options = target.querySelectorAll('option');
|
|
||||||
assert.ok(!options[0].selected);
|
|
||||||
assert.ok(options[1].selected);
|
|
||||||
assert.ok(!options[2].selected);
|
|
||||||
|
|
||||||
assert.htmlEqual(target.innerHTML, `
|
|
||||||
<select>
|
|
||||||
<option value='one'>one</option>
|
|
||||||
<option value='two'>two</option>
|
|
||||||
<option value='three'>three</option>
|
|
||||||
</select>
|
|
||||||
<p>selected: two</p>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,12 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let selected;
|
|
||||||
export let items;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<select bind:value={selected}>
|
|
||||||
{#each items as item}
|
|
||||||
<option>{item}</option>
|
|
||||||
{/each}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<p>selected: {selected || 'nothing'}</p>
|
|
Loading…
Reference in new issue