@@ -29,6 +29,46 @@ test('Area of interest should parse polygon coordinate strings', async ({
2929 ) ;
3030} ) ;
3131
32+ test ( 'Manual Entry Cases, (Self-Intersecting, clear, valid)' , async ( {
33+ page,
34+ } ) => {
35+ await page . goto ( '/' ) ;
36+ await page . getByRole ( 'button' , { name : 'Filters' , exact : true } ) . click ( ) ;
37+
38+ await page
39+ . getByRole ( 'region' , { name : 'Area of Interest Options' } )
40+ . getByLabel ( 'Area of Interest • WKT' )
41+ . fill (
42+ 'POLYGON((-114.4775 55.628,-95.2734 54.5721,-114.0381 41.1456,-97.251 41.1125,-114.4775 55.628))' ,
43+ ) ;
44+ await page . keyboard . press ( 'Tab' ) ;
45+ await expect ( page . locator ( '#mat-button-toggle-6-button' ) ) . toHaveText (
46+ 'NO RESULTS' ,
47+ ) ;
48+
49+ await page . getByRole ( 'button' , { name : 'Clear' , exact : true } ) . click ( ) ;
50+ let value = await page
51+ . getByLabel ( 'Area of Interest Options' )
52+ . getByLabel ( 'Area of Interest • WKT' )
53+ . inputValue ( ) ;
54+ await expect ( value ) . toBe ( '' ) ;
55+ await page
56+ . getByRole ( 'region' , { name : 'Area of Interest Options' } )
57+ . getByLabel ( 'Area of Interest • WKT' )
58+ . fill (
59+ 'POLYGON((-148.8144 64.3268,-146.5039 64.3268,-146.5039 65.2329,-148.8144 65.2329,-148.8144 64.3268))' ,
60+ ) ;
61+
62+ await page . getByRole ( 'combobox' , { name : 'Search for a location' } ) . click ( ) ;
63+ value = await page
64+ . getByLabel ( 'Area of Interest Options' )
65+ . getByLabel ( 'Area of Interest • WKT' )
66+ . inputValue ( ) ;
67+ await expect ( value ) . toBe (
68+ 'POLYGON((-148.8144 64.3268,-146.5039 64.3268,-146.5039 65.2329,-148.8144 65.2329,-148.8144 64.3268))' ,
69+ ) ;
70+ } ) ;
71+
3272test ( 'Invalid Manual Entry' , async ( { page } ) => {
3373 await page . goto ( '/' ) ;
3474 await page . getByRole ( 'button' , { name : 'Filters' , exact : true } ) . click ( ) ;
0 commit comments