-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(platform-browser): avoid including Testability by default in `bo…
…otstrapApplication` (#45885) The Testability-related logic was refactored in #45657 to become tree-shaking-friendly: it was decoupled from the core providers of the `BrowserModule`. This commit updates the newly-introduced `bootstrapApplication` function to exclude Testability-providers by default (note: the Testability is still included in the NgModule-based bootstrap). In order to add the Testability to the app bootstrapped via `bootstrapApplication`, the `provideProtractorTestingSupport` function is introduced. PR Close #45885
- Loading branch information
1 parent
9f6fa5b
commit 23c4c96
Showing
7 changed files
with
60 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,11 @@ | ||
import {browser, logging} from 'protractor'; | ||
|
||
import {AppPage} from './app.po'; | ||
|
||
/** | ||
* Note: this file contains no e2e tests, since they rely on Protractor, | ||
* which requires Testability. Testability is not included by default when | ||
* the `bootstrapApplication` function is used (which is the case in this app). | ||
* We use this app primarily to measure payload size, so we want to keep | ||
* Testability excluded. | ||
*/ | ||
describe('Standalone Bootstrap app', () => { | ||
let page: AppPage; | ||
|
||
beforeEach(() => { | ||
page = new AppPage(); | ||
}); | ||
|
||
it('should display title', () => { | ||
page.navigateTo(); | ||
expect(page.getTitleText()).toEqual('Standalone Bootstrap app'); | ||
}); | ||
|
||
afterEach(async () => { | ||
// Assert that there are no errors emitted from the browser | ||
const logs = await browser.manage().logs().get(logging.Type.BROWSER); | ||
expect(logs).not.toContain(jasmine.objectContaining({ | ||
level: logging.Level.SEVERE, | ||
} as logging.Entry)); | ||
}); | ||
// Jasmine will throw if there are no tests. | ||
it('should pass', () => {}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters