Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 072e79f

Browse files
feat: support Angular 15 (#352)
Closes #350
1 parent 2b46507 commit 072e79f

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

‎apps/example-app/src/app/examples/04-forms-with-material.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test('is possible to fill in a form and verify error messages (with the help of
1111

1212
const nameControl = screen.getByLabelText(/name/i);
1313
const scoreControl = screen.getByRole('spinbutton', { name: /score/i });
14-
const colorControl = screen.getByRole('combobox',{name: /color/i});
14+
const colorControl = screen.getByPlaceholderText(/color/i);
1515
const dateControl = screen.getByRole('textbox', { name: /Chooseadate/i });
1616

1717
const errors = screen.getByRole('alert');
@@ -69,7 +69,7 @@ test('set and show pre-set form values', async () => {
6969

7070
const nameControl = screen.getByLabelText(/name/i);
7171
const scoreControl = screen.getByRole('spinbutton', { name: /score/i });
72-
const colorControl = screen.getByRole('combobox',{name: /color/i});
72+
const colorControl = screen.getByPlaceholderText(/color/i);
7373

7474
expect(nameControl).toHaveValue('Max');
7575
expect(scoreControl).toHaveValue(4);

‎package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,34 @@
2828
"prepare": "git config core.hookspath .githooks"
2929
},
3030
"dependencies": {
31-
"@angular/animations": "15.0.0",
32-
"@angular/cdk": "15.0.0",
33-
"@angular/common": "15.0.0",
34-
"@angular/compiler": "15.0.0",
35-
"@angular/core": "15.0.0",
36-
"@angular/material": "15.0.0",
37-
"@angular/platform-browser": "15.0.0",
38-
"@angular/platform-browser-dynamic": "15.0.0",
39-
"@angular/router": "15.0.0",
40-
"@ngrx/store": "15.0.0",
31+
"@angular/animations": "15.1.0",
32+
"@angular/cdk": "15.1.0",
33+
"@angular/common": "15.1.0",
34+
"@angular/compiler": "15.1.0",
35+
"@angular/core": "15.1.0",
36+
"@angular/material": "15.1.0",
37+
"@angular/platform-browser": "15.1.0",
38+
"@angular/platform-browser-dynamic": "15.1.0",
39+
"@angular/router": "15.1.0",
40+
"@ngrx/store": "15.1.0",
4141
"@nrwl/angular": "15.4.5",
4242
"@nrwl/nx-cloud": "15.0.2",
43-
"@testing-library/dom": "^8.11.1",
43+
"@testing-library/dom": "^8.19.1",
4444
"rxjs": "7.5.6",
4545
"tslib": "~2.3.1",
4646
"zone.js": "~0.11.4"
4747
},
4848
"devDependencies": {
49-
"@angular-devkit/build-angular": "15.0.0",
50-
"@angular-eslint/builder": "15.0.0",
51-
"@angular-eslint/eslint-plugin": "15.0.0",
52-
"@angular-eslint/eslint-plugin-template": "15.0.0",
53-
"@angular-eslint/schematics": "15.0.0",
54-
"@angular-eslint/template-parser": "15.0.0",
49+
"@angular-devkit/build-angular": "15.1.0",
50+
"@angular-eslint/builder": "15.1.0",
51+
"@angular-eslint/eslint-plugin": "15.1.0",
52+
"@angular-eslint/eslint-plugin-template": "15.1.0",
53+
"@angular-eslint/schematics": "15.1.0",
54+
"@angular-eslint/template-parser": "15.1.0",
5555
"@angular/cli": "~15.0.0",
56-
"@angular/compiler-cli": "15.0.0",
57-
"@angular/forms": "15.0.0",
58-
"@angular/language-service": "15.0.0",
56+
"@angular/compiler-cli": "15.1.0",
57+
"@angular/forms": "15.1.0",
58+
"@angular/language-service": "15.1.0",
5959
"@nrwl/cli": "15.4.5",
6060
"@nrwl/eslint-plugin-nx": "15.4.5",
6161
"@nrwl/jest": "15.4.5",
@@ -66,7 +66,7 @@
6666
"@swc-node/register": "^1.4.2",
6767
"@swc/core": "^1.2.173",
6868
"@testing-library/jasmine-dom": "^1.2.0",
69-
"@testing-library/jest-dom": "^5.15.1",
69+
"@testing-library/jest-dom": "^5.16.5",
7070
"@testing-library/user-event": "^13.5.0",
7171
"@types/jasmine": "4.0.3",
7272
"@types/jest": "28.1.8",

‎projects/testing-library/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"migrations": "./schematics/migrations/migration.json"
3030
},
3131
"peerDependencies": {
32-
"@angular/common": ">= 15.0.0",
33-
"@angular/platform-browser": ">= 15.0.0",
34-
"@angular/router": ">= 15.0.0",
35-
"@angular/core": ">= 15.0.0"
32+
"@angular/common": ">= 15.1.0",
33+
"@angular/platform-browser": ">= 15.1.0",
34+
"@angular/router": ">= 15.1.0",
35+
"@angular/core": ">= 15.1.0"
3636
},
3737
"dependencies": {
3838
"@testing-library/dom": "^8.0.0",

‎projects/testing-library/src/lib/testing-library.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
OnChanges,
88
SimpleChanges,
99
ApplicationInitStatus,
10-
ɵisStandalone,
10+
isStandalone,
1111
} from '@angular/core';
1212
import { ComponentFixture, TestBed, tick } from '@angular/core/testing';
1313
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
@@ -321,7 +321,7 @@ function setComponentInputs<SutType>(
321321

322322
function overrideComponentImports<SutType>(sut: Type<SutType> | string, imports: (Type<any> | any[])[] | undefined) {
323323
if (imports) {
324-
if (typeof sut === 'function' && ɵisStandalone(sut)) {
324+
if (typeof sut === 'function' && isStandalone(sut)) {
325325
TestBed.overrideComponent(sut, { set: { imports } });
326326
} else {
327327
throw new Error(
@@ -369,7 +369,7 @@ function addAutoDeclarations<SutType>(
369369
return [...declarations, wrapper];
370370
}
371371

372-
const components = () => (excludeComponentDeclaration || ɵisStandalone(sut) ? [] : [sut]);
372+
const components = () => (excludeComponentDeclaration || isStandalone(sut) ? [] : [sut]);
373373
return [...declarations, ...components()];
374374
}
375375

@@ -384,7 +384,7 @@ function addAutoImports<SutType>(
384384
};
385385

386386
const routing = () => (routes ? [RouterTestingModule.withRoutes(routes)] : []);
387-
const components = () => (typeof sut !== 'string' && ɵisStandalone(sut) ? [sut] : []);
387+
const components = () => (typeof sut !== 'string' && isStandalone(sut) ? [sut] : []);
388388
return [...imports, ...components(), ...animations(), ...routing()];
389389
}
390390

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /