RIUI-314 - Send questions failure message #112
Conversation
Codecov Report
@@ Coverage Diff @@
## master #112 +/- ##
=========================================
Coverage ? 81.79%
=========================================
Files ? 76
Lines ? 978
Branches ? 43
=========================================
Hits ? 800
Misses ? 160
Partials ? 18
Continue to review full report at Codecov.
|
@@ -115,36 +115,3 @@ p { | |||
font-size: 16px; | |||
line-height: 20px; | |||
} | |||
|
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.
This is defined in _alert.scss so not needed here.
@@ -59,6 +61,8 @@ describe('CheckQuestionsComponent', () => { | |||
component = fixture.componentInstance; | |||
nativeElement = fixture.nativeElement; | |||
httpMock = TestBed.get(HttpTestingController); | |||
redirectionService = TestBed.get(RedirectionService); |
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.
nice!
@@ -33,6 +33,8 @@ export class CheckQuestionsComponent implements OnInit { | |||
onSubmit() { | |||
this.questionService.sendQuestions(this.caseId, 1).subscribe(res => { | |||
this.redirectionService.redirect(`/viewcase/${this.caseId}/questions?sent=success`); | |||
}, () => { | |||
this.redirectionService.redirect(`/viewcase/${this.caseId}/questions?sent=failure`); |
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.
Should we attempt to log the error here at all? Maybe just a console.log for now?
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.
I'm not sure how much useful information actually gets sent down to the front end. It should be logged on the back end for sure.
@@ -15,7 +15,7 @@ <h2 data-selector="check-questions-heading" class="govuk-heading-xl">Check your | |||
</div> | |||
</dl> | |||
</div> | |||
<button class="govuk-button" (click)="onSubmit()">Send questions</button> | |||
<button data-selector="send-questions" class="govuk-button" (click)="onSubmit()">Send questions</button> |
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.
Could we maybe just tweak this to be something closer to send-questions-button
> Just because I can see send-questions
being a description for other bits of the page/app as well
Ready to go. I think Travis is failing because of the ongoing issues on master.