mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	As per https://codeberg.org/forgejo/forgejo/pulls/6400, the after hook runs for every test, resulting in duplicated screenshots.
Not all tests are supposed to generate screenshots, especially because they could be flaky (also see 206d4cfb7a ).
Additionally, the implicit behaviour might have caused confusion, so we now create screenshots explicitly, adding the statements from the tests that already generated screenshots.
		
	
			
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			635 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			635 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| // @watch start
 | |
| // web_src/css/markup/**
 | |
| // @watch end
 | |
| 
 | |
| import {expect} from '@playwright/test';
 | |
| import {save_visual, test} from './utils_e2e.ts';
 | |
| 
 | |
| test('markup with #xyz-mode-only', async ({page}) => {
 | |
|   const response = await page.goto('/user2/repo1/issues/1');
 | |
|   expect(response?.status()).toBe(200);
 | |
| 
 | |
|   const comment = page.locator('.comment-body>.markup', {hasText: 'test markup light/dark-mode-only'});
 | |
|   await expect(comment).toBeVisible();
 | |
|   await expect(comment.locator('[src$="#gh-light-mode-only"]')).toBeVisible();
 | |
|   await expect(comment.locator('[src$="#gh-dark-mode-only"]')).toBeHidden();
 | |
|   await save_visual(page);
 | |
| });
 |