|
@@ -623,37 +623,37 @@ fn nested_suspense_resolves_client() {
|
|
|
|
|
|
// Load the title
|
|
|
LoadTemplate { index: 0, id: ElementId(2,) },
|
|
|
- CreateTextNode { value: "The robot says hello world".to_string(), id: ElementId(4,) },
|
|
|
- ReplacePlaceholder { path: &[0,], m: 1 },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
|
value: AttributeValue::Text("title-0".to_string()),
|
|
|
id: ElementId(2,),
|
|
|
},
|
|
|
+ CreateTextNode { value: "The robot says hello world".to_string(), id: ElementId(4,) },
|
|
|
+ ReplacePlaceholder { path: &[0,], m: 1 },
|
|
|
|
|
|
// Then load the body
|
|
|
LoadTemplate { index: 1, id: ElementId(5,) },
|
|
|
- CreateTextNode { value: "The robot becomes sentient and says hello world".to_string(), id: ElementId(6,) },
|
|
|
- ReplacePlaceholder { path: &[0,], m: 1 },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
|
value: AttributeValue::Text("body-0".to_string()),
|
|
|
id: ElementId(5,),
|
|
|
},
|
|
|
+ CreateTextNode { value: "The robot becomes sentient and says hello world".to_string(), id: ElementId(6,) },
|
|
|
+ ReplacePlaceholder { path: &[0,], m: 1 },
|
|
|
|
|
|
// Then load the suspended children
|
|
|
LoadTemplate { index: 2, id: ElementId(7,) },
|
|
|
- CreateTextNode { value: "Loading 1...".to_string(), id: ElementId(8,) },
|
|
|
- CreateTextNode { value: "Loading 2...".to_string(), id: ElementId(9,) },
|
|
|
- ReplacePlaceholder { path: &[0,], m: 2 },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
|
value: AttributeValue::Text("children-0".to_string()),
|
|
|
id: ElementId(7,),
|
|
|
},
|
|
|
+ CreateTextNode { value: "Loading 1...".to_string(), id: ElementId(8,) },
|
|
|
+ CreateTextNode { value: "Loading 2...".to_string(), id: ElementId(9,) },
|
|
|
+ ReplacePlaceholder { path: &[0,], m: 2 },
|
|
|
|
|
|
// Finally replace the loading placeholder in the body with the resolved children
|
|
|
ReplaceWith { id: ElementId(3,), m: 3 },
|
|
@@ -693,13 +693,6 @@ fn nested_suspense_resolves_client() {
|
|
|
8,
|
|
|
),
|
|
|
},
|
|
|
- CreateTextNode { value: "The world says hello back".to_string(), id: ElementId(10,) },
|
|
|
- ReplacePlaceholder {
|
|
|
- path: &[
|
|
|
- 0,
|
|
|
- ],
|
|
|
- m: 1,
|
|
|
- },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
@@ -708,20 +701,19 @@ fn nested_suspense_resolves_client() {
|
|
|
8,
|
|
|
),
|
|
|
},
|
|
|
- LoadTemplate {
|
|
|
-
|
|
|
- index: 1,
|
|
|
- id: ElementId(
|
|
|
- 11,
|
|
|
- ),
|
|
|
- },
|
|
|
- CreateTextNode { value: "In a stunning turn of events, the world collectively unites and says hello back".to_string(), id: ElementId(12,) },
|
|
|
+ CreateTextNode { value: "The world says hello back".to_string(), id: ElementId(10,) },
|
|
|
ReplacePlaceholder {
|
|
|
path: &[
|
|
|
0,
|
|
|
],
|
|
|
m: 1,
|
|
|
},
|
|
|
+ LoadTemplate {
|
|
|
+ index: 1,
|
|
|
+ id: ElementId(
|
|
|
+ 11,
|
|
|
+ ),
|
|
|
+ },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
@@ -730,19 +722,19 @@ fn nested_suspense_resolves_client() {
|
|
|
11,
|
|
|
),
|
|
|
},
|
|
|
- LoadTemplate {
|
|
|
- index: 2,
|
|
|
- id: ElementId(
|
|
|
- 13,
|
|
|
- ),
|
|
|
- },
|
|
|
- CreatePlaceholder { id: ElementId(14,) },
|
|
|
+ CreateTextNode { value: "In a stunning turn of events, the world collectively unites and says hello back".to_string(), id: ElementId(12,) },
|
|
|
ReplacePlaceholder {
|
|
|
path: &[
|
|
|
0,
|
|
|
],
|
|
|
m: 1,
|
|
|
},
|
|
|
+ LoadTemplate {
|
|
|
+ index: 2,
|
|
|
+ id: ElementId(
|
|
|
+ 13,
|
|
|
+ ),
|
|
|
+ },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
@@ -751,6 +743,13 @@ fn nested_suspense_resolves_client() {
|
|
|
13,
|
|
|
),
|
|
|
},
|
|
|
+ CreatePlaceholder { id: ElementId(14,) },
|
|
|
+ ReplacePlaceholder {
|
|
|
+ path: &[
|
|
|
+ 0,
|
|
|
+ ],
|
|
|
+ m: 1,
|
|
|
+ },
|
|
|
ReplaceWith {
|
|
|
id: ElementId(
|
|
|
3,
|
|
@@ -776,13 +775,6 @@ fn nested_suspense_resolves_client() {
|
|
|
9,
|
|
|
),
|
|
|
},
|
|
|
- CreateTextNode { value: "Goodbye Robot".to_string(), id: ElementId(15,) },
|
|
|
- ReplacePlaceholder {
|
|
|
- path: &[
|
|
|
- 0,
|
|
|
- ],
|
|
|
- m: 1,
|
|
|
- },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
@@ -791,19 +783,19 @@ fn nested_suspense_resolves_client() {
|
|
|
9,
|
|
|
),
|
|
|
},
|
|
|
- LoadTemplate {
|
|
|
- index: 1,
|
|
|
- id: ElementId(
|
|
|
- 16,
|
|
|
- ),
|
|
|
- },
|
|
|
- CreateTextNode { value: "The robot says goodbye".to_string(), id: ElementId(17,) },
|
|
|
+ CreateTextNode { value: "Goodbye Robot".to_string(), id: ElementId(15,) },
|
|
|
ReplacePlaceholder {
|
|
|
path: &[
|
|
|
0,
|
|
|
],
|
|
|
m: 1,
|
|
|
},
|
|
|
+ LoadTemplate {
|
|
|
+ index: 1,
|
|
|
+ id: ElementId(
|
|
|
+ 16,
|
|
|
+ ),
|
|
|
+ },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
@@ -812,6 +804,13 @@ fn nested_suspense_resolves_client() {
|
|
|
16,
|
|
|
),
|
|
|
},
|
|
|
+ CreateTextNode { value: "The robot says goodbye".to_string(), id: ElementId(17,) },
|
|
|
+ ReplacePlaceholder {
|
|
|
+ path: &[
|
|
|
+ 0,
|
|
|
+ ],
|
|
|
+ m: 1,
|
|
|
+ },
|
|
|
LoadTemplate {
|
|
|
|
|
|
index: 2,
|
|
@@ -819,9 +818,6 @@ fn nested_suspense_resolves_client() {
|
|
|
18,
|
|
|
),
|
|
|
},
|
|
|
- // Create a placeholder for the resolved children
|
|
|
- CreateTextNode { value: "Loading 3...".to_string(), id: ElementId(19,) },
|
|
|
- ReplacePlaceholder { path: &[0,], m: 1 },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
@@ -830,6 +826,9 @@ fn nested_suspense_resolves_client() {
|
|
|
18,
|
|
|
),
|
|
|
},
|
|
|
+ // Create a placeholder for the resolved children
|
|
|
+ CreateTextNode { value: "Loading 3...".to_string(), id: ElementId(19,) },
|
|
|
+ ReplacePlaceholder { path: &[0,], m: 1 },
|
|
|
|
|
|
// Replace the loading placeholder with the resolved children
|
|
|
ReplaceWith {
|
|
@@ -864,13 +863,6 @@ fn nested_suspense_resolves_client() {
|
|
|
19,
|
|
|
),
|
|
|
},
|
|
|
- CreateTextNode { value: "Goodbye Robot again".to_string(), id: ElementId(20,) },
|
|
|
- ReplacePlaceholder {
|
|
|
- path: &[
|
|
|
- 0,
|
|
|
- ],
|
|
|
- m: 1,
|
|
|
- },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
@@ -879,19 +871,19 @@ fn nested_suspense_resolves_client() {
|
|
|
19,
|
|
|
),
|
|
|
},
|
|
|
- LoadTemplate {
|
|
|
- index: 1,
|
|
|
- id: ElementId(
|
|
|
- 21,
|
|
|
- ),
|
|
|
- },
|
|
|
- CreateTextNode { value: "The robot says goodbye again".to_string(), id: ElementId(22,) },
|
|
|
+ CreateTextNode { value: "Goodbye Robot again".to_string(), id: ElementId(20,) },
|
|
|
ReplacePlaceholder {
|
|
|
path: &[
|
|
|
0,
|
|
|
],
|
|
|
m: 1,
|
|
|
},
|
|
|
+ LoadTemplate {
|
|
|
+ index: 1,
|
|
|
+ id: ElementId(
|
|
|
+ 21,
|
|
|
+ ),
|
|
|
+ },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
@@ -900,19 +892,19 @@ fn nested_suspense_resolves_client() {
|
|
|
21,
|
|
|
),
|
|
|
},
|
|
|
+ CreateTextNode { value: "The robot says goodbye again".to_string(), id: ElementId(22,) },
|
|
|
+ ReplacePlaceholder {
|
|
|
+ path: &[
|
|
|
+ 0,
|
|
|
+ ],
|
|
|
+ m: 1,
|
|
|
+ },
|
|
|
LoadTemplate {
|
|
|
index: 2,
|
|
|
id: ElementId(
|
|
|
23,
|
|
|
),
|
|
|
},
|
|
|
- CreatePlaceholder { id: ElementId(24,) },
|
|
|
- ReplacePlaceholder {
|
|
|
- path: &[
|
|
|
- 0
|
|
|
- ],
|
|
|
- m: 1,
|
|
|
- },
|
|
|
SetAttribute {
|
|
|
name: "id",
|
|
|
ns: None,
|
|
@@ -921,6 +913,13 @@ fn nested_suspense_resolves_client() {
|
|
|
23,
|
|
|
),
|
|
|
},
|
|
|
+ CreatePlaceholder { id: ElementId(24,) },
|
|
|
+ ReplacePlaceholder {
|
|
|
+ path: &[
|
|
|
+ 0
|
|
|
+ ],
|
|
|
+ m: 1,
|
|
|
+ },
|
|
|
ReplaceWith {
|
|
|
id: ElementId(
|
|
|
3,
|