In #35049, integration and AIO tests were changed to use the browser provided by `puppeteer` in tests. This commit switches the docs examples tests to use the same setup. IMPLEMENTATION NOTE: The examples are used to create ZIP archives that docs users can download to experiment with. Since we want the downloaded projects to resemble an `@angular/cli` generated project, we do not want to affect the project's Protractor configuration in order to use `puppeteer`. To achieve this, a second Protractor configuration is created (which is ignored when creating the ZIP archives) that extends the original one and passes the approperiate arguments to use the browser provided by `puppeteer`. This new configuration (`protractor-puppeteer.conf.js`) is used when running the docs examples tests (on CI or locally during development). PR Close #35381
		
			
				
	
	
		
			20 lines
		
	
	
		
			735 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			735 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // @ts-check
 | |
| // A protractor config to use to run the tests using the Chrome version provided by `puppeteer`.
 | |
| // This is useful to ensure deterministic runs on CI and locally. This file is ignored when creating
 | |
| // StackBlitz examples and ZIP archives for each example.
 | |
| 
 | |
| const {config} = require('./protractor.conf.js');
 | |
| 
 | |
| exports.config = {
 | |
|   ...config,
 | |
|   capabilities: {
 | |
|     ...config.capabilities,
 | |
|     chromeOptions: {
 | |
|       ...config.capabilities.chromeOptions,
 | |
|       binary: require('puppeteer').executablePath(),
 | |
|       // See /integration/README.md#browser-tests for more info on these args
 | |
|       args: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage', '--hide-scrollbars', '--mute-audio'],
 | |
|     },
 | |
|   },
 | |
| };
 |