Skip to content

Commit

Permalink
Migrate from deprecated RouterTestingModule
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Paranoiaque committed May 5, 2024
1 parent 2a8785c commit e8bd4f8
Show file tree
Hide file tree
Showing 121 changed files with 184 additions and 264 deletions.
2 changes: 0 additions & 2 deletions src/app/admin-actions/admin-actions.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminActionsComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminActionsComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-agora/admin-agora.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminAgoraComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminAgoraComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-aimage/admin-aimage.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminAimageComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminAimageComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-alliances/admin-alliances.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminAlliancesComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminAlliancesComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-chat/admin-chat.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminChatComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminChatComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
12 changes: 9 additions & 3 deletions src/app/admin-contact/admin-contact.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { provideRouter } from '@angular/router';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +22,6 @@ describe('AdminContactComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminContactComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand All @@ -33,7 +32,14 @@ describe('AdminContactComponent', () => {
OAuthModule.forRoot(),
HttpClientTestingModule,
],
providers: [Socket, User, OAuthService, BsModalService, FormBuilder],
providers: [
provideRouter([]),
Socket,
User,
OAuthService,
BsModalService,
FormBuilder,
],
}).compileComponents();
socket = TestBed.inject(Socket);
socket.setupSocketConnection(environment.SERVER_DEV);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminDuplicateemailComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminDuplicateemailComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-duplicateip/admin-duplicateip.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminDuplicateipComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminDuplicateipComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-emails/admin-emails.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminEmailsComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminEmailsComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-history/admin-history.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminHistoryComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminHistoryComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
12 changes: 9 additions & 3 deletions src/app/admin-ip/admin-ip.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { provideRouter } from '@angular/router';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +22,6 @@ describe('AdminIpComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminIpComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand All @@ -33,7 +32,14 @@ describe('AdminIpComponent', () => {
OAuthModule.forRoot(),
HttpClientTestingModule,
],
providers: [Socket, User, OAuthService, BsModalService, FormBuilder],
providers: [
provideRouter([]),
Socket,
User,
OAuthService,
BsModalService,
FormBuilder,
],
}).compileComponents();
socket = TestBed.inject(Socket);
socket.setupSocketConnection(environment.SERVER_DEV);
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-messages/admin-messages.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminMessagesComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminMessagesComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
12 changes: 9 additions & 3 deletions src/app/admin-news/admin-news.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { provideRouter } from '@angular/router';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +22,6 @@ describe('AdminNewsComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminNewsComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand All @@ -33,7 +32,14 @@ describe('AdminNewsComponent', () => {
OAuthModule.forRoot(),
HttpClientTestingModule,
],
providers: [Socket, User, OAuthService, BsModalService, FormBuilder],
providers: [
provideRouter([]),
Socket,
User,
OAuthService,
BsModalService,
FormBuilder,
],
}).compileComponents();
socket = TestBed.inject(Socket);
socket.setupSocketConnection(environment.SERVER_DEV);
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-page404/admin-page404.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminPage404Component', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminPage404Component],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-passwordtry/admin-passwordtry.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminPasswordtryComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminPasswordtryComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-pauses/admin-pauses.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminPausesComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminPausesComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-permissions/admin-permissions.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminPermissionsComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminPermissionsComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-pimage/admin-pimage.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminPimageComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminPimageComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-players/admin-players.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminPlayersComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminPlayersComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-prayers/admin-prayers.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminPrayersComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminPrayersComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
12 changes: 9 additions & 3 deletions src/app/admin-profile/admin-profile.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { provideRouter } from '@angular/router';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +22,6 @@ describe('AdminProfileComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminProfileComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand All @@ -33,7 +32,14 @@ describe('AdminProfileComponent', () => {
OAuthModule.forRoot(),
HttpClientTestingModule,
],
providers: [Socket, User, OAuthService, BsModalService, FormBuilder],
providers: [
provideRouter([]),
Socket,
User,
OAuthService,
BsModalService,
FormBuilder,
],
}).compileComponents();
socket = TestBed.inject(Socket);
socket.setupSocketConnection(environment.SERVER_DEV);
Expand Down
2 changes: 0 additions & 2 deletions src/app/admin-quests/admin-quests.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TestBed } from '@angular/core/testing';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { RouterTestingModule } from '@angular/router/testing';
import { SocketComponent as Socket } from '../../services/socketio.service';
import { UserComponent as User } from '../../services/user.service';
import { OAuthModule, OAuthService } from 'angular-oauth2-oidc';
Expand All @@ -22,7 +21,6 @@ describe('AdminQuestsComponent', () => {
schemas: [NO_ERRORS_SCHEMA],
declarations: [AdminQuestsComponent],
imports: [
RouterTestingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
Loading

0 comments on commit e8bd4f8

Please sign in to comment.