* Deletes the duplicate testing utilities because #5386 just copied them to the CDK but didn't delete the old files.
* Introduces a secondary entry point (only inside of development right now) that allows us to use the testing utilities from the Material package tests
* 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.
Monkey-patches TestBed.resetTestingModule such that any errors that occur during component destruction are thrown instead of silently logged. Also runs TestBed.resetTestingModule after each unit test.
Without this patch, the combination of two behaviors is problematic for Angular Material:
- TestBed.resetTestingModule catches errors thrown on fixture destruction and logs them without the errors ever being thrown. This means that any component errors that occur in ngOnDestroy can encounter errors silently and still pass unit tests.
- TestBed.resetTestingModule is only called *before* a test is run, meaning that even *if* the aforementioned errors were thrown, they would be reported for the wrong test (the test that's about to start, not the test that just finished).
* Fixes a bunch of 404s that were being logged when debugging unit tests. It was because we're not serving the source maps for RxJS and Hammer.
* Removes a few redundant options from the Karma config, because they're the same as the defaults.
* Saucelabs seems to have issues with Edge and the `karma-coverage` plugin.
* Running on Browserstack seems to be work without any flakiness and also makes the build faster (runs less browsers than on saucelabs)
Karma recently introduced a breaking change, that **hasn't** been noted (https://github.com/karma-runner/karma/issues/2582).
Karma doesn't show any `console.log` calls anymore, because the priority order of the `LogLevel`'s has been changed. The default log leve for the `browserConsoleLog` does no longer include the `LOG` log-level.
* chore(focus-classes): fix failing tests when browser is blurred
On Saucelabs, browsers will run simultaneously and therefore can't focus all browser windows at the same time.
This is problematic when testing focus states. Chrome and Firefoxonly fire FocusEvents when the window is focused. This issue also appears locally.
Fixes#2903.
* Extract patch logic into extra function
* Updates the Unit test browsers to the `latest` version on Saucelabs
* No longer records videos & screenshots on the e2e mode, because this seems to slow the builds significant.
Add basic focus/keyboard support for chips.
- Up/down arrows navigate chips.
- Clicking a chip properly focuses it for subsequent keyboard
navigation.
- More demos.
Confirmed AoT compatibility.
References #120.
* 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.
Avoids Karma running tests multiple times when developing locally, due to it triggering a test run whenever a new file is written to disk. This change switches to manually spawning a Karma server and then running the tests by depending on Gulp's API instead.
* Fixes the Karma tasks not exiting properly. This is an issue, because doing a keyboard interrupt doesn't stop the Gulp watchers that are going on in the background.
* Increase the time that Karma waits before starting to run tests. This should help mitigate the multiple reloads when running unit tests locally.
Related to #1681.