angular/integration/platform-server-zoneless/e2e/src/util.ts
Alan Agius d94fb764d0 test: add integration test for platform-server with zoneless (#61040)
Add an integration test to verify SSR with zoneless

PR Close #61040
2025-04-30 12:37:01 -07:00

31 lines
892 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.dev/license
*/
import * as webdriver from 'selenium-webdriver';
import {browser} from 'protractor';
export async function verifyNoBrowserErrors(): Promise<void> {
const browserLog = await browser.manage().logs().get('browser');
const errors: string[] = [];
for (const {message, level} of browserLog) {
console.log('>> ' + message);
if (level.value >= webdriver.logging.Level.INFO.value) {
errors.push(message);
}
}
expect(errors).toEqual([]);
}
export async function navigateTo(url: string): Promise<void> {
await browser.driver.get(browser.baseUrl + url);
}
export async function bootstrapClientApp(): Promise<void> {
await browser.executeScript('doBootstrap()');
}