File tree Expand file tree Collapse file tree 2 files changed +60
-1
lines changed
tests/Views/Traits/Helpers Expand file tree Collapse file tree 2 files changed +60
-1
lines changed Original file line number Diff line number Diff line change @@ -186,22 +186,41 @@ public function isVisibleInMenus(): bool
186
186
return $ this ->hiddenFromMenus === false ;
187
187
}
188
188
189
- // TODO: Test
189
+ /**
190
+ * @return bool
191
+ */
190
192
public function isHiddenFromPills (): bool
191
193
{
192
194
return $ this ->hiddenFromPills === true ;
193
195
}
194
196
197
+ /**
198
+ * @return bool
199
+ */
195
200
public function isVisibleInPills (): bool
196
201
{
197
202
return $ this ->hiddenFromPills === false ;
198
203
}
199
204
205
+ /**
206
+ * @return bool
207
+ */
200
208
public function isHiddenFromFilterCount (): bool
201
209
{
202
210
return $ this ->hiddenFromFilterCount === true ;
203
211
}
204
212
213
+ /**
214
+ * @return bool
215
+ */
216
+ public function isVisibleInFilterCount (): bool
217
+ {
218
+ return $ this ->hiddenFromFilterCount === false ;
219
+ }
220
+
221
+ /**
222
+ * @return bool
223
+ */
205
224
public function isResetByClearButton (): bool
206
225
{
207
226
return $ this ->resetByClearButton === true ;
Original file line number Diff line number Diff line change @@ -150,4 +150,44 @@ public function can_check_if_filter_is_hidden_from_menus(): void
150
150
$ this ->assertTrue ($ filter ->isHiddenFromMenus ());
151
151
$ this ->assertFalse ($ filter ->isVisibleInMenus ());
152
152
}
153
+
154
+ /** @test */
155
+ public function can_check_if_filter_is_hidden_from_pills (): void
156
+ {
157
+ $ filter = SelectFilter::make ('Active ' );
158
+
159
+ $ this ->assertFalse ($ filter ->isHiddenFromPills ());
160
+ $ this ->assertTrue ($ filter ->isVisibleInPills ());
161
+
162
+ $ filter ->hiddenFromPills ();
163
+
164
+ $ this ->assertTrue ($ filter ->isHiddenFromPills ());
165
+ $ this ->assertFalse ($ filter ->isVisibleInPills ());
166
+ }
167
+
168
+ /** @test */
169
+ public function can_check_if_filter_is_hidden_from_count (): void
170
+ {
171
+ $ filter = SelectFilter::make ('Active ' );
172
+
173
+ $ this ->assertFalse ($ filter ->isHiddenFromFilterCount ());
174
+ $ this ->assertTrue ($ filter ->isVisibleInFilterCount ());
175
+
176
+ $ filter ->hiddenFromFilterCount ();
177
+
178
+ $ this ->assertTrue ($ filter ->isHiddenFromFilterCount ());
179
+ $ this ->assertFalse ($ filter ->isVisibleInFilterCount ());
180
+ }
181
+
182
+ /** @test */
183
+ public function can_check_if_filter_is_reset_by_clear_button (): void
184
+ {
185
+ $ filter = SelectFilter::make ('Active ' );
186
+
187
+ $ this ->assertTrue ($ filter ->isResetByClearButton ());
188
+
189
+ $ filter ->notResetByClearButton ();
190
+
191
+ $ this ->assertFalse ($ filter ->isResetByClearButton ());
192
+ }
153
193
}
You can’t perform that action at this time.
0 commit comments