-
Notifications
You must be signed in to change notification settings - Fork 2
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
DECISION-26436_Upgrades_angular_jasmine_karma_components #171
DECISION-26436_Upgrades_angular_jasmine_karma_components #171
Conversation
@@ -58,7 +58,7 @@ export class FieldComponent { | |||
return this.formModel && this.formModel.value; | |||
} | |||
|
|||
private get required() { |
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.
was this causing an issue?
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.
yes is is causing an issue, on build it fails in AOT compilation.
Kindly find below links for Reference,
https://stackoverflow.com/questions/43141576/property-x-is-private-and-only-accessible-within-class-xyzcomponent
angular/angular/issues/11422(https://github.com/)
@@ -91,15 +92,15 @@ describe('FieldComponent', () => { | |||
})); | |||
|
|||
it('should add a label style', async(() => { | |||
expect(fixture.debugElement.query(By.css('.fx-field__label')).properties['color']).toBe(this.styleObj); |
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 this.styleObj is not being used anymore, can you remove it?
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.
removed newly introduced variable labelColor and updated the specs with styleObj itself
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.
did you check this with our application?
}); | ||
|
||
beforeEach(async(() => fixture.detectChanges())); | ||
beforeEach(waitForAsync(() => fixture.detectChanges())); |
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.
why this? waitForAsync
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.
async has been deprecated in angular 12 (replaced with waitForAsync), initial point of time it was causing some issue of specs failure for this file and not able to run specs, so replaced with waitForAsync. But now with async, specs are running fine so reverted the changes of waitForAsync to async.
did you check this with our application? |
yes, In local, I have replaced the dist folder of forms extensions with our application and changes are working fine |
LGTM |
Upgrades_angular_jasmine_karma_components
JIRA LINK: https://jira.sapiens.com/browse/DECISION-26436
Angular: 7.3.0 -> 12.2.7
Jasmine: 3.3.0 -> 3.9.0
Karma: 3.1.1 -> 6.3.4
Typescript: 3.2.4 -> 4.3.5