mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-30 22:11:07 +00:00 
			
		
		
		
	tests: increase checkAccessibility timeout to 2s (#9137)
		
	Because the flakiness of this check seems to be also present in Firefox, this is an attempt at reducing the flakiness, as an alternative to #9118. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9137 Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org> Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu> Co-committed-by: Antonin Delpeuch <antonin@delpeuch.eu>
This commit is contained in:
		
					parent
					
						
							
								cba500459f
							
						
					
				
			
			
				commit
				
					
						8f4ebab023
					
				
			
		
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -22,19 +22,19 @@ export async function accessibilityCheck({page}: {page: Page}, includes: string[ | ||||||
|   // Have observed failures during this scanning which are understood to be caused by CSS transitions, either applied to
 |   // Have observed failures during this scanning which are understood to be caused by CSS transitions, either applied to
 | ||||||
|   // whatever last action occurred on the page before `accessibilityCheck` was called, or during the transition from
 |   // whatever last action occurred on the page before `accessibilityCheck` was called, or during the transition from
 | ||||||
|   // dark to light.  As there are a variety of transitions in Forgejo's CSS files (primarily in fomantic) with ease
 |   // dark to light.  As there are a variety of transitions in Forgejo's CSS files (primarily in fomantic) with ease
 | ||||||
|   // elements between 0.1 and 0.3 seconds, we give the accessibility scanner up to 1s to settle into success for each
 |   // elements between 0.1 and 0.3 seconds, we give the accessibility scanner up to 2s to settle into success for each
 | ||||||
|   // scan.
 |   // scan.
 | ||||||
|   await expect(async () => { |   await expect(async () => { | ||||||
|     const accessibilityScanResults = await accessibilityScanner.analyze(); |     const accessibilityScanResults = await accessibilityScanner.analyze(); | ||||||
|     expect(accessibilityScanResults.violations).toEqual([]); |     expect(accessibilityScanResults.violations).toEqual([]); | ||||||
|   }).toPass({timeout: 1000}); |   }).toPass({timeout: 2000}); | ||||||
| 
 | 
 | ||||||
|   await page.emulateMedia({colorScheme: 'dark'}); |   await page.emulateMedia({colorScheme: 'dark'}); | ||||||
| 
 | 
 | ||||||
|   await expect(async () => { |   await expect(async () => { | ||||||
|     const accessibilityScanResults = await accessibilityScanner.analyze(); |     const accessibilityScanResults = await accessibilityScanner.analyze(); | ||||||
|     expect(accessibilityScanResults.violations).toEqual([]); |     expect(accessibilityScanResults.violations).toEqual([]); | ||||||
|   }).toPass({timeout: 1000}); |   }).toPass({timeout: 2000}); | ||||||
| 
 | 
 | ||||||
|   await page.emulateMedia({colorScheme: 'light'}); |   await page.emulateMedia({colorScheme: 'light'}); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue