Skip to content

Commit

Permalink
Remove test using covid faq server
Browse files Browse the repository at this point in the history
  • Loading branch information
sileix committed Feb 10, 2022
1 parent 24f79ad commit 715af77
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 46 deletions.
44 changes: 14 additions & 30 deletions test/agent/expected-log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2383,29 +2383,13 @@ UT: $stop;
====
# test
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
U: What are the side effects of the vaccine?
UT: $dialogue @org.thingpedia.dialogue.faq.question;
C: $dialogue @org.thingpedia.dialogue.faq.question;
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Vaccine recipients commonly experience mild to moderate side effects that occur within the first three days of vaccination and resolve within 1-3 days of onset. These are normal signs that your body is building protection. Common side effects include mild to moderate pain, swelling, or redness at the injection site and/or mild to moderate flu-like symptoms (for example, fever, fatigue, headache, chills, muscle aches). Serious side effects are very rare.
AT: $dialogue @org.thingpedia.dialogue.faq.answer;
#! vote: down
#! comment: test comment for dialogue turns
#! additional
#! lines
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
U: \t $stop;
UT: $stop;
====
# test
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
U: !! test command always bing !!
UT: $dialogue @com.bing.search;
C: $dialogue @com.bing.search;
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Here is something I found on the web.
AT: $dialogue @com.bing.sys_search_result;
#! vote: up
#! vote: down
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand Down Expand Up @@ -2448,7 +2432,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Both Adrien Silva and M. Shabani are player stats with the dribble equal to 0.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_recommend_two;
#! vote: down
#! vote: up
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand Down Expand Up @@ -2476,7 +2460,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Your request was completed successfully.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! vote: up
#! vote: down
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand All @@ -2492,7 +2476,7 @@ UT: @org.thingpedia.iot.light-bulb.set_power(power=enum on);
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Did you mean set on the lights?
A: You do not have a Light Bulb configured. You will need to enable Home Assistant or Philips Hue before you can use that command.
#! vote: down
#! vote: up
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand All @@ -2512,7 +2496,7 @@ C: null
A: Did you mean set on the lights?
A: Sorry I couldn't help on that.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_clarify;
#! vote: up
#! vote: down
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand Down Expand Up @@ -2540,7 +2524,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Reminder: my reminder.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! vote: down
#! vote: up
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand Down Expand Up @@ -2568,7 +2552,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Reminder: my reminder.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! vote: up
#! vote: down
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand All @@ -2590,7 +2574,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: It is 5:50 PM.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! vote: down
#! vote: up
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand Down Expand Up @@ -2618,7 +2602,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Alert: it is 5:50 PM.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! vote: up
#! vote: down
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand Down Expand Up @@ -2655,7 +2639,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: The artist is Adele.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_display_result;
#! vote: down
#! vote: up
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand All @@ -2676,7 +2660,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Currently playing Hello. The artist is Adele.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_display_result;
#! vote: up
#! vote: down
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand All @@ -2697,7 +2681,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Oren's Hummus opens from 11:00 AM to 2:30 PM every day.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_recommend_one;
#! vote: down
#! vote: up
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand All @@ -2718,7 +2702,7 @@ C: ]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Str:QUOTED_STRING::42:.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! vote: up
#! vote: down
#! comment: test comment for dialogue turns
#! additional
#! lines
Expand All @@ -2737,7 +2721,7 @@ C: #[results=[]];
#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ
A: Alright, I will notify you when the power state of your Kitchen Switches switch changes and it becomes true that the state is equal to on.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_rule_enable_success;
#! vote: down
#! vote: up
#! comment: test comment for dialogue turns
#! additional
#! lines
10 changes: 2 additions & 8 deletions test/agent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,7 @@ async function main(onlyIds) {
showWelcome: true,
anonymous: false,
rng: rng,
syncDevices: true,

faqModels: {
'covid-faq': {
url: 'http://covid-faq.staging.almond.stanford.edu/v1/models/covid-faq:predict'
}
}
syncDevices: true
});
conversation.startRecording();
testRunner.conversation = conversation;
Expand Down Expand Up @@ -337,7 +331,7 @@ Hello! How can I help you?
'#! timestamp: XXXX-XX-XXTXX:XX:XX.XXXZ')
.replace(/^# test\/[0-9a-f-]{36}$/gm, '# test')
.replace(/#\[error_stack="([^\\]*)\\n[^"]*"\]/gm, '#[error_stack="$1"]');
//fs.writeFileSync(path.resolve(__dirname, './expected-log.txt'), log);
fs.writeFileSync(path.resolve(__dirname, './expected-log2.txt'), log);
const expectedLog = fs.readFileSync(path.resolve(__dirname, './expected-log.txt')).toString();
assert(log === expectedLog);

Expand Down
8 changes: 0 additions & 8 deletions test/agent/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1124,14 +1124,6 @@ A: I turned off your Kitchen Switches switch.
A: >> context = $dialogue @org.thingpedia.dialogue.transaction . sys_action_success ; @org.thingpedia.iot.switch ( id = GENERIC_ENTITY_tt:device_id_0 ) . set_power ( power = enum off ) #[ results = [ { power = enum off , __device = GENERIC_ENTITY_tt:device_id_0 } ] ] ; // {"GENERIC_ENTITY_tt:device_id_0":{"value":"switch-kitchen","display":"Kitchen Switches"}}
A: >> expecting = null

====
# 73-covid-faqs-basic

U: What are the side effects of the vaccine?
A: Vaccine recipients commonly experience mild to moderate side effects that occur within the first three days of vaccination and resolve within 1-3 days of onset. These are normal signs that your body is building protection. Common side effects include mild to moderate pain, swelling, or redness at the injection site and/or mild to moderate flu-like symptoms (for example, fever, fatigue, headache, chills, muscle aches). Serious side effects are very rare.
A: >> context = null // {}
A: >> expecting = null

====
# 74-3rd-party-dispatch

Expand Down

0 comments on commit 715af77

Please sign in to comment.