Skip to content

build: remove legacy component usages from integration tests #25838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 15 additions & 18 deletions goldens/size-test.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
cdk/drag-drop/all-directives: 153589
cdk/drag-drop/basic: 151067
material-experimental/mdc-chips/basic: 228960
material-experimental/mdc-form-field/advanced: 263071
material-experimental/mdc-form-field/basic: 261520
material/autocomplete/without-optgroup: 271956
material/button-toggle/standalone: 188227
material/chips/basic: 225027
material/datepicker/range-picker/without-form-field: 383794
material/expansion/without-accordion: 197936
material/form-field/advanced: 242955
material/form-field/basic: 241344
material/list/nav-list: 193236
material/menu/without-lazy-content: 276217
material/radio/without-group: 191753
material/select/basic: 317415
material/tabs/advanced: 254738
material/tabs/basic: 253876
cdk/drag-drop/all-directives: 153026
cdk/drag-drop/basic: 150520
material/autocomplete/without-optgroup: 274252
material/button-toggle/standalone: 188001
material/chips/basic: 260951
material/datepicker/range-picker/without-form-field: 400297
material/expansion/without-accordion: 197979
material/form-field/advanced: 263205
material/form-field/basic: 261635
material/list/nav-list: 218753
material/menu/without-lazy-content: 278141
material/radio/without-group: 199995
material/select/basic: 316667
material/tabs/advanced: 259447
material/tabs/basic: 259301
4 changes: 2 additions & 2 deletions integration/harness-e2e-cli/e2e/radio-harness.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MatLegacyRadioGroupHarness} from '@angular/material/legacy-radio/testing';
import {MatRadioGroupHarness} from '@angular/material/radio/testing';
import {SeleniumWebDriverHarnessEnvironment} from '@angular/cdk/testing/selenium-webdriver';
import {HarnessLoader} from '@angular/cdk/testing';
import {configureDriver} from './driver.js';
Expand All @@ -18,7 +18,7 @@ describe('app test', () => {
});

it('should work', async () => {
const group = await loader.getHarness(MatLegacyRadioGroupHarness);
const group = await loader.getHarness(MatRadioGroupHarness);

expect(group).toBeDefined();
expect(await group.getCheckedValue()).toBe(null);
Expand Down
4 changes: 2 additions & 2 deletions integration/harness-e2e-cli/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import {BrowserModule} from '@angular/platform-browser';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';

import {AppComponent} from './app.component';
import {MatLegacyRadioModule} from '@angular/material/legacy-radio';
import {MatRadioModule} from '@angular/material/radio';

@NgModule({
declarations: [AppComponent],
imports: [MatLegacyRadioModule, NoopAnimationsModule, BrowserModule],
imports: [MatRadioModule, NoopAnimationsModule, BrowserModule],
bootstrap: [AppComponent],
})
export class AppModule {}
1 change: 0 additions & 1 deletion integration/ng-add/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {AppComponent} from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, AppRoutingModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
1 change: 0 additions & 1 deletion integration/ng-update-v13/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, BrowserAnimationsModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}

This file was deleted.

22 changes: 0 additions & 22 deletions integration/size-test/material-experimental/mdc-chips/basic.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion integration/size-test/material/autocomplete/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ load("//integration/size-test:index.bzl", "size_test")
size_test(
name = "without-optgroup",
file = "without-optgroup.ts",
deps = ["//src/material/legacy-autocomplete"],
deps = ["//src/material/autocomplete"],
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, NgModule} from '@angular/core';
import {MatLegacyAutocompleteModule} from '@angular/material/legacy-autocomplete';
import {MatAutocompleteModule} from '@angular/material/autocomplete';

/**
* Basic component using `MatAutocomplete` and `MatOption`. Other supported parts of the
Expand All @@ -16,7 +16,7 @@ import {MatLegacyAutocompleteModule} from '@angular/material/legacy-autocomplete
export class TestComponent {}

@NgModule({
imports: [MatLegacyAutocompleteModule],
imports: [MatAutocompleteModule],
declarations: [TestComponent],
bootstrap: [TestComponent],
})
Expand Down
2 changes: 1 addition & 1 deletion integration/size-test/material/chips/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ load("//integration/size-test:index.bzl", "size_test")
size_test(
name = "basic",
file = "basic.ts",
deps = ["//src/material/legacy-chips"],
deps = ["//src/material/chips"],
)
10 changes: 5 additions & 5 deletions integration/size-test/material/chips/basic.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import {Component, NgModule} from '@angular/core';
import {MatLegacyChipsModule} from '@angular/material/legacy-chips';
import {MatChipsModule} from '@angular/material/chips';

/**
* Basic component using `MatChipList` and `MatChip`. Other supported parts of the
* chip module such as `MatChipRemove` are not used and should be tree-shaken away.
*/
@Component({
template: `
<mat-chip-list>
<mat-chip>First</mat-chip>
</mat-chip-list>
<mat-chip-listbox>
<mat-chip-option>First</mat-chip-option>
</mat-chip-listbox>
`,
})
export class TestComponent {}

@NgModule({
imports: [MatLegacyChipsModule],
imports: [MatChipsModule],
declarations: [TestComponent],
bootstrap: [TestComponent],
})
Expand Down
8 changes: 4 additions & 4 deletions integration/size-test/material/form-field/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ size_test(
name = "basic",
file = "basic.ts",
deps = [
"//src/material/legacy-form-field",
"//src/material/legacy-input",
"//src/material/form-field",
"//src/material/input",
],
)

size_test(
name = "advanced",
file = "advanced.ts",
deps = [
"//src/material/legacy-form-field",
"//src/material/legacy-input",
"//src/material/form-field",
"//src/material/input",
],
)
6 changes: 3 additions & 3 deletions integration/size-test/material/form-field/advanced.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component, NgModule} from '@angular/core';
import {MatLegacyFormFieldModule} from '@angular/material/legacy-form-field';
import {MatLegacyInputModule} from '@angular/material/legacy-input';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatInputModule} from '@angular/material/input';

