Skip to content

Commit cf98777

Browse files
alan-agius4alxhub
authored andcommitted
test: update tests to remove deprecated withServerTransition (#49422)
This commit removes the usages of `withServerTransition` form tests. PR Close #49422
1 parent 82d6fbb commit cf98777

File tree

15 files changed

+41
-51
lines changed

15 files changed

+41
-51
lines changed

aio/content/examples/universal/src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { isPlatformBrowser } from '@angular/common';
2121

2222
@NgModule({
2323
imports: [
24-
BrowserModule.withServerTransition({ appId: 'tour-of-heroes' }),
24+
BrowserModule,
2525
FormsModule,
2626
AppRoutingModule,
2727
HttpClientModule,

integration/cli-elements-universal/src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { isPlatformBrowser } from '@angular/common';
2-
import { CUSTOM_ELEMENTS_SCHEMA, Inject, Injector, NgModule, PLATFORM_ID } from '@angular/core';
2+
import { APP_ID, CUSTOM_ELEMENTS_SCHEMA, Inject, Injector, NgModule, PLATFORM_ID } from '@angular/core';
33
import { createCustomElement } from '@angular/elements';
44
import { BrowserModule } from '@angular/platform-browser';
55
import { RouterModule } from '@angular/router';
@@ -16,7 +16,7 @@ import { TitleComponent } from './title.component';
1616
TitleComponent,
1717
],
1818
imports: [
19-
BrowserModule.withServerTransition({ appId: 'serverApp' }),
19+
BrowserModule,
2020
RouterModule.forRoot([]),
2121
],
2222
schemas: [

integration/injectable-def/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class TestApp {}
1414
bootstrap: [TestApp],
1515
imports: [
1616
Lib2Module,
17-
BrowserModule.withServerTransition({appId: 'appId'}),
17+
BrowserModule,
1818
ServerModule,
1919
],
2020
})

integration/platform-server/e2e/helloworld-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Hello world E2E Tests', function() {
1515
// Load the page without waiting for Angular since it is not bootstrapped automatically.
1616
browser.driver.get(browser.baseUrl + 'helloworld');
1717

18-
const style = browser.driver.findElement(by.css('style[ng-app="hlw"]'));
18+
const style = browser.driver.findElement(by.css('style[ng-app="ng"]'));
1919
expect(style.getText()).not.toBeNull();
2020

2121
// Test the contents from the server.
@@ -28,7 +28,7 @@ describe('Hello world E2E Tests', function() {
2828
expect(element(by.css('div')).getText()).toEqual('Hello world!');
2929

3030
// Make sure the server styles get reused by the client.
31-
expect(element(by.css('style[ng-app="hlw"]')).isPresent()).toBeFalsy();
31+
expect(element(by.css('style[ng-app="ng"]')).isPresent()).toBeFalsy();
3232
expect(element(by.css('style[ng-style-reused]')).isPresent()).toBeTruthy()
3333
expect(element(by.css('style')).getText()).toBe('');
3434

integration/platform-server/src/helloworld/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {HelloWorldComponent} from './hello-world.component';
1414
@NgModule({
1515
declarations: [HelloWorldComponent],
1616
bootstrap: [HelloWorldComponent],
17-
imports: [BrowserModule.withServerTransition({appId: 'hlw'})],
17+
imports: [BrowserModule],
1818
})
1919
export class HelloWorldModule {
2020
}

integration/platform-server/src/transferstate/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {TransferStateComponent} from './transfer-state.component';
1515
declarations: [TransferStateComponent],
1616
bootstrap: [TransferStateComponent],
1717
imports: [
18-
BrowserModule.withServerTransition({appId: 'ts'}),
18+
BrowserModule,
1919
],
2020
})
2121
export class TransferStateModule {

packages/compiler-cli/integrationtest/bazel/injectable_def/app/src/basic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class AppComponent {
2121
@NgModule({
2222
imports: [
2323
Lib2Module,
24-
BrowserModule.withServerTransition({appId: 'id-app'}),
24+
BrowserModule,
2525
ServerModule,
2626
],
2727
declarations: [AppComponent],

packages/compiler-cli/integrationtest/bazel/injectable_def/app/src/dep.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class AppComponent {
2727

2828
@NgModule({
2929
imports: [
30-
BrowserModule.withServerTransition({appId: 'id-app'}),
30+
BrowserModule,
3131
ServerModule,
3232
],
3333
declarations: [AppComponent],

packages/compiler-cli/integrationtest/bazel/injectable_def/app/src/hierarchy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class ChildComponent {
3636

3737
@NgModule({
3838
imports: [
39-
BrowserModule.withServerTransition({appId: 'hierarchy-app'}),
39+
BrowserModule,
4040
ServerModule,
4141
],
4242
declarations: [AppComponent, ChildComponent],

packages/compiler-cli/integrationtest/bazel/injectable_def/app/src/root.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function children(): any {
2828

2929
@NgModule({
3030
imports: [
31-
BrowserModule.withServerTransition({appId: 'id-app'}),
31+
BrowserModule,
3232
ServerModule,
3333
RouterModule.forRoot(
3434
[

0 commit comments

Comments
 (0)