| 
									
										
										
										
											2023-10-11 13:56:27 -07:00
										 |  |  | import { test as test1, expect as expect1, mergeTests, mergeExpects } from '@playwright/test'; | 
					
						
							| 
									
										
										
										
											2023-10-04 15:01:25 -07:00
										 |  |  | import { test as test2, expect as expect2 } from 'playwright-test-plugin'; | 
					
						
							| 
									
										
										
										
											2023-09-28 17:18:22 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-11 13:56:27 -07:00
										 |  |  | const test = mergeTests(test1, test2); | 
					
						
							|  |  |  | const expect = mergeExpects(expect1, expect2); | 
					
						
							| 
									
										
										
										
											2023-09-28 17:18:22 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | test('sample test', async ({ page, plugin }) => { | 
					
						
							|  |  |  |   await page.setContent(`<div>hello</div><span>world</span>`); | 
					
						
							|  |  |  |   expect(await page.textContent('span')).toBe('world'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   console.log(`plugin value: ${plugin}`); | 
					
						
							|  |  |  |   expect(plugin).toBe('hello from plugin'); | 
					
						
							| 
									
										
										
										
											2023-10-04 15:01:25 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   await page.setContent('<div>hello world</div>'); | 
					
						
							|  |  |  |   await expect(page).toContainText('hello'); | 
					
						
							| 
									
										
										
										
											2023-09-28 17:18:22 -07:00
										 |  |  | }); |