Skip to content

Commit 07d3bda

Browse files
committed
.
2 parents cc75fe7 + 2ae28be commit 07d3bda

34 files changed

+451
-205
lines changed

e2e/components/card-e2e.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import {browser, by, element} from 'protractor';
22
import {screenshot} from '../screenshot';
33

44
describe('md-card', () => {
5-
describe('card-fancy', () => {
6-
beforeEach(() => browser.get('/card-fancy'));
75

8-
it('should show a card', async () => {
9-
const card = element(by.tagName('md-card'));
10-
expect(card).toBeDefined();
6+
beforeEach(() => browser.get('/cards'));
117

12-
screenshot('fancy card example');
13-
});
8+
it('should show a card', async () => {
9+
const card = element(by.tagName('md-card'));
10+
expect(card).toBeDefined();
11+
12+
screenshot('fancy card example');
1413
});
14+
1515
});

e2e/components/expansion-e2e.spec.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import {browser, by, element} from 'protractor';
2+
import {screenshot} from '../screenshot';
3+
4+
describe('expansion', () => {
5+
6+
beforeEach(() => browser.get('/expansion'));
7+
8+
it('should show a expansion panel', async () => {
9+
expect(element(by.css('.mat-expansion-panel'))).toBeDefined();
10+
11+
screenshot();
12+
});
13+
14+
it('should hide contents of the expansion panel on click', async () => {
15+
const panelHeader = element(by.css('.mat-expansion-panel-header'));
16+
const panelContent = element(by.css('.mat-expansion-panel-content'));
17+
18+
expect(panelContent.isDisplayed()).toBe(false);
19+
20+
panelHeader.click();
21+
22+
expect(panelContent.isDisplayed()).toBe(true);
23+
});
24+
25+
});

package-lock.json

Lines changed: 61 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"firebase-tools": "^3.9.0",
6868
"fs-extra": "^3.0.1",
6969
"glob": "^7.1.2",
70-
"google-closure-compiler": "^20170218.0.0",
70+
"google-closure-compiler": "20170409.0.0",
7171
"gulp": "^3.9.1",
7272
"gulp-clean": "^0.3.2",
7373
"gulp-clean-css": "^3.3.1",
@@ -114,7 +114,7 @@
114114
"stylelint": "^7.12.0",
115115
"ts-node": "^3.0.4",
116116
"tsconfig-paths": "^2.2.0",
117-
"tslint": "~5.6.0",
117+
"tslint": "^5.7.0",
118118
"tsutils": "^2.6.0",
119119
"typescript": "~2.2.1",
120120
"uglify-js": "^2.8.14",

scripts/closure-compiler/build-devapp-bundle.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ set -e -o pipefail
88
# Go to the project root directory
99
cd $(dirname $0)/../..
1010

11-
1211
# Build a release of material and of the CDK package.
1312
$(npm bin)/gulp material:build-release:clean
1413
$(npm bin)/gulp cdk:build-release
@@ -17,21 +16,12 @@ $(npm bin)/gulp cdk:build-release
1716
$(npm bin)/gulp :build:devapp:assets :build:devapp:scss
1817
$(npm bin)/tsc -p src/demo-app/tsconfig-build.json --target ES2015 --module ES2015
1918

20-
# Re-compile RxJS sources into ES2015. Otherwise closure compiler can't parse it properly.
21-
$(npm bin)/ngc -p scripts/closure-compiler/tsconfig-rxjs.json
22-
2319
# Create a list of all RxJS source files.
24-
rxjsSourceFiles=$(find dist/packages/rxjs -name '*.js');
20+
rxjsSourceFiles=$(find node_modules/rxjs/ -name '*.js');
2521

2622
# List of entry points in the CDK package. Exclude "testing" since it's not an entry point.
2723
cdkEntryPoints=($(find src/cdk -maxdepth 1 -mindepth 1 -type d -not -name testing -exec basename {} \;))
2824

29-
# Due a Closure Compiler issue https://github.com/google/closure-compiler/issues/2247
30-
# we need to add exports to the different RxJS ES2015 files.
31-
for i in $rxjsSourceFiles; do
32-
echo "export var __CLOSURE_WORKAROUND__" >> $i
33-
done
34-
3525
OPTS=(
3626
"--language_in=ES6_STRICT"
3727
"--language_out=ES5"
@@ -41,6 +31,8 @@ OPTS=(
4131
"--property_renaming_report=dist/closure/property_renaming_report"
4232
"--warning_level=QUIET"
4333
"--rewrite_polyfills=false"
34+
"--module_resolution=node"
35+
"--process_common_js_modules"
4436

4537
# List of path prefixes to be removed from ES6 & CommonJS modules.
4638
"--js_module_root=dist/packages"
@@ -103,4 +95,4 @@ echo ${OPTS[*]} > $closureFlags
10395
# Run the Google Closure compiler java runnable.
10496
java -jar node_modules/google-closure-compiler/compiler.jar --flagfile $closureFlags
10597

106-
echo "Finished bundling the dev-app using google closure compiler.."
98+
echo "Finished bundling the dev-app using Google Closure Compiler."

src/demo-app/a11y/tabs/routes.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import {Routes} from '@angular/router';
2+
3+
import {SunnyTabContent, RainyTabContent, FoggyTabContent} from './tabs-a11y';
4+
5+
export const TABS_DEMO_ROUTES: Routes = [
6+
{path: '', redirectTo: 'sunny-tab', pathMatch: 'full'},
7+
{path: 'sunny-tab', component: SunnyTabContent},
8+
{path: 'rainy-tab', component: RainyTabContent},
9+
{path: 'foggy-tab', component: FoggyTabContent},
10+
];

src/demo-app/a11y/tabs/tabs-a11y.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {Component} from '@angular/core';
2-
import {Observable} from 'rxjs/Observable';
32

43
@Component({
54
moduleId: module.id,
@@ -20,7 +19,7 @@ export class TabsAccessibilityDemo {
2019
{
2120
label: 'German Shepherd',
2221
content: `The German Shepherd is a breed of medium to large-sized working dog that originated
23-
in Germany. The breed's officially recognized name is German Shepherd Dog in the
22+
in Germany. The breed's officially recognized name is German Shepherd Dog in the
2423
English language. The breed is also known as the Alsatian in Britain and Ireland.`
2524
}, {
2625
label: 'Labrador Retriever',
@@ -31,11 +30,11 @@ export class TabsAccessibilityDemo {
3130
label: 'Rottweiler',
3231
disabled: true,
3332
content: `The Rottweiler is a breed of domestic dog, regarded as medium-to-large or large.
34-
The dogs were known in German as Rottweiler Metzgerhund, meaning Rottweil butchers' dogs,
33+
The dogs were known in German as Rottweiler Metzgerhund, meaning Rottweil butchers' dogs,
3534
because their main use was to ...`
3635
}, {
3736
label: 'Beagle',
38-
content: `The Beagle is a breed of small hound, similar in appearance to the much larger
37+
content: `The Beagle is a breed of small hound, similar in appearance to the much larger
3938
foxhound. The beagle is a scent hound, developed primarily for hunting hare.`
4039
},
4140
];

src/demo-app/demo-material-module.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import {
66
MdCardModule,
77
MdCheckboxModule,
88
MdChipsModule,
9-
MdCoreModule,
10-
MdTableModule,
119
MdDatepickerModule,
1210
MdDialogModule,
1311
MdExpansionModule,
@@ -29,12 +27,19 @@ import {
2927
MdSlideToggleModule,
3028
MdSnackBarModule,
3129
MdSortModule,
30+
MdTableModule,
3231
MdTabsModule,
3332
MdToolbarModule,
3433
MdTooltipModule,
3534
StyleModule
3635
} from '@angular/material';
3736
import {CdkTableModule} from '@angular/cdk/table';
37+
import {A11yModule} from '@angular/cdk/a11y';
38+
import {BidiModule} from '@angular/cdk/bidi';
39+
import {OverlayModule} from '@angular/cdk/overlay';
40+
import {PlatformModule} from '@angular/cdk/platform';
41+
import {ObserversModule} from '@angular/cdk/observers';
42+
import {PortalModule} from '@angular/cdk/portal';
3843

3944
/**
4045
* NgModule that includes all Material modules that are required to serve the demo-app.
@@ -57,7 +62,6 @@ import {CdkTableModule} from '@angular/cdk/table';
5762
MdInputModule,
5863
MdListModule,
5964
MdMenuModule,
60-
MdCoreModule,
6165
MdPaginatorModule,
6266
MdProgressBarModule,
6367
MdProgressSpinnerModule,
@@ -74,7 +78,13 @@ import {CdkTableModule} from '@angular/cdk/table';
7478
MdTooltipModule,
7579
MdNativeDateModule,
7680
CdkTableModule,
77-
StyleModule
81+
StyleModule,
82+
A11yModule,
83+
BidiModule,
84+
ObserversModule,
85+
OverlayModule,
86+
PlatformModule,
87+
PortalModule,
7888
]
7989
})
8090
export class DemoMaterialModule {}

src/e2e-app/e2e-app/e2e-app.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
<md-nav-list *ngIf="showLinks">
44
<a md-list-item [routerLink]="['block-scroll-strategy']">Block scroll strategy</a>
55
<a md-list-item [routerLink]="['button']">Button</a>
6+
<a md-list-item [routerLink]="['button-toggle']">Button Toggle</a>
67
<a md-list-item [routerLink]="['checkbox']">Checkbox</a>
78
<a md-list-item [routerLink]="['dialog']">Dialog</a>
9+
<a md-list-item [routerLink]="['expansion']">Expansion</a>
810
<a md-list-item [routerLink]="['fullscreen']">Fullscreen</a>
911
<a md-list-item [routerLink]="['grid-list']">Grid list</a>
1012
<a md-list-item [routerLink]="['icon']">Icon</a>
@@ -17,6 +19,8 @@
1719
<a md-list-item [routerLink]="['sidenav']">Sidenav</a>
1820
<a md-list-item [routerLink]="['slide-toggle']">Slide Toggle</a>
1921
<a md-list-item [routerLink]="['tabs']">Tabs</a>
22+
<a md-list-item [routerLink]="['cards']">Cards</a>
23+
<a md-list-item [routerLink]="['toolbar']">Toolbar</a>
2024
</md-nav-list>
2125

2226
<main>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
ListOverviewExample,
2121
ToolbarMultirowExample,
2222
ButtonToggleOverviewExample,
23+
ExpansionOverviewExample
2324
} from '@angular/material-examples';
2425

2526
export const E2E_APP_ROUTES: Routes = [
@@ -29,6 +30,7 @@ export const E2E_APP_ROUTES: Routes = [
2930
{path: 'button-toggle', component: ButtonToggleOverviewExample},
3031
{path: 'checkbox', component: SimpleCheckboxes},
3132
{path: 'dialog', component: DialogE2E},
33+
{path: 'expansion', component: ExpansionOverviewExample},
3234
{path: 'fullscreen', component: FullscreenE2E},
3335
{path: 'grid-list', component: GridListE2E},
3436
{path: 'icon', component: IconE2E},
@@ -41,6 +43,6 @@ export const E2E_APP_ROUTES: Routes = [
4143
{path: 'sidenav', component: SidenavE2E},
4244
{path: 'slide-toggle', component: SlideToggleE2E},
4345
{path: 'tabs', component: BasicTabs},
44-
{path: 'card-fancy', component: CardFancyExample},
46+
{path: 'cards', component: CardFancyExample},
4547
{path: 'toolbar', component: ToolbarMultirowExample},
4648
];

0 commit comments

Comments
 (0)