Skip to content

Commit

Permalink
Update help interaction
Browse files Browse the repository at this point in the history
End the help intent response with a question as required by the certification guidelines.

> The help prompt must end with a question for users or prompt the user to speak and leave the session open to receive a response. Please refer to test case 4.12 from our Submission Checklist for guidance on the help intent.
  • Loading branch information
martincostello committed Nov 30, 2024
1 parent 94e76f5 commit 5ab99cc
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/LondonTravel.Skill/Intents/HelpIntent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public Task<SkillResponse> RespondAsync(Intent intent, Session session)
Strings.HelpIntentParagraph2,
Strings.HelpIntentParagraph3,
Strings.HelpIntentParagraph4,
Strings.HelpIntentParagraph5,
];

var result = SkillResponseBuilder
Expand Down
11 changes: 10 additions & 1 deletion src/LondonTravel.Skill/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/LondonTravel.Skill/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@
<data name="HelpIntentParagraph4" xml:space="preserve">
<value>If you link your account and setup your preferences in the London Travel website, you can ask about your commute to quickly find out the status of the lines you frequently use.</value>
</data>
<data name="HelpIntentParagraph5" xml:space="preserve">
<value>What would you like to do?</value>
</data>
<data name="InternalError" xml:space="preserve">
<value>Sorry, something went wrong.</value>
</data>
Expand Down
2 changes: 1 addition & 1 deletion test/LondonTravel.Skill.NativeAotTests/EndToEndTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public async Task Alexa_Function_Can_Process_Intent_Request_For_Help()

Assert.IsNotNull(response.OutputSpeech);
Assert.AreEqual("SSML", response.OutputSpeech.Type);
Assert.AreEqual("<speak><p>This skill allows you to check for the status of a specific line, or for disruption in general. You can ask about any London Underground line, London Overground, the Docklands Light Railway or the Elizabeth line.</p><p>Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.</p><p>Asking for the status for a specific line provides a summary of the current service, such as whether there is a good service or if there are any delays.</p><p>If you link your account and setup your preferences in the London Travel website, you can ask about your commute to quickly find out the status of the lines you frequently use.</p></speak>", response.OutputSpeech.Ssml);
Assert.AreEqual("<speak><p>This skill allows you to check for the status of a specific line, or for disruption in general. You can ask about any London Underground line, London Overground, the Docklands Light Railway or the Elizabeth line.</p><p>Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.</p><p>Asking for the status for a specific line provides a summary of the current service, such as whether there is a good service or if there are any delays.</p><p>If you link your account and setup your preferences in the London Travel website, you can ask about your commute to quickly find out the status of the lines you frequently use.</p><p>What would you like to do?</p></speak>", response.OutputSpeech.Ssml);
}

[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion test/LondonTravel.Skill.Tests/EndToEndTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task Alexa_Function_Can_Process_Intent_Request_For_Help()

response.OutputSpeech.ShouldNotBeNull();
response.OutputSpeech.Type.ShouldBe("SSML");
response.OutputSpeech.Ssml.ShouldBe("<speak><p>This skill allows you to check for the status of a specific line, or for disruption in general. You can ask about any London Underground line, London Overground, the Docklands Light Railway or the Elizabeth line.</p><p>Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.</p><p>Asking for the status for a specific line provides a summary of the current service, such as whether there is a good service or if there are any delays.</p><p>If you link your account and setup your preferences in the London Travel website, you can ask about your commute to quickly find out the status of the lines you frequently use.</p></speak>");
response.OutputSpeech.Ssml.ShouldBe("<speak><p>This skill allows you to check for the status of a specific line, or for disruption in general. You can ask about any London Underground line, London Overground, the Docklands Light Railway or the Elizabeth line.</p><p>Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.</p><p>Asking for the status for a specific line provides a summary of the current service, such as whether there is a good service or if there are any delays.</p><p>If you link your account and setup your preferences in the London Travel website, you can ask about your commute to quickly find out the status of the lines you frequently use.</p><p>What would you like to do?</p></speak>");
}

[xRetry.RetryFact(Timeout = TimeoutMilliseconds)]
Expand Down
2 changes: 1 addition & 1 deletion test/LondonTravel.Skill.Tests/HelpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public async Task Can_Invoke_Function()

response.OutputSpeech.ShouldNotBeNull();
response.OutputSpeech.Type.ShouldBe("SSML");
response.OutputSpeech.Ssml.ShouldBe("<speak><p>This skill allows you to check for the status of a specific line, or for disruption in general. You can ask about any London Underground line, London Overground, the Docklands Light Railway or the Elizabeth line.</p><p>Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.</p><p>Asking for the status for a specific line provides a summary of the current service, such as whether there is a good service or if there are any delays.</p><p>If you link your account and setup your preferences in the London Travel website, you can ask about your commute to quickly find out the status of the lines you frequently use.</p></speak>");
response.OutputSpeech.Ssml.ShouldBe("<speak><p>This skill allows you to check for the status of a specific line, or for disruption in general. You can ask about any London Underground line, London Overground, the Docklands Light Railway or the Elizabeth line.</p><p>Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.</p><p>Asking for the status for a specific line provides a summary of the current service, such as whether there is a good service or if there are any delays.</p><p>If you link your account and setup your preferences in the London Travel website, you can ask about your commute to quickly find out the status of the lines you frequently use.</p><p>What would you like to do?</p></speak>");
}
}

0 comments on commit 5ab99cc

Please sign in to comment.