mirror of https://github.com/sveltejs/svelte
Runtime test doesn't work because of weird behaviour of computed style the puppeteer test should cover itpull/7489/head
parent
61a3c743bc
commit
1e1f020ba2
@ -1,26 +0,0 @@
|
|||||||
export default {
|
|
||||||
html: `
|
|
||||||
<h1 class="svelte-szzkfu" style="background-color: red;">hello</h1>
|
|
||||||
<h1 class="svelte-szzkfu">hello</h1>
|
|
||||||
<h1 class="svelte-szzkfu" style="background-color: red !important;">hello</h1>
|
|
||||||
`,
|
|
||||||
|
|
||||||
ssrHtml: `
|
|
||||||
<h1 class="svelte-szzkfu" style="background-color: red;">hello</h1>
|
|
||||||
<h1 class="svelte-szzkfu" style="background-color: red important;">hello</h1>
|
|
||||||
<h1 class="svelte-szzkfu" style="background-color: red !important;">hello</h1>
|
|
||||||
`,
|
|
||||||
skip: true,
|
|
||||||
test({ assert, target, window, component }) {
|
|
||||||
const h1s = target.querySelectorAll('h1');
|
|
||||||
|
|
||||||
assert.equal(window.getComputedStyle(h1s[0])['backgroundColor'], 'blue'); // TODO: This should be blue but ends up being red
|
|
||||||
assert.equal(window.getComputedStyle(h1s[1])['backgroundColor'], 'blue');
|
|
||||||
assert.equal(window.getComputedStyle(h1s[2])['backgroundColor'], 'red');
|
|
||||||
|
|
||||||
component.color = 'yellow';
|
|
||||||
assert.equal(window.getComputedStyle(h1s[0])['backgroundColor'], 'blue');
|
|
||||||
assert.equal(window.getComputedStyle(h1s[1])['backgroundColor'], 'blue');
|
|
||||||
assert.equal(window.getComputedStyle(h1s[2])['backgroundColor'], 'yellow');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let color = 'red'
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<h1 style:background-color={color} >hello</h1>
|
|
||||||
<h1 style:background-color="{color} important">hello</h1>
|
|
||||||
<h1 style:background-color|important="{color}">hello</h1>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
h1 {
|
|
||||||
background-color: blue !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Loading…
Reference in new issue