Skip to content

Commit d200227

Browse files
committed
chore(e2e): break up E2eMaterialModules
1 parent 495d1b5 commit d200227

24 files changed

+420
-151
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {ScrollingModule} from '@angular/cdk/scrolling';
10+
import {NgModule} from '@angular/core';
11+
import {BlockScrollStrategyE2E} from './block-scroll-strategy-e2e';
12+
13+
@NgModule({
14+
imports: [ScrollingModule],
15+
declarations: [BlockScrollStrategyE2E],
16+
})
17+
export class BlockScrollStrategyE2eModule {
18+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {NgModule} from '@angular/core';
10+
import {MatButtonModule, MatIconModule} from '@angular/material';
11+
import {ButtonE2E} from './button-e2e';
12+
13+
@NgModule({
14+
imports: [
15+
MatButtonModule,
16+
MatIconModule,
17+
],
18+
declarations: [ButtonE2E],
19+
})
20+
export class ButtonE2eModule {
21+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {NgModule} from '@angular/core';
10+
import {MatCheckboxModule} from '@angular/material';
11+
import {SimpleCheckboxes} from './checkbox-e2e';
12+
13+
@NgModule({
14+
imports: [MatCheckboxModule],
15+
declarations: [SimpleCheckboxes],
16+
})
17+
export class CheckboxE2eModule {
18+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {NgModule} from '@angular/core';
10+
import {MatDialogModule} from '@angular/material';
11+
import {DialogE2E, TestDialog} from './dialog-e2e';
12+
13+
@NgModule({
14+
imports: [MatDialogModule],
15+
declarations: [DialogE2E, TestDialog],
16+
entryComponents: [TestDialog]
17+
})
18+
export class DialogE2eModule {
19+
}

src/e2e-app/e2e-app-module.ts

Lines changed: 0 additions & 112 deletions
This file was deleted.

src/e2e-app/e2e-app.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {Component, ViewEncapsulation} from '@angular/core';
10+
11+
/** Root component for the e2e-app demos. */
12+
@Component({
13+
moduleId: module.id,
14+
selector: 'e2e-app',
15+
template: '<e2e-app-layout><router-outlet></router-outlet></e2e-app-layout>',
16+
encapsulation: ViewEncapsulation.None,
17+
})
18+
export class E2eApp {
19+
}

src/e2e-app/e2e-app/e2e-app.html renamed to src/e2e-app/e2e-app/e2e-app-layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
</mat-nav-list>
2626

2727
<main>
28-
<router-outlet></router-outlet>
28+
<ng-content></ng-content>
2929
</main>

src/e2e-app/e2e-app/e2e-app-layout.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import {Component, ViewEncapsulation} from '@angular/core';
2+
3+
4+
@Component({selector: 'home', template: `<p>e2e website!</p>`})
5+
export class Home {
6+
}
7+
8+
@Component({
9+
moduleId: module.id,
10+
selector: 'e2e-app-layout',
11+
templateUrl: 'e2e-app-layout.html',
12+
encapsulation: ViewEncapsulation.None,
13+
})
14+
export class E2eAppLayout {
15+
showLinks: boolean = false;
16+
}

src/e2e-app/e2e-app/e2e-app-module.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {CommonModule} from '@angular/common';
10+
import {NgModule} from '@angular/core';
11+
import {GestureConfig, MatListModule} from '@angular/material';
12+
import {HAMMER_GESTURE_CONFIG} from '@angular/platform-browser';
13+
import {RouterModule} from '@angular/router';
14+
import {E2eAppLayout, Home} from './e2e-app-layout';
15+
16+
@NgModule({
17+
imports: [
18+
CommonModule,
19+
MatListModule,
20+
RouterModule,
21+
],
22+
declarations: [E2eAppLayout, Home],
23+
exports: [E2eAppLayout],
24+
25+
// We need to pass this in here, because the gesture config currently doesn't for lazy-loaded
26+
// modules. See https://github.com/angular/material2/issues/4595#issuecomment-416641018.
27+
providers: [{provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig}]
28+
})
29+
export class E2eAppModule {
30+
}

src/e2e-app/e2e-app/e2e-app.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/e2e-app/e2e-app/routes.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1+
import {
2+
ButtonToggleOverviewExample,
3+
CardFancyExample,
4+
ExpansionOverviewExample,
5+
ListOverviewExample,
6+
StepperOverviewExample,
7+
ToolbarMultirowExample
8+
} from '@angular/material-examples';
19
import {Routes} from '@angular/router';
2-
import {VirtualScrollE2E} from '../virtual-scroll/virtual-scroll-e2e';
3-
import {Home} from './e2e-app';
10+
import {BlockScrollStrategyE2E} from '../block-scroll-strategy/block-scroll-strategy-e2e';
411
import {ButtonE2E} from '../button/button-e2e';
5-
import {BasicTabs} from '../tabs/tabs-e2e';
6-
import {IconE2E} from '../icon/icon-e2e';
7-
import {MenuE2E} from '../menu/menu-e2e';
8-
import {SimpleRadioButtons} from '../radio/radio-e2e';
912
import {SimpleCheckboxes} from '../checkbox/checkbox-e2e';
1013
import {DialogE2E} from '../dialog/dialog-e2e';
1114
import {GridListE2E} from '../grid-list/grid-list-e2e';
15+
import {IconE2E} from '../icon/icon-e2e';
16+
import {InputE2E} from '../input/input-e2e';
17+
import {MenuE2E} from '../menu/menu-e2e';
1218
import {ProgressBarE2E} from '../progress-bar/progress-bar-e2e';
1319
import {ProgressSpinnerE2E} from '../progress-spinner/progress-spinner-e2e';
14-
import {SlideToggleE2E} from '../slide-toggle/slide-toggle-e2e';
15-
import {InputE2E} from '../input/input-e2e';
20+
import {SimpleRadioButtons} from '../radio/radio-e2e';
1621
import {SidenavE2E} from '../sidenav/sidenav-e2e';
17-
import {BlockScrollStrategyE2E} from '../block-scroll-strategy/block-scroll-strategy-e2e';
18-
import {
19-
CardFancyExample,
20-
ListOverviewExample,
21-
ToolbarMultirowExample,
22-
ButtonToggleOverviewExample,
23-
ExpansionOverviewExample,
24-
StepperOverviewExample
25-
} from '@angular/material-examples';
22+
import {SlideToggleE2E} from '../slide-toggle/slide-toggle-e2e';
23+
import {BasicTabs} from '../tabs/tabs-e2e';
24+
import {VirtualScrollE2E} from '../virtual-scroll/virtual-scroll-e2e';
25+
import {Home} from './e2e-app-layout';
2626

2727
export const E2E_APP_ROUTES: Routes = [
2828
{path: '', component: Home},
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {NgModule} from '@angular/core';
10+
import {MatGridListModule} from '@angular/material';
11+
import {GridListE2E} from './grid-list-e2e';
12+
13+
@NgModule({
14+
imports: [MatGridListModule],
15+
declarations: [GridListE2E],
16+
})
17+
export class GridListE2eModule {
18+
}

src/e2e-app/icon/icon-e2e-module.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {NgModule} from '@angular/core';
10+
import {MatIconModule} from '@angular/material';
11+
import {IconE2E} from './icon-e2e';
12+
13+
@NgModule({
14+
imports: [MatIconModule],
15+
declarations: [IconE2E],
16+
})
17+
export class IconE2eModule {
18+
}

src/e2e-app/input/input-e2e-module.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {NgModule} from '@angular/core';
10+
import {MatFormFieldModule, MatInputModule} from '@angular/material';
11+
import {InputE2E} from './input-e2e';
12+
13+
@NgModule({
14+
imports: [MatFormFieldModule, MatInputModule],
15+
declarations: [InputE2E],
16+
})
17+
export class InputE2eModule {
18+
}

0 commit comments

Comments
 (0)