Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

RIUI-314 - Send questions failure message #112

Merged
merged 5 commits into from Aug 3, 2018

Conversation

Louisblack
Copy link
Contributor

@Louisblack Louisblack commented Aug 1, 2018

Ready to go. I think Travis is failing because of the ongoing issues on master.

@codecov
Copy link

codecov bot commented Aug 1, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@57422a7). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #112   +/-   ##
=========================================
  Coverage          ?   81.79%           
=========================================
  Files             ?       76           
  Lines             ?      978           
  Branches          ?       43           
=========================================
  Hits              ?      800           
  Misses            ?      160           
  Partials          ?       18
Impacted Files Coverage Δ
...main/components/questions/check/check.component.ts 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57422a7...1a645a6. Read the comment docs.

@Louisblack Louisblack changed the title RIUI-314 Failure message RIUI-314 - Send questions failure message Aug 3, 2018
@@ -115,36 +115,3 @@ p {
font-size: 16px;
line-height: 20px;
}

Copy link
Contributor Author

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);
Copy link
Contributor

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`);
Copy link
Contributor

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?

Copy link
Contributor Author

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>
Copy link
Contributor

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

@Louisblack Louisblack merged commit 358d408 into master Aug 3, 2018
@Louisblack Louisblack deleted the feature/RIUI-314-failure branch August 3, 2018 10:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants