File tree 2 files changed +20
-3
lines changed
packages/web-components/fast-foundation/src/foundation 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ describe("FASTFoundation", () => {
57
57
console . log ( element . $fastController . template , template ) ;
58
58
await disconnect ( ) ;
59
59
} ) ;
60
+
61
+ xit ( "the template resolved from $fastProvider when a local template property is not set" , async ( ) => { } ) ;
60
62
} ) ;
61
63
62
64
describe ( "should style with" , ( ) => {
@@ -78,5 +80,17 @@ describe("FASTFoundation", () => {
78
80
console . log ( element . $fastController . styles , styles ) ;
79
81
await disconnect ( ) ;
80
82
} ) ;
83
+
84
+ xit ( "the styles resolved from $fastProvider when a local template property is not set" , async ( ) => { } ) ;
85
+ } ) ;
86
+
87
+ it ( "should resolve a null $fastProvider if no parent FASTProvider exists" , async ( ) => {
88
+ const { element, connect, disconnect } = await setup ( "bare-element" ) ;
89
+ await connect ( ) ;
90
+
91
+ expect ( element . $fastProvider ) . to . equal ( null ) ;
92
+ await disconnect ( ) ;
81
93
} ) ;
94
+
95
+ xit ( "should resolve a provider element to $fastProvider after DOM connection if element has a parent FASTProvider" , async ( ) => { } ) ;
82
96
} ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export abstract class FASTFoundation extends FASTElement {
26
26
*/
27
27
@observable
28
28
public template : ElementViewTemplate | void | null ;
29
- private templateChanged ( ) : void {
29
+ protected templateChanged ( ) : void {
30
30
if ( this . template !== undefined ) {
31
31
this . $fastController . template = this . template ;
32
32
}
@@ -39,7 +39,7 @@ export abstract class FASTFoundation extends FASTElement {
39
39
*/
40
40
@observable
41
41
public styles : ElementStyles | void | null ;
42
- private stylesChanged ( ) : void {
42
+ protected stylesChanged ( ) : void {
43
43
if ( this . styles !== undefined ) {
44
44
this . $fastController . styles = this . styles ;
45
45
}
@@ -59,7 +59,10 @@ export abstract class FASTFoundation extends FASTElement {
59
59
return this . $fastProvider ?. resolveStylesFor ( this ) || null ;
60
60
}
61
61
62
- connectedCallback ( ) {
62
+ /**
63
+ * Invoked when element is connected to the DOM.
64
+ */
65
+ public connectedCallback ( ) {
63
66
this . $fastProvider = FASTProvider . resolveProvider ( this ) ;
64
67
super . connectedCallback ( ) ;
65
68
}
You can’t perform that action at this time.
0 commit comments