mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Add an integration test to verify defer block behavior with input handling during server-side rendering (SSR). PR Close #61040
27 lines
936 B
TypeScript
27 lines
936 B
TypeScript
import {browser, by, element} from 'protractor';
|
|
import {bootstrapClientApp, navigateTo, verifyNoBrowserErrors} from './util';
|
|
|
|
describe('Defer E2E Tests', () => {
|
|
beforeEach(async () => {
|
|
// Don't wait for Angular since it is not bootstrapped automatically.
|
|
await browser.waitForAngularEnabled(false);
|
|
|
|
// Load the page without waiting for Angular since it is not bootstrapped automatically.
|
|
await navigateTo('defer');
|
|
});
|
|
|
|
afterEach(async () => {
|
|
// Make sure there were no client side errors.
|
|
await verifyNoBrowserErrors();
|
|
});
|
|
|
|
it('should text in defered component with input', async () => {
|
|
// Test the contents from the server.
|
|
expect(await element(by.css('p')).getText()).toEqual('Hydrate Never works!');
|
|
|
|
await bootstrapClientApp();
|
|
|
|
// Retest the contents after the client bootstraps.
|
|
expect(await element(by.css('p')).getText()).toEqual('Hydrate Never works!');
|
|
});
|
|
});
|