parent
4f009e7a03
commit
f983e99fb2
@ -1971,50 +1971,48 @@ const DEFAULT_COMPONENT_ID = '1';
|
|||||||
expect(players[0].duration).toEqual(5678);
|
expect(players[0].duration).toEqual(5678);
|
||||||
});
|
});
|
||||||
|
|
||||||
fixmeIvy(
|
it('should not render animations when the object expression value is the same as it was previously',
|
||||||
'FW-932: Animation @triggers are not reported to the renderer in Ivy as they are in VE')
|
() => {
|
||||||
.it('should not render animations when the object expression value is the same as it was previously',
|
@Component({
|
||||||
() => {
|
selector: 'ani-cmp',
|
||||||
@Component({
|
template: `
|
||||||
selector: 'ani-cmp',
|
|
||||||
template: `
|
|
||||||
<div [@myAnimation]="{value:exp,params:params}"></div>
|
<div [@myAnimation]="{value:exp,params:params}"></div>
|
||||||
`,
|
`,
|
||||||
animations: [
|
animations: [
|
||||||
trigger(
|
trigger(
|
||||||
'myAnimation',
|
'myAnimation',
|
||||||
[
|
[
|
||||||
transition('* => *', [animate(1234, style({opacity: 0}))]),
|
transition('* => *', [animate(1234, style({opacity: 0}))]),
|
||||||
]),
|
]),
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
class Cmp {
|
class Cmp {
|
||||||
public exp: any;
|
public exp: any;
|
||||||
public params: any;
|
public params: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
TestBed.configureTestingModule({declarations: [Cmp]});
|
TestBed.configureTestingModule({declarations: [Cmp]});
|
||||||
|
|
||||||
const engine = TestBed.get(ɵAnimationEngine);
|
const engine = TestBed.get(ɵAnimationEngine);
|
||||||
const fixture = TestBed.createComponent(Cmp);
|
const fixture = TestBed.createComponent(Cmp);
|
||||||
const cmp = fixture.componentInstance;
|
const cmp = fixture.componentInstance;
|
||||||
|
|
||||||
cmp.exp = '1';
|
cmp.exp = '1';
|
||||||
cmp.params = {};
|
cmp.params = {};
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
engine.flush();
|
engine.flush();
|
||||||
let players = getLog();
|
let players = getLog();
|
||||||
expect(players.length).toEqual(1);
|
expect(players.length).toEqual(1);
|
||||||
expect(players[0].duration).toEqual(1234);
|
expect(players[0].duration).toEqual(1234);
|
||||||
resetLog();
|
resetLog();
|
||||||
|
|
||||||
cmp.exp = '1';
|
cmp.exp = '1';
|
||||||
cmp.params = {};
|
cmp.params = {};
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
engine.flush();
|
engine.flush();
|
||||||
players = getLog();
|
players = getLog();
|
||||||
expect(players.length).toEqual(0);
|
expect(players.length).toEqual(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should update the final state styles when params update even if the expression hasn\'t changed',
|
it('should update the final state styles when params update even if the expression hasn\'t changed',
|
||||||
fakeAsync(() => {
|
fakeAsync(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user