diff --git a/.gitignore b/.gitignore index 37b6881acdb2..855c73dc0ecf 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ /libpeerconnection.log npm-debug.log testem.log +/.chrome diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 6204063179a8..76f27a6772b7 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -33,19 +33,20 @@ import { MaterialModule } from '@angular/material'; export class PizzaPartyAppModule { } ``` -## Including core and theme styles: -This is required to apply all of the core and theme styles to your application. -See the [theming guide](docs/theming.md) for instructions. +## Include the core and theme styles: +This is **required** to apply all of the core and theme styles to your application. You can either +use a pre-built theme, or define your own custom theme. +:trident: See the [theming guide](docs/theming.md) for instructions. -## Additional setup for `md-slide-toggle` and `md-slider`: +### Additional setup for `md-slide-toggle` and `md-slider`: The slide-toggle and slider components have a dependency on [HammerJS](http://hammerjs.github.io/). Add HammerJS to your application via [npm](https://www.npmjs.com/package/hammerjs), a CDN (such as the [Google CDN](https://developers.google.com/speed/libraries/#hammerjs)), or served directly from your app. -## [Optional] Using Material Design icons with `md-icon`: +### [Optional] Using Material Design icons with `md-icon`: - If you want to use Material Design icons in addition to Angular Material components, load the Material Design font in your `index.html`. diff --git a/README.md b/README.md index e415ddd1948a..0a16f66b8b68 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ High level items planned for October 2016: | menu | Initial version, needs enhancements | [README][17] | [#119][0119] | | tooltip | Initial version, needs enhancements | [README][18] | - | | ripples | Available, but needs to be applied | [README][19] | [#108][0108] | -| dialog | Started, not yet ready for release | - | [#114][0114] | +| dialog | Started, not yet ready for release | [README][22] | [#114][0114] | | snackbar / toast | Initial version, needs enhancements | [README][21] | [#115][0115] | | select | Design started | - | [#118][0118] | | textarea | Not started | - | [#546][0546] | @@ -102,6 +102,7 @@ High level items planned for October 2016: [19]: https://github.com/angular/material2/blob/master/src/lib/core/ripple/README.md [20]: https://github.com/angular/material2/blob/master/docs/theming.md [21]: https://github.com/angular/material2/blob/master/src/lib/snack-bar/README.md +[22]: https://github.com/angular/material2/blob/master/src/lib/dialog/README.md [0107]: https://github.com/angular/material2/issues/107 [0119]: https://github.com/angular/material2/issues/119 diff --git a/e2e/components/checkbox/checkbox.e2e.ts b/e2e/components/checkbox/checkbox.e2e.ts new file mode 100644 index 000000000000..d4b0008c95bf --- /dev/null +++ b/e2e/components/checkbox/checkbox.e2e.ts @@ -0,0 +1,18 @@ +describe('checkbox', function () { + describe('check behavior', function () { + beforeEach(function() { + browser.get('/checkbox'); + }); + it('should be checked when clicked, and be unchecked when clicked again', function () { + element(by.id('test-checkbox')).click(); + element(by.css('input[id=input-test-checkbox]')).getAttribute('checked').then((value: string) => { + expect(value).toBeTruthy('Expect checkbox "checked" property to be true'); + }); + + element(by.id('test-checkbox')).click(); + element(by.css('input[id=input-test-checkbox]')).getAttribute('checked').then((value: string) => { + expect(value).toBeFalsy('Expect checkbox "checked" property to be false'); + }); + }); + }); +}); diff --git a/e2e/components/radio/radio.e2e.ts b/e2e/components/radio/radio.e2e.ts new file mode 100644 index 000000000000..7fccd196a68a --- /dev/null +++ b/e2e/components/radio/radio.e2e.ts @@ -0,0 +1,51 @@ +describe('radio', function () { + + describe('disabling behavior', function () { + beforeEach(function() { + browser.get('/radio'); + }); + + it('should be checked when clicked', function () { + element(by.id('water')).click(); + element(by.id('water')).getAttribute('class').then((value: string) => { + expect(value).toContain('md-radio-checked'); + }); + element(by.css('input[id=water-input]')).getAttribute('checked').then((value: string) => { + expect(value).toBeTruthy(); + }); + element(by.css('input[id=leaf-input]')).getAttribute('checked').then((value: string) => { + expect(value).toBeFalsy(); + }); + + element(by.id('leaf')).click(); + element(by.id('leaf')).getAttribute('class').then((value: string) => { + expect(value).toContain('md-radio-checked'); + }); + element(by.css('input[id=leaf-input]')).getAttribute('checked').then((value: string) => { + expect(value).toBeTruthy(); + }); + element(by.css('input[id=water-input]')).getAttribute('checked').then((value: string) => { + expect(value).toBeFalsy(); + }); + }); + + it('should be disabled when disable the radio group', function () { + element(by.id('toggle-disable')).click(); + element(by.id('water')).click(); + element(by.id('water')).getAttribute('class').then((value: string) => { + expect(value).toContain('md-radio-disabled'); + }); + element(by.css('input[id=water-input]')).getAttribute('disabled').then((value: string) => { + expect(value).toBeTruthy(); + }); + + element(by.id('leaf')).click(); + element(by.id('leaf')).getAttribute('class').then((value: string) => { + expect(value).toContain('md-radio-disabled'); + }); + element(by.css('input[id=leaf-input]')).getAttribute('disabled').then((value: string) => { + expect(value).toBeTruthy(); + }); + }); + }); +}); diff --git a/firebase.json b/firebase.json index 48d40be158b7..c9467c51676e 100644 --- a/firebase.json +++ b/firebase.json @@ -1,23 +1,30 @@ { - "firebase": "material2-test", - "public": "dist", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**", - "tmp", - "deploy", - "typings" - ], - "headers": [{ - "source": "*", - "headers": [{ - "key": "Cache-Control", - "value": "no-cache" - }] - }], - "rewrites": [{ - "source": "/**/!(*.@(js|ts|html|css|json|svg|png|jpg|jpeg))", - "destination": "/index.html" - }] + "hosting": { + "public": "dist", + "rewrites": [ + { + "source": "/**/!(*.@(js|ts|html|css|json|svg|png|jpg|jpeg))", + "destination": "/index.html" + } + ], + "headers": [ + { + "source": "*", + "headers": [ + { + "key": "Cache-Control", + "value": "no-cache" + } + ] + } + ], + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**", + "tmp", + "deploy", + "typings" + ] + } } diff --git a/package.json b/package.json index a0897177fe64..7fe21b6c32ec 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "zone.js": "^0.6.23" }, "devDependencies": { - "@angular/compiler-cli": "0.6.0", + "@angular/compiler-cli": "^2.0.0", "@angular/platform-server": "^2.0.0", "@types/glob": "^5.0.29", "@types/gulp": "^3.8.29", @@ -57,6 +57,7 @@ "gulp": "^3.9.1", "gulp-autoprefixer": "^3.1.1", "gulp-clean": "^0.3.2", + "gulp-cli": "^1.2.2", "gulp-sass": "^2.3.2", "gulp-server-livereload": "^1.8.2", "gulp-shell": "^0.5.2", diff --git a/scripts/sauce/sauce_connect_setup.sh b/scripts/sauce/sauce_connect_setup.sh index be110f567c53..3eb7e2202191 100755 --- a/scripts/sauce/sauce_connect_setup.sh +++ b/scripts/sauce/sauce_connect_setup.sh @@ -23,10 +23,10 @@ CONNECT_STDERR="$LOGS_DIR/sauce-connect.stderr" if [ `uname -s` = "Darwin" ]; then # If the user is running Mac, download the OSX version # https://en.wikipedia.org/wiki/Darwin_(operating_system) - CONNECT_URL="https://saucelabs.com/downloads/sc-4.3.11-osx.zip" + CONNECT_URL="https://saucelabs.com/downloads/sc-4.4.1-osx.zip" else # Otherwise, default to Linux for Travis-CI - CONNECT_URL="https://saucelabs.com/downloads/sc-4.3.11-linux.tar.gz" + CONNECT_URL="https://saucelabs.com/downloads/sc-4.4.1-linux.tar.gz" fi mkdir -p $CONNECT_DIR cd $CONNECT_DIR diff --git a/src/demo-app/button/button-demo.html b/src/demo-app/button/button-demo.html index e8d9b17ae78e..5fb68da3df3c 100644 --- a/src/demo-app/button/button-demo.html +++ b/src/demo-app/button/button-demo.html @@ -89,4 +89,16 @@ SEARCH +
+ + + + +
+
+ + + + +
diff --git a/src/demo-app/checkbox/checkbox-demo.html b/src/demo-app/checkbox/checkbox-demo.html index 9fd9c922cd8e..713f8b008d4c 100644 --- a/src/demo-app/checkbox/checkbox-demo.html +++ b/src/demo-app/checkbox/checkbox-demo.html @@ -2,6 +2,7 @@

md-checkbox: Basic Example

md-checkbox: Basic Example + +

Alignment:

@@ -41,4 +44,4 @@

md-checkbox: Basic Example

Nested Checklist

- \ No newline at end of file + diff --git a/src/demo-app/checkbox/checkbox-demo.ts b/src/demo-app/checkbox/checkbox-demo.ts index edab7a8fa15c..aed0335dc761 100644 --- a/src/demo-app/checkbox/checkbox-demo.ts +++ b/src/demo-app/checkbox/checkbox-demo.ts @@ -67,6 +67,7 @@ export class CheckboxDemo { isChecked: boolean = false; isDisabled: boolean = false; alignment: string = 'start'; + useAlternativeColor: boolean = false; printResult() { if (this.isIndeterminate) { @@ -74,4 +75,8 @@ export class CheckboxDemo { } return this.isChecked ? 'Yes!' : 'No!'; } + + checkboxColor() { + return this.useAlternativeColor ? 'primary' : 'accent'; + } } diff --git a/src/demo-app/overlay/overlay-demo.html b/src/demo-app/overlay/overlay-demo.html index 1575e8dbe222..83ac9bf82a26 100644 --- a/src/demo-app/overlay/overlay-demo.html +++ b/src/demo-app/overlay/overlay-demo.html @@ -15,8 +15,9 @@ Open menu -