@@ -103,18 +103,18 @@ test('user can view category details', async ({ page }) => {
103103 } )
104104 ) . toBeVisible ( )
105105
106- await expect ( page . getByText ( 'objects: commutative rings' ) ) . toBeVisible ( )
107- await expect ( page . getByText ( 'morphisms: ring homomorphisms' ) ) . toBeVisible ( )
106+ const body = page . locator ( 'body' )
107+
108+ await expect ( body ) . toContainText ( 'Objects: commutative rings' )
109+ await expect ( body ) . toContainText ( 'Morphisms: ring homomorphisms' )
108110 await expect ( page . getByRole ( 'link' , { name : 'nLab link' } ) ) . toBeVisible ( )
109- await expect ( page . getByText ( 'is cocomplete' ) ) . toBeVisible ( )
110- await expect ( page . getByText ( 'is locally finitely presentable' ) ) . toBeVisible ( )
111- await expect ( page . getByText ( 'is not additive' ) ) . toBeVisible ( )
112- await expect ( page . getByText ( 'is not balanced' ) ) . toBeVisible ( )
113- await expect ( page . getByText ( 'terminal object: zero ring' ) ) . toBeVisible ( )
114- await expect ( page . getByText ( 'coproducts: tensor products' ) ) . toBeVisible ( )
115- await expect (
116- page . getByText ( 'regular epimorphisms: surjective morphisms' )
117- ) . toBeVisible ( )
111+ await expect ( body ) . toContainText ( 'is cocomplete' )
112+ await expect ( body ) . toContainText ( 'is locally finitely presentable' )
113+ await expect ( body ) . toContainText ( 'is not additive' )
114+ await expect ( body ) . toContainText ( 'is not balanced' )
115+ await expect ( body ) . toContainText ( 'terminal object: zero ring' )
116+ await expect ( body ) . toContainText ( 'coproducts: tensor products' )
117+ await expect ( body ) . toContainText ( 'regular epimorphisms: surjective morphisms' )
118118} )
119119
120120test ( 'user sees no unknown properties for the category of sets' , async ( { page } ) => {
@@ -137,15 +137,13 @@ test('user may see unknown properties', async ({ page }) => {
137137 } )
138138 ) . toBeVisible ( )
139139
140- const unknown_properties_section = page
141- . locator ( 'section' , {
142- hasText : 'Unknown properties'
143- } )
144- . first ( )
140+ const unknown_properties_section = page . locator ( 'section' , {
141+ hasText : 'Unknown properties'
142+ } )
145143
146- const unknown_property_link = unknown_properties_section . locator ( 'li' ) . first ( )
144+ const link = unknown_properties_section . locator ( 'li' ) . first ( )
147145
148- await expect ( unknown_property_link ) . toBeVisible ( )
146+ await expect ( link ) . toBeVisible ( )
149147} )
150148
151149test ( 'user may see undecidable properties' , async ( { page } ) => {
@@ -158,11 +156,9 @@ test('user may see undecidable properties', async ({ page }) => {
158156 } )
159157 ) . toBeVisible ( )
160158
161- const undecidable_properties_section = page
162- . locator ( 'section' , {
163- hasText : 'Undecidable properties'
164- } )
165- . first ( )
159+ const undecidable_properties_section = page . locator ( 'section' , {
160+ hasText : 'Undecidable properties'
161+ } )
166162
167163 const link = undecidable_properties_section . getByRole ( 'link' , {
168164 name : 'accessible' ,
@@ -184,11 +180,9 @@ test('user may see properties that cannot be determined in a family of categorie
184180 } )
185181 ) . toBeVisible ( )
186182
187- const undecidable_properties_section = page
188- . locator ( 'section' , {
189- hasText : 'Undecidable properties'
190- } )
191- . first ( )
183+ const undecidable_properties_section = page . locator ( 'section' , {
184+ hasText : 'Undecidable properties'
185+ } )
192186
193187 const link = undecidable_properties_section . getByRole ( 'link' , {
194188 name : 'finite' ,
@@ -202,6 +196,7 @@ test('user can navigate to a related category', async ({ page }) => {
202196 await page . goto ( '/category/FinSet' , { waitUntil : 'networkidle' } )
203197
204198 await page
199+ . locator ( 'li' , { hasText : 'Related categories:' } )
205200 . getByRole ( 'link' , {
206201 name : 'category of sets' ,
207202 exact : true
@@ -230,11 +225,8 @@ test('user can navigate to the dual category if it exists in the database', asyn
230225 } )
231226 ) . toBeVisible ( )
232227
233- const item = page . locator ( 'li' , {
234- hasText : 'Dual category'
235- } )
236-
237- await item
228+ await page
229+ . locator ( 'li' , { hasText : 'Dual category' } )
238230 . getByRole ( 'link' , {
239231 name : 'dual of the category of sets' ,
240232 exact : true
@@ -255,6 +247,7 @@ test('user can navigate to a child category', async ({ page }) => {
255247 await page . goto ( '/category/BG' , { waitUntil : 'networkidle' } )
256248
257249 await page
250+ . locator ( 'li' , { hasText : 'Children:' } )
258251 . getByRole ( 'link' , {
259252 name : 'delooping of a non-trivial finite group' ,
260253 exact : true
@@ -275,11 +268,11 @@ test('user can navigate to a parent category', async ({ page }) => {
275268 await page . goto ( '/category/Ring' , { waitUntil : 'networkidle' } )
276269
277270 await page
271+ . locator ( 'li' , { hasText : 'Parent:' } )
278272 . getByRole ( 'link' , {
279273 name : 'category of algebras' ,
280274 exact : true
281275 } )
282- . first ( )
283276 . click ( )
284277
285278 await expect (
@@ -295,7 +288,7 @@ test('user can navigate to a parent category', async ({ page }) => {
295288test ( 'user can open and close a proof for a property of a category' , async ( { page } ) => {
296289 await page . goto ( '/category/Grp' , { waitUntil : 'networkidle' } )
297290
298- const claim = page . locator ( 'li' , { has : page . getByText ( 'is mono-regular' ) } )
291+ const claim = page . locator ( 'li' , { hasText : 'is mono-regular' } )
299292
300293 await expect ( claim ) . toBeVisible ( )
301294
@@ -331,69 +324,67 @@ test('user can open a proof for a deduced satisfied property of category', async
331324} ) => {
332325 await page . goto ( '/category/Ring' , { waitUntil : 'networkidle' } )
333326
334- const claim = page . locator ( 'li' , { has : page . getByText ( 'has an extremal generator' ) } )
327+ const claim = page . locator ( 'li' , { hasText : 'has an extremal generator' } )
335328
336329 await expect ( claim ) . toBeVisible ( )
337330
338331 await claim . locator ( 'button' ) . click ( )
339332
340333 const popup = page . locator ( '.popup' ) . filter ( { hasText : 'Proof' } )
341334
342- await expect (
343- popup . getByText (
344- 'Since it is one-sorted finitary algebraic, it has an extremal generator'
345- )
346- ) . toBeVisible ( )
335+ await expect ( popup ) . toContainText (
336+ 'Since it is one-sorted finitary algebraic, it has an extremal generator'
337+ )
347338} )
348339
349340test ( 'user can open a proof for a deduced unsatisfied property of a category' , async ( {
350341 page
351342} ) => {
352343 await page . goto ( '/category/Ab' , { waitUntil : 'networkidle' } )
353344
354- const claim = page . locator ( 'li' , { has : page . getByText ( 'is not cartesian closed' ) } )
345+ const claim = page . locator ( 'li' , { hasText : 'is not cartesian closed' } )
355346
356347 await expect ( claim ) . toBeVisible ( )
357348
358349 await claim . locator ( 'button' ) . click ( )
359350
360351 const popup = page . locator ( '.popup' ) . filter ( { hasText : 'Proof' } )
361352
362- await expect (
363- popup . getByText ( 'Assume for contradiction that it is cartesian closed.' )
364- ) . toBeVisible ( )
353+ await expect ( popup ) . toContainText (
354+ 'Assume for contradiction that it is cartesian closed.'
355+ )
365356} )
366357
367358test ( 'user can open a proof for an inherited satisfied property of a category' , async ( {
368359 page
369360} ) => {
370361 await page . goto ( '/category/Ab' , { waitUntil : 'networkidle' } )
371362
372- const claim = page . locator ( 'li' , { has : page . getByText ( 'is abelian' ) } )
363+ const claim = page . locator ( 'li' , { hasText : 'is abelian' } )
373364
374365 await expect ( claim ) . toBeVisible ( )
375366
376367 await claim . locator ( 'button' ) . click ( )
377368
378369 const popup = page . locator ( '.popup' ) . filter ( { hasText : 'Proof' } )
379370
380- await expect ( popup . getByText ( 'This follows from the parent.' ) ) . toBeVisible ( )
371+ await expect ( popup ) . toContainText ( 'This follows from the parent.' )
381372} )
382373
383374test ( 'user can open a proof for an inherited unsatisfied property of a category' , async ( {
384375 page
385376} ) => {
386377 await page . goto ( '/category/BG_f' , { waitUntil : 'networkidle' } )
387378
388- const claim = page . locator ( 'li' , { has : page . getByText ( 'is not thin' ) } )
379+ const claim = page . locator ( 'li' , { hasText : 'is not thin' } )
389380
390381 await expect ( claim ) . toBeVisible ( )
391382
392383 await claim . locator ( 'button' ) . click ( )
393384
394385 const popup = page . locator ( '.popup' ) . filter ( { hasText : 'Proof' } )
395386
396- await expect ( popup . getByText ( 'This follows from the parent.' ) ) . toBeVisible ( )
387+ await expect ( popup ) . toContainText ( 'This follows from the parent.' )
397388} )
398389
399390test ( 'user sees functors associated with the given category' , async ( { page } ) => {
@@ -414,7 +405,7 @@ test('user sees functors associated with the given category', async ({ page }) =
414405 ) . toBeVisible ( )
415406} )
416407
417- test ( 'user sees morphisms stored for the given category' , async ( { page } ) => {
408+ test ( 'user sees morphisms associated with the given category' , async ( { page } ) => {
418409 await page . goto ( '/category/Grp' , { waitUntil : 'networkidle' } )
419410
420411 await expect (
@@ -431,3 +422,16 @@ test('user sees morphisms stored for the given category', async ({ page }) => {
431422 } )
432423 ) . toBeVisible ( )
433424} )
425+
426+ test ( 'user sees symmetric monoidal categories for the given category' , async ( {
427+ page
428+ } ) => {
429+ await page . goto ( '/category/Top' , { waitUntil : 'networkidle' } )
430+
431+ await expect (
432+ page . getByRole ( 'link' , {
433+ name : 'cartesian symmetric monoidal category of topological spaces' ,
434+ exact : true
435+ } )
436+ ) . toBeVisible ( )
437+ } )
0 commit comments