/**
* Advanced component using `MatFormField` and `MatInput` in combination with content
Expand All @@ -20,7 +20,7 @@ import {MatLegacyInputModule} from '@angular/material/legacy-input';
export class TestComponent {}

@NgModule({
imports: [MatLegacyInputModule, MatLegacyFormFieldModule],
imports: [MatInputModule, MatFormFieldModule],
declarations: [TestComponent],
bootstrap: [TestComponent],
})
Expand Down
6 changes: 3 additions & 3 deletions integration/size-test/material/form-field/basic.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component, NgModule} from '@angular/core';
import {MatLegacyFormFieldModule} from '@angular/material/legacy-form-field';
import {MatLegacyInputModule} from '@angular/material/legacy-input';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatInputModule} from '@angular/material/input';

/**
* Basic component using `MatFormField` and `MatInput`. Other parts of the form-field
Expand All @@ -17,7 +17,7 @@ import {MatLegacyInputModule} from '@angular/material/legacy-input';
export class TestComponent {}

@NgModule({
imports: [MatLegacyInputModule, MatLegacyFormFieldModule],
imports: [MatInputModule, MatFormFieldModule],
declarations: [TestComponent],
bootstrap: [TestComponent],
})
Expand Down
2 changes: 1 addition & 1 deletion integration/size-test/material/list/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ load("//integration/size-test:index.bzl", "size_test")
size_test(
name = "nav-list",
file = "nav-list.ts",
deps = ["//src/material/legacy-list"],
deps = ["//src/material/list"],
)
4 changes: 2 additions & 2 deletions integration/size-test/material/list/nav-list.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, NgModule} from '@angular/core';
import {MatLegacyListModule} from '@angular/material/legacy-list';
import {MatListModule} from '@angular/material/list';

/**
* Basic component using `MatNavList` and `MatListItem`. Other parts of the list
Expand All @@ -18,7 +18,7 @@ import {MatLegacyListModule} from '@angular/material/legacy-list';
export class TestComponent {}

@NgModule({
imports: [MatLegacyListModule],
imports: [MatListModule],
declarations: [TestComponent],
bootstrap: [TestComponent],
})
Expand Down
2 changes: 1 addition & 1 deletion integration/size-test/material/menu/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ load("//integration/size-test:index.bzl", "size_test")
size_test(
name = "without-lazy-content",
file = "without-lazy-content.ts",
deps = ["//src/material/legacy-menu"],
deps = ["//src/material/menu"],
)
4 changes: 2 additions & 2 deletions integration/size-test/material/menu/without-lazy-content.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, NgModule} from '@angular/core';
import {MatLegacyMenuModule} from '@angular/material/legacy-menu';
import {MatMenuModule} from '@angular/material/menu';

/**
* Basic component using `MatMenu` and `MatMenuTrigger`. No lazy `MatMenuContent` is
Expand All @@ -14,7 +14,7 @@ import {MatLegacyMenuModule} from '@angular/material/legacy-menu';
export class TestComponent {}

@NgModule({
imports: [MatLegacyMenuModule],
imports: [MatMenuModule],
declarations: [TestComponent],
bootstrap: [TestComponent],
})
Expand Down
2 changes: 1 addition & 1 deletion integration/size-test/material/radio/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ load("//integration/size-test:index.bzl", "size_test")
size_test(
name = "without-group",
file = "without-group.ts",
deps = ["//src/material/legacy-radio"],
deps = ["//src/material/radio"],
)
4 changes: 2 additions & 2 deletions integration/size-test/material/radio/without-group.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, NgModule} from '@angular/core';
import {MatLegacyRadioModule} from '@angular/material/legacy-radio';
import {MatRadioModule} from '@angular/material/radio';

/**
* Basic component using `MatRadioButton`. Doesn't use a `MatRadioGroup`, so the class
Expand All @@ -13,7 +13,7 @@ import {MatLegacyRadioModule} from '@angular/material/legacy-radio';
export class TestComponent {}

@NgModule({
imports: [MatLegacyRadioModule],
imports: [MatRadioModule],
declarations: [TestComponent],
bootstrap: [TestComponent],
})
Expand Down
2 changes: 1 addition & 1 deletion integration/size-test/material/select/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ load("//integration/size-test:index.bzl", "size_test")
size_test(
name = "basic",
file = "basic.ts",
deps = ["//src/material/legacy-select"],
deps = ["//src/material/select"],
)
4 changes: 2 additions & 2 deletions integration/size-test/material/select/basic.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, NgModule} from '@angular/core';
import {MatLegacySelectModule} from '@angular/material/legacy-select';
import {MatSelectModule} from '@angular/material/select';

/**
* Basic component using `MatSelect` and `MatOption`. Other supported parts of the
Expand All @@ -16,7 +16,7 @@ import {MatLegacySelectModule} from '@angular/material/legacy-select';
export class TestComponent {}

@NgModule({
imports: [MatLegacySelectModule],
imports: [MatSelectModule],
declarations: [TestComponent],
bootstrap: [TestComponent],
})
Expand Down
Loading