From 352bac305e36a67801b9d07596670ffb32accb80 Mon Sep 17 00:00:00 2001 From: martincostello Date: Sat, 30 Nov 2024 15:02:17 +0000 Subject: [PATCH] Update help interaction 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. --- src/LondonTravel.Skill/Intents/HelpIntent.cs | 1 + src/LondonTravel.Skill/Strings.Designer.cs | 11 ++++++++++- src/LondonTravel.Skill/Strings.resx | 3 +++ .../EndToEndTests.cs | 2 +- test/LondonTravel.Skill.Tests/EndToEndTests.cs | 2 +- test/LondonTravel.Skill.Tests/HelpTests.cs | 2 +- 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/LondonTravel.Skill/Intents/HelpIntent.cs b/src/LondonTravel.Skill/Intents/HelpIntent.cs index 20b7549c..a2cdaaac 100644 --- a/src/LondonTravel.Skill/Intents/HelpIntent.cs +++ b/src/LondonTravel.Skill/Intents/HelpIntent.cs @@ -19,6 +19,7 @@ public Task RespondAsync(Intent intent, Session session) Strings.HelpIntentParagraph2, Strings.HelpIntentParagraph3, Strings.HelpIntentParagraph4, + Strings.HelpIntentParagraph5, ]; var result = SkillResponseBuilder diff --git a/src/LondonTravel.Skill/Strings.Designer.cs b/src/LondonTravel.Skill/Strings.Designer.cs index 7849572f..0fd3f90c 100644 --- a/src/LondonTravel.Skill/Strings.Designer.cs +++ b/src/LondonTravel.Skill/Strings.Designer.cs @@ -167,7 +167,16 @@ internal static string HelpIntentParagraph4 { return ResourceManager.GetString("HelpIntentParagraph4", resourceCulture); } } - + + /// + /// Looks up a localized string similar to What would you like to do?. + /// + internal static string HelpIntentParagraph5 { + get { + return ResourceManager.GetString("HelpIntentParagraph5", resourceCulture); + } + } + /// /// Looks up a localized string similar to Sorry, something went wrong.. /// diff --git a/src/LondonTravel.Skill/Strings.resx b/src/LondonTravel.Skill/Strings.resx index 30cdeac9..93b30f93 100644 --- a/src/LondonTravel.Skill/Strings.resx +++ b/src/LondonTravel.Skill/Strings.resx @@ -153,6 +153,9 @@ 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. + + What would you like to do? + Sorry, something went wrong. diff --git a/test/LondonTravel.Skill.NativeAotTests/EndToEndTests.cs b/test/LondonTravel.Skill.NativeAotTests/EndToEndTests.cs index cec1ade7..0fd5a529 100644 --- a/test/LondonTravel.Skill.NativeAotTests/EndToEndTests.cs +++ b/test/LondonTravel.Skill.NativeAotTests/EndToEndTests.cs @@ -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("

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.

Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.

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.

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.

", response.OutputSpeech.Ssml); + Assert.AreEqual("

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.

Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.

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.

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.

What would you like to do?

", response.OutputSpeech.Ssml); } [TestMethod] diff --git a/test/LondonTravel.Skill.Tests/EndToEndTests.cs b/test/LondonTravel.Skill.Tests/EndToEndTests.cs index 47202316..0b6f77aa 100644 --- a/test/LondonTravel.Skill.Tests/EndToEndTests.cs +++ b/test/LondonTravel.Skill.Tests/EndToEndTests.cs @@ -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("

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.

Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.

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.

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.

"); + response.OutputSpeech.Ssml.ShouldBe("

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.

Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.

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.

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.

What would you like to do?

"); } [xRetry.RetryFact(Timeout = TimeoutMilliseconds)] diff --git a/test/LondonTravel.Skill.Tests/HelpTests.cs b/test/LondonTravel.Skill.Tests/HelpTests.cs index d4b46d16..28f7542e 100644 --- a/test/LondonTravel.Skill.Tests/HelpTests.cs +++ b/test/LondonTravel.Skill.Tests/HelpTests.cs @@ -28,6 +28,6 @@ public async Task Can_Invoke_Function() response.OutputSpeech.ShouldNotBeNull(); response.OutputSpeech.Type.ShouldBe("SSML"); - response.OutputSpeech.Ssml.ShouldBe("

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.

Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.

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.

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.

"); + response.OutputSpeech.Ssml.ShouldBe("

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.

Asking about disruption in general provides information about any lines that are currently experiencing issues, such as any delays or planned closures.

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.

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.

What would you like to do?

"); } }