diff --git a/frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue b/frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue index ddd19f0d28..1a1bcfa84a 100644 --- a/frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue +++ b/frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue @@ -53,6 +53,15 @@ } }, + watch: { + 'regex.subject'() { + this.setRegexDescription(); + }, + 'regex.expression'() { + this.setRegexDescription(); + } + }, + methods: { add: function () { this.list.push(this.getRegex()); @@ -65,6 +74,9 @@ let regex = new Regex(this.regex); regex.description = regex.subject + " has: " + regex.expression; return regex; + }, + setRegexDescription() { + this.regex.description = this.regex.subject + " has: " + this.regex.expression; } } }