File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ export default {
88
88
}
89
89
}
90
90
// simple case-insensitve search
91
+ this .invalidRegex = false
91
92
return new RegExp (this .escapeStringForRegExp (this .userInputFilter ), ' i' )
92
93
},
93
94
filteredHistory () {
@@ -119,7 +120,6 @@ export default {
119
120
},
120
121
clearFilter () {
121
122
this .userInputFilter = ' '
122
- this .invalidRegex = false
123
123
},
124
124
escapeStringForRegExp (str ) {
125
125
return str .replace (/ [\-\[ \]\/\{\}\(\)\*\+\?\.\\\^\$\| ] / g , ' \\ $&' )
Original file line number Diff line number Diff line change @@ -58,6 +58,21 @@ module.exports = {
58
58
. assert . containsText ( '.vuex-state-inspector' , 'type: "DECREMENT"' )
59
59
. assert . containsText ( '.vuex-state-inspector' , 'count: 1' )
60
60
61
+ // filtering
62
+ . setValue ( '.search-box' , 'inc' )
63
+ . assert . count ( '.history .entry' , 3 )
64
+ . click ( '.buttons a:last-of-type' )
65
+ . assert . value ( '.search-box' , '' )
66
+ . setValue ( '.search-box' , '/dec/i' )
67
+ . assert . count ( '.history .entry' , 2 )
68
+ . clearValue ( '.search-box' )
69
+ . setValue ( '.search-box' , '/dec)/i' )
70
+ . waitForElementVisible ( '.invalid-regex' , 100 )
71
+ . assert . count ( '.history .entry' , 4 )
72
+ . setValue ( '.search-box' , '\b\b\b' )
73
+ . waitForElementNotVisible ( '.invalid-regex' , 100 )
74
+ . click ( '.buttons a:last-of-type' )
75
+
61
76
// time travel
62
77
. click ( '.history .entry:nth-child(3)' )
63
78
. assert . cssClassPresent ( '.history .entry:nth-child(3)' , 'active' )
You can’t perform that action at this time.
0 commit comments