-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(v8/angular): Remove instrumentAngularRouting and fix tests (#11021)
- Loading branch information
Showing
11 changed files
with
302 additions
and
656 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
dev-packages/e2e-tests/test-applications/angular-17/src/app/cancel-guard.guard.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ActivatedRouteSnapshot, CanActivateFn, RouterStateSnapshot } from '@angular/router'; | ||
|
||
export const cancelGuard: CanActivateFn = (_next: ActivatedRouteSnapshot, _state: RouterStateSnapshot) => { | ||
return false; | ||
}; |
8 changes: 8 additions & 0 deletions
8
dev-packages/e2e-tests/test-applications/angular-17/src/app/cancel/cancel.components.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-cancel', | ||
standalone: true, | ||
template: `<div></div>`, | ||
}) | ||
export class CancelComponent {} |
18 changes: 18 additions & 0 deletions
18
.../test-applications/angular-17/src/app/component-tracking/component-tracking.components.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { AfterViewInit, Component, OnInit } from '@angular/core'; | ||
import { TraceClassDecorator, TraceMethodDecorator, TraceModule } from '@sentry/angular-ivy'; | ||
import { SampleComponent } from '../sample-component/sample-component.components'; | ||
|
||
@Component({ | ||
selector: 'app-cancel', | ||
standalone: true, | ||
imports: [TraceModule, SampleComponent], | ||
template: `<app-sample-component [trace]="'sample-component'"></app-sample-component>`, | ||
}) | ||
@TraceClassDecorator() | ||
export class ComponentTrackingComponent implements OnInit, AfterViewInit { | ||
@TraceMethodDecorator() | ||
ngOnInit() {} | ||
|
||
@TraceMethodDecorator() | ||
ngAfterViewInit() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...ests/test-applications/angular-17/src/app/sample-component/sample-component.components.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-sample-component', | ||
standalone: true, | ||
template: `<div></div>`, | ||
}) | ||
export class SampleComponent implements OnInit { | ||
ngOnInit() { | ||
console.log('SampleComponent'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.