Skip to content

Releases: testing-library/angular-testing-library

v12.1.2

22 Aug 11:15
36648c4
Compare
Choose a tag to compare

12.1.2 (2022-08-22)

Bug Fixes

v12.1.1

01 Aug 16:42
de1778b
Compare
Choose a tag to compare

12.1.1 (2022-08-01)

Bug Fixes

v12.1.0

06 Jul 10:17
459b500
Compare
Choose a tag to compare

12.1.0 (2022-07-06)

Features

  • support componentImports option for standalone components (experimental) (#307) (459b500)

v12.0.2

13 Jun 17:37
db6611d
Compare
Choose a tag to compare

12.0.2 (2022-06-13)

Bug Fixes

v12.0.1

10 Jun 08:12
0db3a5c
Compare
Choose a tag to compare

12.0.1 (2022-06-10)

Bug Fixes

  • jest-utils: use official secondary package format (#300) (0db3a5c), closes #299

v12.0.0

09 Jun 05:50
6b94d25
Compare
Choose a tag to compare

12.0.0 (2022-06-09)

Features

BREAKING CHANGES

  • This version requires Angular v14+

v11.0.4

22 Mar 07:48
6e4723b
Compare
Choose a tag to compare

11.0.4 (2022-03-22)

Bug Fixes

  • invoke initialNavigation if it's a method (6e4723b)

v11.0.3

25 Feb 18:30
d758b94
Compare
Choose a tag to compare

11.0.3 (2022-02-25)

Bug Fixes

  • invoke initialNavigation when a router is imported (#286) (d758b94)

v11.0.2

07 Dec 13:50
4e766d1
Compare
Choose a tag to compare

11.0.2 (2021-12-07)

Bug Fixes

v11.0.0

03 Dec 16:04
Compare
Choose a tag to compare

11.0.0 (2021-12-03)

Bug Fixes

  • query params with same keys are added to the collection (82e037e)
  • wrapper component selector is appended with atl- (6ea2e7f)

chore

Features

BREAKING CHANGES

  • Query params on a router link with the same key are no longer overwriting the last value.
    Instead they are added to an array.
  • The template property is removed from the render options.
    Instead, you can pass it as the first argument of `render.

BEFORE:

await render(InputOutputComponent, {
  // 👇 this is deprecated
  template: '<app-fixture [value]="47" (sendValue)="sendValue($event)" (clicked)="clicked()"></app-fixture>',
  componentProperties: {
    sendValue: sendSpy,
  },
});

AFTER:

//           👇 Move the template in the first argument
await render('<app-fixture [value]="47" (sendValue)="sendValue($event)" (clicked)="clicked()"></app-fixture>', {
//               👇 Add the component to declarations
  declarations: [InputOutputComponent],
  componentProperties: {
    sendValue: sendSpy,
  },
});
  • rerender has been renamed to change.
    The change method keeps the current fixture intact and invokes ngOnChanges.

The new rerender method destroys the current component and creates a new instance with the updated properties.

BEFORE:

const { rerender } = render(...)
rerender({...})

AFTER:

const { change } = render(...)
change({...})
  • This version requires the following versions:
  • Angular v13