Issues 94 - Add intent unit tests for most skills (#120)

* Issues 94 - Add unit tests for date/time skill

* Issues 94 - Update desktop launcher intent syntax

* Issues 94 - Add intent tests for desktop launcher skill

* Issues 94 - Add unit tests to Joke skill

* Issues 94 - Add unit tests to naptime skill

* Issues 94 - Add unit tests for spelling skill

* Issues 94 - Remove application-based desktop unit tests
pull/80/merge
Ethan Ward 2016-06-08 22:12:02 -05:00 committed by Jonathan D'Orleans
parent b84756e970
commit 99a736f04f
14 changed files with 93 additions and 2 deletions

View File

@ -0,0 +1,7 @@
{
"utterance": "what time is it",
"intent_type": "TimeIntent",
"intent": {
"TimeKeyword": "what time is it"
}
}

View File

@ -0,0 +1,7 @@
{
"utterance": "whats the time",
"intent_type": "TimeIntent",
"intent": {
"TimeKeyword": "whats the time"
}
}

View File

@ -0,0 +1,7 @@
{
"utterance": "time is it",
"intent_type": "TimeIntent",
"intent": {
"TimeKeyword": "time is it"
}
}

View File

@ -2,4 +2,5 @@ what time is it
what is the time what is the time
what's the time what's the time
whats the time whats the time
what time is what time is
time is it

View File

@ -76,7 +76,7 @@ class DesktopLauncherSkill(MycroftSkill):
self.register_regex("(?P<SearchTerms>.*) on") self.register_regex("(?P<SearchTerms>.*) on")
launch_intent = IntentBuilder( launch_intent = IntentBuilder(
"LaunchDesktopApplication").require("LaunchKeyword").require( "LaunchDesktopApplicationIntent").require("LaunchKeyword").require(
"Application").build() "Application").build()
self.register_intent(launch_intent, self.handle_launch_desktop_app) self.register_intent(launch_intent, self.handle_launch_desktop_app)

View File

@ -0,0 +1,9 @@
{
"utterance": "find puppies on wikipedia",
"intent_type": "SearchWebsiteIntent",
"intent": {
"SearchKeyword": "find",
"Website": "wikipedia",
"SearchTerms": "puppies"
}
}

View File

@ -0,0 +1,8 @@
{
"utterance": "launch imgur",
"intent_type": "LaunchWebsiteIntent",
"intent": {
"LaunchKeyword": "launch",
"Website": "imgur"
}
}

View File

@ -0,0 +1,8 @@
{
"utterance": "open tumblr",
"intent_type": "LaunchWebsiteIntent",
"intent": {
"LaunchKeyword": "open",
"Website": "tumblr"
}
}

View File

@ -0,0 +1,7 @@
{
"utterance": "give me a joke",
"intent_type": "JokingIntent",
"intent": {
"JokingKeyword": "joke"
}
}

View File

@ -0,0 +1,7 @@
{
"utterance": "make me laugh",
"intent_type": "JokingIntent",
"intent": {
"JokingKeyword": "make me laugh"
}
}

View File

@ -0,0 +1,7 @@
{
"utterance": "it's time for nap time",
"intent_type": "NapTimeIntent",
"intent": {
"SleepCommand": "nap time"
}
}

View File

@ -0,0 +1,7 @@
{
"utterance": "you should go to sleep",
"intent_type": "NapTimeIntent",
"intent": {
"SleepCommand": "go to sleep"
}
}

View File

@ -0,0 +1,8 @@
{
"utterance": "spell happiness",
"intent_type": "SpellingIntent",
"intent": {
"SpellingKeyword": "spell",
"Word": "happiness"
}
}

View File

@ -0,0 +1,8 @@
{
"utterance": "how do you spell the word intelligence",
"intent_type": "SpellingIntent",
"intent": {
"SpellingKeyword": "spell the word",
"Word": "intelligence"
}
}