Skip to content

Commit

Permalink
fix: Updates regular expressions formatting and naming convention (#4398
Browse files Browse the repository at this point in the history
)
  • Loading branch information
stevkan committed Oct 16, 2020
1 parent 27345fe commit 64b4070
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Composer/cypress/integration/TriggerCreation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ context('Creating a new trigger', () => {
it('can create different kinds of triggers ', () => {
cy.visitPage('Design');
cy.findByTestId('recognizerTypeDropdown').click();
cy.findByText('Regular Expression').click();
cy.findByText('Regular expression recognizer').click();

//onintent trigger
cy.findByTestId('AddFlyout').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"createdAt": "2019-07-04T08:14:01.139Z",
"updatedAt": "2019-08-01T23:45:38.308Z",
"id": "288769",
"description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions."
"description": "This is a bot that demonstrates how to manage a ToDo list using regular expressions."
},
"autoEndDialog": false,
"recognizer": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,44 @@
"createdAt": "2019-07-04T08:14:01.139Z",
"updatedAt": "2019-08-01T23:45:38.308Z",
"id": "288769",
"description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions."
"description": "This is a bot that demonstrates how to manage a ToDo list using regular expressions."
},
"autoEndDialog": false,
"recognizer": {
"$kind": "Microsoft.RegexRecognizer",
"intents": [
{

"$kind": "Microsoft.IntentPattern",
"intent": "AddIntent",
"pattern": "(?i)(?:add|create) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?"
"pattern": "(?i)(?:add|create) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?"
},
{

"$kind": "Microsoft.IntentPattern",
"intent": "ClearIntent",
"pattern": "(?i)(?:delete|remove|clear) (?:all|every) (?:to-dos|todos|tasks)"
"pattern": "(?i)(?:delete|remove|clear) (?:all|every) (?:to-dos|todos|tasks)"
},
{

"$kind": "Microsoft.IntentPattern",
"intent": "DeleteIntent",
"pattern": "(?i)(?:delete|remove|clear) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?"
"pattern": "(?i)(?:delete|remove|clear) .*(?:to-do|todo|task)(?: )?(?:named (?<title>.*))?"
},
{

"$kind": "Microsoft.IntentPattern",
"intent": "ShowIntent",
"pattern": "(?i)(?:show|see|view) .*(?:to-do|todo|task)"
"pattern": "(?i)(?:show|see|view) .*(?:to-do|todo|task)"
},
{

"$kind": "Microsoft.IntentPattern",
"intent": "HelpIntent",
"pattern": "(?i)help"
"pattern": "(?i)help"
},
{

"$kind": "Microsoft.IntentPattern",
"intent": "CancelIntent",
"pattern": "(?i)cancel|never mind"
Expand Down Expand Up @@ -190,4 +190,3 @@
],
"$schema": "../../app.schema"
}

2 changes: 1 addition & 1 deletion Composer/packages/client/__tests__/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"$kind": "Microsoft.AdaptiveDialog",
"$designer": {
"id": "288769",
"description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions."
"description": "This is a bot that demonstrates how to manage a ToDo list using regular expressions."
},
"rules": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"old": "value",
"$designer": {
"id": "288769",
"description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions."
"description": "This is a bot that demonstrates how to manage a ToDo list using regular expressions."
},
"steps": [
{
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/server/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@
"message": "RegEx { intent } is already defined"
},
"regular_expression_855557bf": {
"message": "Regular Expression"
"message": "Regular expression recognizer"
},
"release_1af20f26": {
"message": "Release: "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const FallbackRecognizerJsonEditor: RecognizerOptions = {

export const DefaultRecognizerSchema: RecognizerUISchema = {
[SDKKinds.RegexRecognizer]: {
displayName: () => formatMessage('Regular Expression'),
displayName: () => formatMessage('Regular expression recognizer'),
intentEditor: RegexIntentField,
renameIntent: (intentName, newIntentName, shellData, shellApi) => {
const { currentDialog } = shellData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$kind": "Microsoft.AdaptiveDialog",
"$designer": {
"id": "288769",
"description": "This is a bot that demonstrates how to manage a ToDo list using Regular Expressions."
"description": "This is a bot that demonstrates how to manage a ToDo list using regular expressions."
},
"autoEndDialog": false,
"defaultResultProperty": "dialog.result",
Expand Down

0 comments on commit 64b4070

Please sign in to comment.