@@ -80,6 +80,43 @@ describe('fields', () => {
8080 . toHaveText ( String ( numberDoc . number ) ) ;
8181 } ) ;
8282
83+
84+ test ( 'should filter Number fields in the collection view - greaterThanOrEqual' , async ( ) => {
85+ await page . goto ( url . list ) ;
86+
87+ // should have 3 entries
88+ await expect ( page . locator ( 'table >> tbody >> tr' ) ) . toHaveCount ( 3 ) ;
89+
90+ // open the filter options
91+ await page . locator ( '.list-controls__toggle-where' ) . click ( ) ;
92+ await expect ( page . locator ( '.list-controls__where.rah-static--height-auto' ) ) . toBeVisible ( ) ;
93+ await page . locator ( '.where-builder__add-first-filter' ) . click ( ) ;
94+
95+ const initialField = page . locator ( '.condition__field' ) ;
96+ const operatorField = page . locator ( '.condition__operator' ) ;
97+ const valueField = page . locator ( '.condition__value >> input' ) ;
98+
99+ // select Number field to filter on
100+ await initialField . click ( ) ;
101+ const initialFieldOptions = initialField . locator ( '.rs__option' ) ;
102+ await initialFieldOptions . locator ( 'text=number' ) . first ( ) . click ( ) ;
103+ expect ( initialField . locator ( '.rs__single-value' ) ) . toContainText ( 'Number' ) ;
104+
105+ // select >= operator
106+ await operatorField . click ( ) ;
107+ const operatorOptions = operatorField . locator ( '.rs__option' ) ;
108+ await operatorOptions . last ( ) . click ( ) ;
109+ expect ( operatorField . locator ( '.rs__single-value' ) ) . toContainText ( 'is greater than or equal to' ) ;
110+
111+ // enter value of 3
112+ await valueField . fill ( '3' ) ;
113+ await expect ( valueField ) . toHaveValue ( '3' ) ;
114+ await wait ( 300 ) ;
115+
116+ // should have 2 entries after filtering
117+ await expect ( page . locator ( 'table >> tbody >> tr' ) ) . toHaveCount ( 2 ) ;
118+ } ) ;
119+
83120 test ( 'should create' , async ( ) => {
84121 const input = 5 ;
85122
0 commit comments