File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/model-viewer/src Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export class ExtraModelElement extends ReactiveElement {
44
44
super . updated ( changedProperties ) ;
45
45
console . log ( 'updated is called' ) ;
46
46
if ( changedProperties . has ( 'src' ) ) {
47
- this . loaded = false ;
47
+ this . loaded = true ;
48
48
console . log ( 'src has changed' ) ;
49
49
}
50
50
if ( changedProperties . has ( 'availableVariants' ) ) {
Original file line number Diff line number Diff line change @@ -40,9 +40,10 @@ suite('ExtraModelElement', () => {
40
40
} ) ;
41
41
42
42
suite ( 'with src property' , ( ) => {
43
- test ( 'set loaded to false at first when src is set' , async ( ) => {
43
+ test ( 'set loaded to true at first when src is set' , async ( ) => {
44
44
extraElement . src = assetPath ( 'models/Astronaut.glb' ) ;
45
- expect ( extraElement . loaded ) . to . be . false ;
45
+ await extraElement . updateComplete ;
46
+ expect ( extraElement . loaded ) . to . be . true ;
46
47
} ) ;
47
48
test . skip ( 'dispatches a load event when src is set' , async ( ) => {
48
49
const sourceLoads = waitForEvent ( extraElement , 'load' ) ;
You can’t perform that action at this time.
0 commit comments