element
+ const inner_div = window.document.createElement('div');
+ div.insertBefore(inner_div, null);
+ event = new window.InputEvent('input');
+ await div.dispatchEvent(event);
+ assert.equal(div.textContent, 'a');
+
+ text = window.document.createTextNode('b');
+ inner_div.insertBefore(text, null);
+ event = new window.InputEvent('input');
+ await div.dispatchEvent(event);
+ assert.equal(div.textContent, 'ab');
+ }
+};
diff --git a/test/runtime/samples/component-event-handler-contenteditable/main.svelte b/test/runtime-puppeteer/samples/component-event-handler-contenteditable/main.svelte
similarity index 100%
rename from test/runtime/samples/component-event-handler-contenteditable/main.svelte
rename to test/runtime-puppeteer/samples/component-event-handler-contenteditable/main.svelte
diff --git a/test/runtime/samples/attribute-boolean-hidden/_config.js b/test/runtime/samples/attribute-boolean-hidden/_config.js
new file mode 100644
index 0000000000..cb38feb93d
--- /dev/null
+++ b/test/runtime/samples/attribute-boolean-hidden/_config.js
@@ -0,0 +1,10 @@
+export default {
+ props: {
+ hidden: true
+ },
+ html: '
',
+ test({ assert, component, target }) {
+ component.hidden = false;
+ assert.htmlEqual(target.innerHTML, '
');
+ }
+};
diff --git a/test/runtime/samples/attribute-boolean-hidden/main.svelte b/test/runtime/samples/attribute-boolean-hidden/main.svelte
new file mode 100644
index 0000000000..f8d7a26910
--- /dev/null
+++ b/test/runtime/samples/attribute-boolean-hidden/main.svelte
@@ -0,0 +1,5 @@
+
+
+
diff --git a/test/runtime/samples/attribute-boolean-itemscope/_config.js b/test/runtime/samples/attribute-boolean-itemscope/_config.js
deleted file mode 100644
index b5b21cfc47..0000000000
--- a/test/runtime/samples/attribute-boolean-itemscope/_config.js
+++ /dev/null
@@ -1,11 +0,0 @@
-export default {
- props: {
- itemscope: true
- },
- test({ assert, target, component }) {
- const div = target.querySelector('div');
- assert.ok(div.itemscope);
- component.itemscope = false;
- assert.ok(!div.itemscope);
- }
-};
diff --git a/test/runtime/samples/attribute-boolean-itemscope/main.svelte b/test/runtime/samples/attribute-boolean-itemscope/main.svelte
deleted file mode 100644
index 83265a983c..0000000000
--- a/test/runtime/samples/attribute-boolean-itemscope/main.svelte
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
diff --git a/test/runtime/samples/attribute-escape/_config.js b/test/runtime/samples/attribute-escape/_config.js
new file mode 100644
index 0000000000..25313f01dc
--- /dev/null
+++ b/test/runtime/samples/attribute-escape/_config.js
@@ -0,0 +1,4 @@
+export default {
+ html: '
',
+ ssrHtml: '
'
+};
diff --git a/test/runtime/samples/attribute-escape/main.svelte b/test/runtime/samples/attribute-escape/main.svelte
new file mode 100644
index 0000000000..1b1fdf62a0
--- /dev/null
+++ b/test/runtime/samples/attribute-escape/main.svelte
@@ -0,0 +1 @@
+
`} />
diff --git a/test/runtime/samples/attribute-microdata/_config.js b/test/runtime/samples/attribute-microdata/_config.js
new file mode 100644
index 0000000000..8c6a7765ea
--- /dev/null
+++ b/test/runtime/samples/attribute-microdata/_config.js
@@ -0,0 +1,25 @@
+// There is no relationship between the attribute and the dom node with regards to microdata attributes https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata
+export default {
+ html: `
+
Game - REQUIRES
+
OS
+
+
+
RATING:
+ 4.6 (
+ 8864 ratings )
+
+
+
+
+ Price: $1.00
+
+
+ `
+};
diff --git a/test/runtime/samples/attribute-microdata/main.svelte b/test/runtime/samples/attribute-microdata/main.svelte
new file mode 100644
index 0000000000..f03a6943d9
--- /dev/null
+++ b/test/runtime/samples/attribute-microdata/main.svelte
@@ -0,0 +1,31 @@
+
+
+
Game - REQUIRES
+
OS
+
+
+
+ RATING:
+ 4.6 (
+ 8864 ratings )
+
+
+
+
+
+ Price: $1.00
+
+
diff --git a/test/runtime/samples/component-event-handler-contenteditable/_config.js b/test/runtime/samples/component-event-handler-contenteditable/_config.js
deleted file mode 100644
index 1628e22d01..0000000000
--- a/test/runtime/samples/component-event-handler-contenteditable/_config.js
+++ /dev/null
@@ -1,15 +0,0 @@
-export default {
- html: `
-
- `,
-
- async test({ assert, target, window }) {
- const div = target.querySelector('div');
- const text = window.document.createTextNode('a');
- div.insertBefore(text, null);
- const event = new window.InputEvent('input');
- await div.dispatchEvent(event);
-
- assert.equal(div.textContent, 'a');
- }
-};
diff --git a/test/runtime/samples/const-tag-await-then-destructuring-computed-in-computed/_config.js b/test/runtime/samples/const-tag-await-then-destructuring-computed-in-computed/_config.js
new file mode 100644
index 0000000000..9ec4a3e3e6
--- /dev/null
+++ b/test/runtime/samples/const-tag-await-then-destructuring-computed-in-computed/_config.js
@@ -0,0 +1,20 @@
+export default {
+ html: `
+
4, 12, 60
+ `,
+
+ async test({ component, target, assert }) {
+ component.permutation = [2, 3, 1];
+ await (component.promise1 = Promise.resolve({length: 1, width: 2, height: 3}));
+ try {
+ await (component.promise2 = Promise.reject({length: 97, width: 98, height: 99}));
+ } catch (e) {
+ // nothing
+ }
+
+ assert.htmlEqual(target.innerHTML, `
+
2, 11, 2
+
9506, 28811, 98
+ `);
+ }
+};
diff --git a/test/runtime/samples/const-tag-await-then-destructuring-computed-in-computed/main.svelte b/test/runtime/samples/const-tag-await-then-destructuring-computed-in-computed/main.svelte
new file mode 100644
index 0000000000..285fc44348
--- /dev/null
+++ b/test/runtime/samples/const-tag-await-then-destructuring-computed-in-computed/main.svelte
@@ -0,0 +1,27 @@
+
+
+{#await promise1 then { length, width, height }}
+ {@const { [0]: a, [1]: b, [2]: c } = permutation}
+ {@const { [`${a}-Dimensions`]: { [c - 1]: first }, [`${b}-Dimensions`]: { [b - 1]: second }, [`${c}-Dimensions`]: { [a - 1]: third } } = calculate(length, width, height) }
+
{first}, {second}, {third}
+{/await}
+
+{#await promise2 catch { [`leng${th}`]: l, [`wid${th}`]: w, height: h }}
+ {@const [a, b, c] = permutation}
+ {@const { [`${a}-Dimensions`]: { [c - 1]: first }, [`${b}-Dimensions`]: { [b - 1]: second }, [`${c}-Dimensions`]: { [a - 1]: third } } = calculate(l, w, h) }
+
{first}, {second}, {third}
+{/await}
diff --git a/test/runtime/samples/const-tag-each-destructure-computed-in-computed/_config.js b/test/runtime/samples/const-tag-each-destructure-computed-in-computed/_config.js
new file mode 100644
index 0000000000..c299f19da6
--- /dev/null
+++ b/test/runtime/samples/const-tag-each-destructure-computed-in-computed/_config.js
@@ -0,0 +1,15 @@
+export default {
+ html: `
+
+
+
+ `,
+
+ async test({ component, target, assert }) {
+ component.boxes = [{ length: 10, width: 20, height: 30 }];
+
+ assert.htmlEqual(target.innerHTML,
+ '
'
+ );
+ }
+};
diff --git a/test/runtime/samples/const-tag-each-destructure-computed-in-computed/main.svelte b/test/runtime/samples/const-tag-each-destructure-computed-in-computed/main.svelte
new file mode 100644
index 0000000000..26dc5557ed
--- /dev/null
+++ b/test/runtime/samples/const-tag-each-destructure-computed-in-computed/main.svelte
@@ -0,0 +1,44 @@
+
+
+{#each boxes as { [`leng${th}`]: length, [`wid${th}`]: width, height }}
+ {@const {
+ [`two${dimension}`]: areas,
+ [`three${dimension}`]: {
+ volume
+ }
+ } = calculate(length, width, height)}
+ {@const {
+ i = 1,
+ [`bottom${area}`]: bottom,
+ [`side${area}${i++}`]: sideone,
+ [`side${area}${i++}`]: sidetwo
+ } = areas}
+
+{/each}
diff --git a/test/runtime/samples/html-entities-inside-component-slot/Component.svelte b/test/runtime/samples/html-entities-inside-component-slot/Component.svelte
new file mode 100644
index 0000000000..8063609738
--- /dev/null
+++ b/test/runtime/samples/html-entities-inside-component-slot/Component.svelte
@@ -0,0 +1,3 @@
+
+
+
diff --git a/test/runtime/samples/html-entities-inside-component-slot/_config.js b/test/runtime/samples/html-entities-inside-component-slot/_config.js
new file mode 100644
index 0000000000..33777a4919
--- /dev/null
+++ b/test/runtime/samples/html-entities-inside-component-slot/_config.js
@@ -0,0 +1,11 @@
+export default {
+ html: `
+
+
+
+
+
+
+
+ `
+};
diff --git a/test/runtime/samples/html-entities-inside-component-slot/main.svelte b/test/runtime/samples/html-entities-inside-component-slot/main.svelte
new file mode 100644
index 0000000000..8baecfedcc
--- /dev/null
+++ b/test/runtime/samples/html-entities-inside-component-slot/main.svelte
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+ {@html " "}
+
diff --git a/test/runtime/samples/reactive-values-text-node/_config.js b/test/runtime/samples/reactive-values-text-node/_config.js
new file mode 100644
index 0000000000..fb859285dd
--- /dev/null
+++ b/test/runtime/samples/reactive-values-text-node/_config.js
@@ -0,0 +1,9 @@
+export default {
+ html:'
same text
',
+ async test({ assert, target }) {
+ await new Promise(f => setTimeout(f, 10));
+ assert.htmlEqual(target.innerHTML, `
+
same text text
+ `);
+ }
+};
diff --git a/test/runtime/samples/reactive-values-text-node/main.svelte b/test/runtime/samples/reactive-values-text-node/main.svelte
new file mode 100644
index 0000000000..0982622b1a
--- /dev/null
+++ b/test/runtime/samples/reactive-values-text-node/main.svelte
@@ -0,0 +1,8 @@
+
+
+
{text} text
diff --git a/test/runtime/samples/spread-width-height-attributes/_config.js b/test/runtime/samples/spread-width-height-attributes/_config.js
new file mode 100644
index 0000000000..cf2dc7efde
--- /dev/null
+++ b/test/runtime/samples/spread-width-height-attributes/_config.js
@@ -0,0 +1,4 @@
+export default {
+ // https://github.com/sveltejs/svelte/issues/6752
+ html: '
![]()
'
+};
diff --git a/test/runtime/samples/spread-width-height-attributes/main.svelte b/test/runtime/samples/spread-width-height-attributes/main.svelte
new file mode 100644
index 0000000000..b91b008457
--- /dev/null
+++ b/test/runtime/samples/spread-width-height-attributes/main.svelte
@@ -0,0 +1 @@
+
![]()
diff --git a/test/validator/samples/a11y-no-noninteractive-element-to-interactive-role/warnings.json b/test/validator/samples/a11y-no-noninteractive-element-to-interactive-role/warnings.json
index 4b4c9c3d97..0835f9f07f 100644
--- a/test/validator/samples/a11y-no-noninteractive-element-to-interactive-role/warnings.json
+++ b/test/validator/samples/a11y-no-noninteractive-element-to-interactive-role/warnings.json
@@ -622,197 +622,5 @@
"column": 0,
"line": 53
}
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 18,
- "line": 57
- },
- "message": "A11y: Non-interactive element
cannot have interactive role 'menu'",
- "start": {
- "column": 0,
- "line": 57
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 21,
- "line": 58
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'menubar'",
- "start": {
- "column": 0,
- "line": 58
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 24,
- "line": 59
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'radiogroup'",
- "start": {
- "column": 0,
- "line": 59
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 21,
- "line": 60
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'tablist'",
- "start": {
- "column": 0,
- "line": 60
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 18,
- "line": 61
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'tree'",
- "start": {
- "column": 0,
- "line": 61
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 22,
- "line": 62
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'treegrid'",
- "start": {
- "column": 0,
- "line": 62
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 18,
- "line": 64
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'menu'",
- "start": {
- "column": 0,
- "line": 64
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 21,
- "line": 65
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'menubar'",
- "start": {
- "column": 0,
- "line": 65
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 24,
- "line": 66
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'radiogroup'",
- "start": {
- "column": 0,
- "line": 66
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 21,
- "line": 67
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'tablist'",
- "start": {
- "column": 0,
- "line": 67
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 18,
- "line": 68
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'tree'",
- "start": {
- "column": 0,
- "line": 68
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 22,
- "line": 69
- },
- "message": "A11y: Non-interactive element cannot have interactive role 'treegrid'",
- "start": {
- "column": 0,
- "line": 69
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 17,
- "line": 71
- },
- "message": "A11y: Non-interactive element - cannot have interactive role 'tab'",
- "start": {
- "column": 0,
- "line": 71
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 22,
- "line": 72
- },
- "message": "A11y: Non-interactive element
- cannot have interactive role 'menuitem'",
- "start": {
- "column": 0,
- "line": 72
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 17,
- "line": 73
- },
- "message": "A11y: Non-interactive element
- cannot have interactive role 'row'",
- "start": {
- "column": 0,
- "line": 73
- }
- },
- {
- "code": "a11y-no-noninteractive-element-to-interactive-role",
- "end": {
- "column": 44,
- "line": 74
- },
- "message": "A11y: Non-interactive element
- cannot have interactive role 'treeitem'",
- "start": {
- "column": 0,
- "line": 74
- }
}
]