Commit Graph

73 Commits

Author SHA1 Message Date
Kristiyan Kostadinov 66da5973db feat: update to Angular 4.3 (#6483)
* feat: update to Angular 4.3

* Bumps the Angular requirement to 4.3. This is also a prerequisite to the Angular 5 update since we encountered the same errors there.
* Refactors the sidenav not to use a `Promise.resolve` for toggling the initial animation, because it was making it impossible to flush the animations in unit tests. The new simplified approach uses a property to pass the animation state.
* Fixes the nested menu test failures.
* Fixes a "changed after checked" error in the autocomplete demo app.

Relates to #6454.

* fix: e2e failures
2017-08-16 13:14:12 -07:00
Paul Gschwendtner 2286ad5b98 test(): screenshot diff for button-toggle (#6374)
* Adds the button-toggle overview example to the e2e app and captures a screenshot diff for it.
2017-08-09 14:58:49 -07:00
Paul Gschwendtner 8d09961562 test(): screenshot diff for opened dialog (#6309)
* Creates a screenshot for a simple opened dialog
2017-08-07 10:22:53 -07:00
Paul Gschwendtner fbc0b95758 test(): screenshot diff for toolbar (#6308)
* Adds the toolbar demo to the e2e app and adds a screenshot diff for it.
2017-08-07 10:22:28 -07:00
Kristiyan Kostadinov a882546deb refactor(sidenav): switch to the angular animations API (#4959)
* refactor(sidenav): switch to the angular animations API

Switches the sidenav to use the `@angular/animations` API. This saves us a lot of code that was involved in orchestrating the various animations, in addition to making it easier to follow. It also makes it possible for the consumer to disable the animations by using the `NoopAnimationsModule`.

* chore: remove redundant annotations

* fix: focus restoration issue in IE

* chore: linting error

* chore: put back the toggle animation promises

* fix: avoid initial animation

* fix: sidenav not showing when animation starts

* chore: update e2e tests
2017-07-31 11:05:47 -07:00
mmalerba 0e95c89967 e2e: attempt to fix input screenshot flakes. (#6010) 2017-07-27 09:49:11 -07:00
Kristiyan Kostadinov 89e9621158 chore(sidenav): switch to OnPush change detection (#5731)
Switches the `MdSidenavContainer` to `OnPush` change detection and fixes some changes not being picked up when its sidenav is opened.

Relates to #5035.
2017-07-25 16:26:59 -07:00
mmalerba e0fc5266e8 fix(input): add overflow:hidden when calculating autosize height (#5773) 2017-07-20 10:57:50 -07:00
Jeremy Elbourn d70a669f79 chore: add material-examples to e2e-app (#5735) 2017-07-17 11:14:15 -07:00
Paul Gschwendtner bcf48261f4 fix(checkbox, radio): setting id to null causes invalid id for input (#5398)
* In some situations, developers will change the `id` of a component dynamically. At some point if they set the `[id]` to `null` the input id will look like the following: `null-input`.
* If developers are setting the `id` using a binding then the DOM Id for the host component won't be set at all (because the @Input is triggered instead of the DOM property)

Fixes #5394
2017-07-11 10:09:02 -07:00
robindijkhof 5e961cb221 test(sidenav): add e2e tests (#5463) 2017-07-10 15:24:26 -07:00
Paul Gschwendtner 589dc05149 build: enable no-unused-variable lint rule (#5184)
* Now TSLint starts reporting unused variables again (Rule has been un-deprecated and now uses the type checker
* In favor of linting the whole project the tsconfig file inside of `src/` needs to live in the project root.
2017-07-07 11:42:52 -07:00
robindijkhof 20e704b074 test(input): add textarea e2e test (#5517)
* e2e(input): add textarea e2e test

* test(input): remove fdescribe
2017-07-06 15:53:21 -07:00
Kristiyan Kostadinov 2bf7024527 feat: add support for strict null checks (#5094) 2017-06-21 10:13:52 -07:00
Kristiyan Kostadinov 8e6bee8116 chore: reorganize e2e test files (#5032)
* Renames the e2e test file to match the pattern of `{{component}}-e2e.spec.ts`.
* Flattens the directory structure in the `e2e` directory. Having a separate dir for each component was overkill since only have one file per component.
* Fixes some inconsistent code styles in the Protractor config.

Fixes #5030.
2017-06-09 16:09:08 -07:00
Jeremy Elbourn 657f0e829e fix(icon): remove automatic aria labelling and add a11y guidance (#4665)
The automatic application of aria-label for md-icon, in hindsight, was
not a great idea. Neither the ligature string nor the SVG filename are
likely to be meaningful descriptions. Even in cases where they *are*,
the icon may be used in such a way that the application of a label is
still the wrong thing. On top of that, adding `role="img"` is usually
not the right approach for an icon, as that role typically refers to
*content* images, rather than icons that are part of the UI.

Ultimately, it is up to the application developer to add the appropriate
meaning for icons based on how they're used. To this end, we add
guidance to the documentation for what to do in different situations.
2017-06-08 11:21:52 -07:00
Kristiyan Kostadinov 50f1c266ef refactor: switch e2e tests to async/await (#4705)
* refactor: switch e2e tests to async/await

Switches to using async/await in the e2e tests. This should make it a bit easier to deal with Protractor's async APIs.

* chore: remove the async wrapper
2017-06-01 08:49:20 -07:00
Kristiyan Kostadinov 6842046979 feat(overlay): add scroll blocking strategy (#4500)
Adds the `BlockScrollStrategy` which, when activated, will prevent the user from scrolling. For now it is only used in the dialog.

Relates to #4093.
2017-05-15 14:28:30 -07:00
mmalerba 2db3d61e55 add e2e test that would have caught regression in #3878 (#4207) 2017-04-25 16:41:03 -07:00
Paul Gschwendtner becb7a87e0 build: tsconfig for editor warnings (#3791)
* build: tsconfig for editor warnings

Currently when using a code editor that uses the TypeScript language service (Webstorm / VS Code / Atom / Sublime) there will be TypeScript errors in the `.spec` files.

This is because the editor finds the `tsconfig.json` file that doesn't match the spec files. Therefore it complains about the `experimentalDecorators`.

In `angular/angular` there is a global `tsconfig` file that matches everything and is therefore fixing the editor warnings. This file is also used to compile all `.spec` files for the whole project.

We can add such a `tsconfig.json` file as well, and in the future we can use it for compiling the specs as well.

* Add docs for tsconfig files
2017-03-30 02:13:33 +08:00
Paul Gschwendtner 0560eab12f test(): cleanup screenshot files in e2e-app (#3367) 2017-03-02 16:50:05 -08:00
tinayuangao 194714ac83 test(e2e): Fix e2e flakes by setting default window size (#3234)
* .

* Try to make screenshot image size same as before

* change back to 1024 x 768
2017-02-22 15:24:26 -08:00
tinayuangao 537ef17912 Make slide toggle e2e test take screenshots when ripple disappeared (#3171) 2017-02-21 11:37:30 -08:00
tinayuangao 3beccb9e70 feat(e2e): Take screenshots for grid-list, list, icon, menu, radio, tabs, slide-toggle (#3098)
* Update e2e tests, take screenshots when screen become stable

* fix lint

* Make id optional

* Remove screenshot for checkbox with keyboard event

* Fix radio test
2017-02-16 15:43:29 -08:00
Kristiyan Kostadinov a08dc55802 fix(dialog): escape key not working once element loses focus (#3082)
Fixes issue in the dialog that prevented the user from being able to close via the escape key, if any of the elements inside the dialog loses focus.

Fixes #3009.
2017-02-14 16:48:44 -08:00
mmalerba bf0f625ee3 feat(dialog): support open with TemplateRef (#2910)
* feat(dialog): support open with TemplateRef

* add e2e test
2017-02-10 02:32:07 +08:00
Andrew Seguin 210ff020d2 feat(compatibility): remove conflicts with material1 css styling (#2790)
* feat(compatibility): remove conflicts with material1 css styling

* fix tests

* fix input changes

* autocomplete changes

* merge changes

* change class assignment to evaluation

* add back in the line truncate for select

* fix button on simple snackbar

* fix tests
2017-02-09 03:24:31 +08:00
Paul Gschwendtner d9f57001cd build: run tslint against e2e directory (#2945)
* Now runs TSLint also against the e2e/ directory.
* Add comments for the different tasks in the lint file.
* Refactors the screenshot e2e file to pass TSLint and also to be less nested.
2017-02-06 15:00:26 -08:00
Elad Bezalel 408c58d569 style(branding): branding consistency fixup (#2805)
fixes #2803
2017-01-26 15:35:39 -08:00
tinayuangao aab6aee569 test(e2e): Use current directory so e2e test won't complain about directory not exists (#2693)
* Use current directory so e2e test wont complain about directory not exists

* change .gitignore

* Only take screenshot when run on travis

* remove log
2017-01-20 09:39:36 -08:00
Kristiyan Kostadinov 899f190da7 test: add class with e2e test utilities (#2070)
* test: add class with e2e test utilities

* Adds a class that simplifies some common and hard to remember Protractor expressions.
* Refactors the existing tests to use the new utilities.

Fixes #2025.

* Add types to the e2e utils and fix the selector on the dialog tests.

* Remove unnecessary rounding.

* Remove `any` cast.

* Simplify the slide toggle tests.

* Split the E2E utils class into smaller files.

* Fix a leftover.
2017-01-18 14:13:48 -08:00
Paul Gschwendtner 4ab6f30f50 chore(e2e): update to latest protractor version (#2608)
* chore(e2e): update to latest protractor version

* Updates to the latest Protractor version, which now uses Selenium V3
* The new types for Protractor v5 include the fix for the missing `chord` function (See https://github.com/DefinitelyTyped/DefinitelyTyped/commit/123690bb2e0f9dac2371084369a8ecf8976cbb34)
* Methods like `innerHtml` have been removed in Protractor v5 (https://github.com/angular/protractor/blob/master/CHANGELOG.md)

* Test later chromedriver version
2017-01-13 14:59:01 -08:00
tinayuangao 8ba8debeb5 feat(screenshot): Add screenshot function to e2e test (button and checkbox) (#2532)
* Add screenshot function to e2e test (button and checkbox)

* Add reporter for jasmine

* Change directory to constant, and use variable to store name
2017-01-12 13:24:51 -08:00
quanterion 06403028a6 feat(overlay): add fullscreen-enabled overlay class (#1949)
* feat(overlay): add fullscreen overlay class

* fix lint error

* move fs container to a new file and rename it

* add e2e tests

* fix tests

* rebased and fix comments

* fix typings

* fix e2e tests

* address comments

* fix tests
2017-01-10 16:11:55 -08:00
Kristiyan Kostadinov bdc48a8371 build: avoid typing errors in TypeScript 2.1 and update gulp-typescript (#2456)
Related to #1998.
2017-01-04 10:36:28 -08:00
Paul Gschwendtner 7d74287096 chore: remove temporary sleep in menu e2e test (#2480) 2017-01-03 09:29:30 -08:00
Paul Gschwendtner 3230c33f54 chore(checkbox): add e2e test for spacebar checking (#2397)
* Adds the missing e2e test for the checkbox, where the space key should toggle the state
* Cleanup the existing e2e test by removing repeating statements
2016-12-27 19:33:23 -08:00
tinayuangao 221c234a71 fix(progress-spinner): Rename ProgressCircle to ProgressSpinner (#2300)
* Rename ProgressCircle to ProgressSpinner

* Make old selectors work

* Added progres-circle file
2016-12-20 20:05:13 -08:00
Kristiyan Kostadinov 3cf25a035e refactor: change the toolkit directive prefixes and remove Md prefix from toolkit classes (#2258)
* refactor: change the toolkit directive prefixes and remove Md prefix from toolkit classes

Renames the the component toolkit to use the `cdk-` prefix, in addition to removing the `Md` prefix from classes associated with the toolkit.
The following CSS classes have been renamed as well:

* `md-global-overlay-wrapper` -> `cdk-global-overlay-wrapper`
* `md-overlay-container` -> `cdk-overlay-container`
* `md-overlay-pane` -> `cdk-overlay-pane`
* `md-overlay-backdrop-showing` -> `cdk-overlay-backdrop-showing`
* `md-overlay-dark-backdrop` -> `cdk-overlay-dark-backdrop`
* `md-overlay-backdrop` -> `cdk-overlay-backdrop`
* `md-visually-hidden` -> `cdk-visually-hidden`

* Re-export Md prefixed classes as deprecated

* Fix linter errors.

* Change the overlay variable prefixes to `cdk-` and remove dependency on theming.

* Add backwards compatible selectors for core directives
2016-12-19 18:08:35 -08:00
Kristiyan Kostadinov 508703a8c5 test: use proper typings in e2e app (#2051)
* test: use proper typings in e2e app

* Switches to use the typings from @types for the e2e app.
* Adds all of the necessary imports and fixes type issues.

Relates to #2025.
Fixes #1531.

* Add missing typings to slide toggle.

* Fix another typo.
2016-12-19 10:17:23 -08:00
Paul Gschwendtner c5fb94f2a4 chore: run a11y audits on protractor (#2010)
* chore: run a11y audits on protractor

* Fixes accessibility issue in grid-list with `role="listitem"`
* Adds protractor plugin to run aXe-core accessibility audits
* Fixes a bunch of a11y issues in the e2e app to make the aXe audits green

* Force menu y-positions because viewport might be different on Selenium browsers.

* Navigiation links should be hidden by default because those can interfere with the tests.
2016-12-13 12:10:31 -08:00
Paul Gschwendtner ac2f78471e chore: add e2e tests for md-slide-toggle (#2161)
* chore: add e2e tests for md-slide-toggle

* Adds some basic e2e tests for the md-slide-toggle component.

Closes #1963.

* Add space key test
2016-12-13 11:38:17 -08:00
Kristiyan Kostadinov 8c5a5e1a69 refactor(connected-position-strategy): use top/left instead of transforms for positioning (#2024)
* refactor(connected-position-strategy): use top/left instead of transforms for positioning

Switches the `ConnectedPositionStrategy` to use `top` and `left` for positioning, instead of `translateX` and `translateY`. This avoids having to do extra work to prevent subpixel rendering issues, while freeing up the transforms to be used on animations or for offsets.

* Fix the failing positioning-related tests.
2016-12-05 22:46:15 -08:00
Kristiyan Kostadinov 6433cc813b test(progress-circle): add basic e2e tests (#1954)
Adds basic assertions that the various progress circle variations have been rendered.

Fixes #559.
2016-11-30 17:07:44 -08:00
Kristiyan Kostadinov 7f37ec1d4a test(progress-bar): add basic e2e tests (#1895)
Adds basic e2e tests that assert that the different progress bars are being rendered.

Referencing #559.
2016-11-28 14:43:09 -08:00
Jeremy Elbourn 303dd69580 fix(overlay): prevent blurry connected overlays (#1784) 2016-11-17 11:56:00 -08:00
Kristiyan Kostadinov 289070ec3f test(list): add basic e2e tests (#1876)
Fixes #547.
2016-11-16 10:18:09 -08:00
Kristiyan Kostadinov a991ffd77a test(grid-list): add basic e2e tests (#1874)
Fixes #547.
2016-11-15 16:29:32 -08:00
Kristiyan Kostadinov c255a70981 test(dialog): add e2e tests (#1828)
Fixes #1642.
2016-11-14 16:50:17 -08:00
Andrew Seguin f6944e4f90 feat(tabs): animate tab change, include optional dynamic height (#1788) 2016-11-11 14:27:01 -08:00