| 
									
										
										
										
											2020-07-23 15:14:36 -07:00
										 |  |  | /** | 
					
						
							|  |  |  |  * Copyright (c) Microsoft Corporation. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Licensed under the Apache License, Version 2.0 (the "License"); | 
					
						
							|  |  |  |  * you may not use this file except in compliance with the License. | 
					
						
							|  |  |  |  * You may obtain a copy of the License at | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * http://www.apache.org/licenses/LICENSE-2.0
 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Unless required by applicable law or agreed to in writing, software | 
					
						
							|  |  |  |  * distributed under the License is distributed on an "AS IS" BASIS, | 
					
						
							|  |  |  |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
					
						
							|  |  |  |  * See the License for the specific language governing permissions and | 
					
						
							|  |  |  |  * limitations under the License. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-25 09:30:14 -07:00
										 |  |  | import path from 'path'; | 
					
						
							| 
									
										
										
										
											2023-01-12 13:12:02 -08:00
										 |  |  | import { defineConfig } from '@playwright/test'; | 
					
						
							| 
									
										
										
										
											2023-08-24 16:06:41 -07:00
										 |  |  | import type { ReporterDescription } from '@playwright/test'; | 
					
						
							| 
									
										
										
										
											2022-04-25 09:30:14 -07:00
										 |  |  | import { config as loadEnv } from 'dotenv'; | 
					
						
							|  |  |  | loadEnv({ path: path.join(__dirname, '..', '..', '.env') }); | 
					
						
							| 
									
										
										
										
											2020-07-23 15:14:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-24 16:06:41 -07:00
										 |  |  | const reporters = () => { | 
					
						
							|  |  |  |   const result: ReporterDescription[] = process.env.CI ? [ | 
					
						
							|  |  |  |     ['dot'], | 
					
						
							|  |  |  |     ['json', { outputFile: path.join(outputDir, 'report.json') }], | 
					
						
							| 
									
										
										
										
											2023-12-06 20:44:06 -08:00
										 |  |  |     ['blob', { fileName: `${process.env.PWTEST_BOT_NAME}.zip` }], | 
					
						
							| 
									
										
										
										
											2023-08-24 16:06:41 -07:00
										 |  |  |   ] : [ | 
					
						
							|  |  |  |     ['list'], | 
					
						
							|  |  |  |     ['html', { open: 'on-failure' }] | 
					
						
							|  |  |  |   ]; | 
					
						
							|  |  |  |   return result; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-07 10:17:07 -06:00
										 |  |  | const outputDir = path.join(__dirname, '..', '..', 'test-results'); | 
					
						
							| 
									
										
										
										
											2023-01-12 13:12:02 -08:00
										 |  |  | export default defineConfig({ | 
					
						
							| 
									
										
										
										
											2022-05-03 12:48:35 -07:00
										 |  |  |   globalSetup: path.join(__dirname, 'globalSetup'), | 
					
						
							| 
									
										
										
										
											2022-05-07 10:17:07 -06:00
										 |  |  |   outputDir, | 
					
						
							| 
									
										
										
										
											2022-04-25 09:30:14 -07:00
										 |  |  |   testIgnore: '**\/fixture-scripts/**', | 
					
						
							|  |  |  |   timeout: 5 * 60 * 1000, | 
					
						
							|  |  |  |   retries: 0, | 
					
						
							| 
									
										
										
										
											2023-08-24 16:06:41 -07:00
										 |  |  |   reporter: reporters(), | 
					
						
							| 
									
										
										
										
											2022-04-25 09:30:14 -07:00
										 |  |  |   forbidOnly: !!process.env.CI, | 
					
						
							|  |  |  |   workers: 1, | 
					
						
							| 
									
										
										
										
											2022-05-06 20:04:34 -06:00
										 |  |  |   projects: [ | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       name: 'installation tests', | 
					
						
							|  |  |  |       metadata: { | 
					
						
							|  |  |  |         nodejsVersion: process.version, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   ], | 
					
						
							| 
									
										
										
										
											2023-01-12 13:12:02 -08:00
										 |  |  | }); |