mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	test: add regression tests for clicking (#22221)
https://github.com/microsoft/playwright/issues/21995
This commit is contained in:
		
							parent
							
								
									5734f11a69
								
							
						
					
					
						commit
						29643a7bff
					
				@ -53,3 +53,19 @@ it('should double click the button', async ({ page, server }) => {
 | 
			
		||||
  expect(await page.evaluate('double')).toBe(true);
 | 
			
		||||
  expect(await page.evaluate('result')).toBe('Clicked');
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
it('should click if the target element is removed in pointerup event', async ({ page, browserName }) => {
 | 
			
		||||
  it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/21995' });
 | 
			
		||||
  it.fixme(browserName === 'firefox');
 | 
			
		||||
  await page.setContent(`<button id=clickme>Clickable</button>`);
 | 
			
		||||
  await page.$eval('#clickme', element => element.addEventListener('pointerup', () => element.remove(), false));
 | 
			
		||||
  await page.locator('#clickme').click();
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
it('should click if the target element is removed in pointerdown event', async ({ page, browserName }) => {
 | 
			
		||||
  it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/21995' });
 | 
			
		||||
  it.fixme(browserName === 'firefox');
 | 
			
		||||
  await page.setContent(`<button id=clickme>Clickable</button>`);
 | 
			
		||||
  await page.$eval('#clickme', element => element.addEventListener('pointerdown', () => element.remove(), false));
 | 
			
		||||
  await page.locator('#clickme').click();
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user