-
Notifications
You must be signed in to change notification settings - Fork 8
feature[TW26940]: Web - Refactor @Input to signal inputs and playwrig… #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -656,7 +661,10 @@ | |||
"environment": "all" | |||
}, | |||
"packageManager": "pnpm", | |||
"schematicCollections": ["@angular-eslint/schematics"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need to fix your editor setup to use prettier and eslint to fix this automatically
await page.goto('http://localhost:4200/ple/artifact/explorer'); | ||
|
||
//Choose a working branch, view the artifact | ||
await page.getByRole('radio', { name: 'Working' }).check(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need an expect in here somewhere?
@@ -0,0 +1,84 @@ | |||
import { test, expect } from '@ngx-playwright/test'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming nit - create-action-commit-branch instead of createaction-commitbranch
//Go to Artifact Explorer page | ||
await page.goto('http://localhost:4200/ple/artifact/explorer'); | ||
|
||
// Search & Pick product line branch then look for its change report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these should probably have an expect at some point to check that performing the action actually "did" what it says
} | ||
branchType = input<'working' | 'baseline' | undefined>(); | ||
branchId = input.required<string>() | ||
constructor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an effect is not needed for this....go look at MIM
private headerService = inject(HeaderService); | ||
private crService = inject(ChangeReportService); | ||
|
||
@Input() branchId = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simpler, better fix: branchId = input.required();
branchId$ = toObservable(this.branchId);
relationSide = input.required<artifactRelationSide>(); | ||
typeToken = input.required<relationTypeToken>(); | ||
paths = input.required<string[][]>(); | ||
constructor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these _ observables can just be derived via toObservable()
@@ -13,19 +13,21 @@ | |||
@if (branchId$ | async; as branchId) { | |||
@if (option$ | async; as options) { | |||
@if (options.showRelations) { | |||
@if (relation$ | async; as relations) { | |||
@if (relation$() | async; as relations) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? if it's a signal, it shouldn't be async. So either use the observable with |async or use the signal with ()
@@ -30,9 +30,19 @@ export class ArtifactHierarchyRelationsComponent { | |||
private optionsService = inject(ArtifactHierarchyOptionsService); | |||
private uiService = inject(UiService); | |||
|
|||
@Input() relation$!: Observable<artifactRelation[]>; | |||
@Input() paths!: string[][]; | |||
relation$ = input.required<Observable<artifactRelation[]>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above, use toObservable()
@@ -68,8 +68,14 @@ export class ArtifactHierarchyComponent { | |||
); | |||
|
|||
artifactId = input.required<string>(); | |||
@Input() set paths(paths: string[][]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use toObservable()
…ht tests