mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit improves the HTTP transfer state integration test by using `provideClientHydration` method and validates that no HTTP calls are performed during the client bootstrapping. PR Close #49810
29 lines
780 B
TypeScript
29 lines
780 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
/* tslint:disable:no-console */
|
|
import * as webdriver from 'selenium-webdriver';
|
|
declare var browser: any;
|
|
declare var expect: any;
|
|
|
|
export function verifyNoBrowserErrors() {
|
|
browser
|
|
.manage()
|
|
.logs()
|
|
.get('browser')
|
|
.then((browserLog: any[]) => {
|
|
const errors: any[] = [];
|
|
browserLog.forEach((logEntry) => {
|
|
const msg = logEntry.message;
|
|
console.log('>> ' + msg);
|
|
if (logEntry.level.value >= webdriver.logging.Level.INFO.value) {
|
|
errors.push(msg);
|
|
}
|
|
});
|
|
expect(errors).toEqual([]);
|
|
});
|
|
}
|