2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  expect , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  BrowserContext , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  TestInfo , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-20 05:34:26 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  Locator , 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  Page , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  from  '@playwright/test'  
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  test  }  from  './zoo-test'  
						 
					
						
							
								
									
										
										
										
											2024-08-03 18:08:51 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  EngineCommand  }  from  'lang/std/artifactGraph'  
						 
					
						
							
								
									
										
										
										
											2023-12-01 20:49:12 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  fsp  from  'fs/promises'  
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  path  from  'path'  
						 
					
						
							
								
									
										
										
										
											2023-12-01 20:49:12 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  pixelMatch  from  'pixelmatch'  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								import  {  PNG  }  from  'pngjs'  
						 
					
						
							
								
									
										
										
										
											2024-05-23 02:20:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  Protocol  }  from  'playwright-core/types/protocol'  
						 
					
						
							
								
									
										
										
										
											2024-05-29 18:04:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  type  {  Models  }  from  '@kittycad/lib'  
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  COOKIE_NAME  }  from  'lib/constants'  
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  secrets  }  from  './secrets'  
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  TEST_SETTINGS_KEY , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  TEST_SETTINGS , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  IS_PLAYWRIGHT_KEY , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  from  './storageStates'  
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  *  as  TOML  from  '@iarna/toml'  
						 
					
						
							
								
									
										
										
										
											2024-09-16 07:32:33 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  isErrorWhitelisted  }  from  './lib/console-error-whitelist'  
						 
					
						
							
								
									
										
										
										
											2024-08-22 16:08:49 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  isArray  }  from  'lib/utils'  
						 
					
						
							
								
									
										
										
										
											2024-09-09 18:17:45 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  reportRejection  }  from  'lib/trap'  
						 
					
						
							
								
									
										
										
										
											2025-03-05 18:03:49 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								import  {  DeepPartial  }  from  'lib/types'  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								import  {  Configuration  }  from  'lang/wasm'  
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								const  toNormalizedCode  =  ( text : string )  = >  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  text . replace ( /\s+/g ,  '' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-21 13:13:26 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  type  TestColor  =  [ number ,  number ,  number ]  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  const  TEST_COLORS :  {  [ key : string ] :  TestColor  }  =  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  WHITE :  [ 249 ,  249 ,  249 ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  YELLOW :  [ 255 ,  255 ,  0 ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  BLUE :  [ 0 ,  0 ,  255 ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  DARK_MODE_BKGD :  [ 27 ,  27 ,  27 ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  DARK_MODE_PLANE_XZ :  [ 50 ,  50 ,  99 ] , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-22 04:49:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  as  const  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  const  PERSIST_MODELING_CONTEXT  =  'persistModelingContext'  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  const  deg  =  ( Math . PI  *  2 )  /  360  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  const  commonPoints  =  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  startAt :  '[7.19, -9.7]' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  num1 : 7.25 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  num2 : 14.44 , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-31 07:04:38 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  /** The Y-value of a common lineTo move we perform in tests */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  num3 :  - 2.44 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  as  const  
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  const  editorSelector  =  '[role="textbox"][data-language="kcl"]'  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								type  PaneId  =  'variables'  |  'code'  |  'files'  |  'logs'  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-20 23:52:30 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  function  orRunWhenFullSuiteEnabled() {  
						 
					
						
							
								
									
										
										
										
											2025-03-21 16:00:07 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  return  process . env . GITHUB_REF  !==  'all-e2e' 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-20 23:52:30 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-05 21:30:16 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								async  function  waitForPageLoadWithRetry ( page : Page )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  page . goto ( '/' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  errorMessage  =  'App failed to load - 🔃 Retrying ...' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  expect ( page . getByTestId ( 'loading' ) ,  errorMessage ) . not . toBeAttached ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      timeout : 20_000 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  expect ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      page . getByRole ( 'button' ,  {  name :  'sketch Start Sketch'  } ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-05 21:30:16 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      errorMessage 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ) . toBeEnabled ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      timeout : 20_000 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) . toPass ( {  timeout : 70_000 ,  intervals :  [ 1 _000 ]  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								async  function  waitForPageLoad ( page : Page )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // wait for all spinners to be gone
 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-18 16:16:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  expect ( page . getByTestId ( 'loading' ) ) . not . toBeAttached ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    timeout : 20_000 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-24 23:33:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  expect ( page . getByRole ( 'button' ,  {  name :  'Start Sketch'  } ) ) . toBeEnabled ( { 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-18 16:16:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    timeout : 20_000 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								async  function  removeCurrentCode ( page : Page )  {  
						 
					
						
							
								
									
										
										
										
											2024-06-07 10:48:42 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  page . locator ( '.cm-content' ) . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 19:13:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  page . keyboard . down ( 'ControlOrMeta' ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  await  page . keyboard . press ( 'a' ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 19:13:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  page . keyboard . up ( 'ControlOrMeta' ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  await  page . keyboard . press ( 'Backspace' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( page . locator ( '.cm-content' ) ) . toHaveText ( '' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-09-26 18:25:05 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  async  function  sendCustomCmd ( page : Page ,  cmd : EngineCommand )  {  
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  json  =  JSON . stringify ( cmd ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  page . getByTestId ( 'custom-cmd-input' ) . fill ( json ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( page . getByTestId ( 'custom-cmd-input' ) ) . toHaveValue ( json ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  page . getByTestId ( 'custom-cmd-send-button' ) . scrollIntoViewIfNeeded ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-07 10:48:42 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  page . getByTestId ( 'custom-cmd-send-button' ) . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								async  function  clearCommandLogs ( page : Page )  {  
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  page . getByTestId ( 'custom-cmd-input' ) . fill ( '' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  page . getByTestId ( 'clear-commands' ) . scrollIntoViewIfNeeded ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-07 10:48:42 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  page . getByTestId ( 'clear-commands' ) . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-29 10:36:04 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								async  function  expectCmdLog ( page : Page ,  locatorStr : string ,  timeout  =  5000 )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( page . locator ( locatorStr ) . last ( ) ) . toBeVisible ( {  timeout  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 15:36:18 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// Ignoring the lint since I assume someone will want to use this for a test.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// eslint-disable-next-line @typescript-eslint/no-unused-vars
  
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								async  function  waitForDefaultPlanesToBeVisible ( page : Page )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  page . waitForFunction ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ( )  = > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      document . querySelectorAll ( '[data-receive-command-type="object_visible"]' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . length  >=  3 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-31 07:04:38 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  async  function  checkIfPaneIsOpen ( page : Page ,  testId : string )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  paneButtonLocator  =  page . getByTestId ( testId ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( paneButtonLocator ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  ( await  paneButtonLocator ? . getAttribute ( 'aria-pressed' ) )  ===  'true' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  async  function  openPane ( page : Page ,  testId : string )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  paneButtonLocator  =  page . getByTestId ( testId ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( paneButtonLocator ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  isOpen  =  await  checkIfPaneIsOpen ( page ,  testId ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( ! isOpen )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-31 07:04:38 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  paneButtonLocator . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( paneButtonLocator ) . toHaveAttribute ( 'aria-pressed' ,  'true' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  async  function  closePane ( page : Page ,  testId : string )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  paneButtonLocator  =  page . getByTestId ( testId ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( paneButtonLocator ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  isOpen  =  await  checkIfPaneIsOpen ( page ,  testId ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( isOpen )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  paneButtonLocator . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-31 07:04:38 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  expect ( paneButtonLocator ) . toHaveAttribute ( 'aria-pressed' ,  'false' ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-20 22:11:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								async  function  openKclCodePanel ( page : Page )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  openPane ( page ,  'code-pane-button' ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Code Mirror lazy loads text! Wowza! Let's force-load the text for tests.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  page . evaluate ( ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // editorManager is available on the window object.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    //@ts-ignore this is in an entirely different context that tsc can't see.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    editorManager . _editorView . dispatch ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      selection :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        //@ts-ignore this is in an entirely different context that tsc can't see.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        anchor : editorManager._editorView.docView.length , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      scrollIntoView : true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-20 22:11:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								async  function  closeKclCodePanel ( page : Page )  {  
						 
					
						
							
								
									
										
										
										
											2024-07-24 23:33:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  paneLocator  =  page . getByTestId ( 'code-pane-button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  ariaSelected  =  await  paneLocator ? . getAttribute ( 'aria-pressed' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  isOpen  =  ariaSelected  ===  'true' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  if  ( isOpen )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  paneLocator . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-24 22:02:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  expect ( paneLocator ) . not . toHaveAttribute ( 'aria-pressed' ,  'true' ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								async  function  openDebugPanel ( page : Page )  {  
						 
					
						
							
								
									
										
										
										
											2024-08-20 22:11:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  openPane ( page ,  'debug-pane-button' ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // The debug pane needs time to load everything.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  page . waitForTimeout ( 3000 ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-09-26 18:25:05 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  async  function  closeDebugPanel ( page : Page )  {  
						 
					
						
							
								
									
										
										
										
											2024-07-24 23:33:31 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  debugLocator  =  page . getByTestId ( 'debug-pane-button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( debugLocator ) . toBeVisible ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-24 22:02:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  isOpen  =  ( await  debugLocator ? . getAttribute ( 'aria-pressed' ) )  ===  'true' 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  if  ( isOpen )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  debugLocator . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-24 22:02:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  expect ( debugLocator ) . not . toHaveAttribute ( 'aria-pressed' ,  'true' ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 14:21:34 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								async  function  openFilePanel ( page : Page )  {  
						 
					
						
							
								
									
										
										
										
											2024-08-20 22:11:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  openPane ( page ,  'files-pane-button' ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 14:21:34 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								async  function  closeFilePanel ( page : Page )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  fileLocator  =  page . getByTestId ( 'files-pane-button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( fileLocator ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  isOpen  =  ( await  fileLocator ? . getAttribute ( 'aria-pressed' ) )  ===  'true' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( isOpen )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  fileLocator . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  expect ( fileLocator ) . not . toHaveAttribute ( 'aria-pressed' ,  'true' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-20 22:11:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								async  function  openVariablesPane ( page : Page )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  openPane ( page ,  'variables-pane-button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								async  function  openLogsPane ( page : Page )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  openPane ( page ,  'logs-pane-button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								async  function  waitForCmdReceive ( page : Page ,  commandType : string )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  page 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    . locator ( ` [data-receive-command-type=" ${ commandType } "] ` ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    . first ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    . waitFor ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  const  wiggleMove  =  async  (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  page : any , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  x : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  y : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  steps : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  dist : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ang : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  amplitude : number , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-24 11:45:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  freq : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  locator? : string 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								)  = >  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  tau  =  Math . PI  *  2 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  deg  =  tau  /  360 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  step  =  dist  /  steps 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  for  ( let  i  =  0 ,  j  =  0 ;  i  <  dist ;  i  +=  step ,  j  +=  1 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-24 11:45:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( locator )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  isElVis  =  await  page . locator ( locator ) . isVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( isElVis )  return 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 15:36:18 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // x1 is 0.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  y1  =  Math . sin ( ( tau  /  steps )  *  j  *  freq )  *  amplitude 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  [ x2 ,  y2 ]  =  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      Math . cos ( - ang  *  deg )  *  i  -  Math . sin ( - ang  *  deg )  *  y1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      Math . sin ( - ang  *  deg )  *  i  +  Math . cos ( - ang  *  deg )  *  y1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  [ xr ,  yr ]  =  [ x2 ,  y2 ] 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-24 11:45:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  page . mouse . move ( x  +  xr ,  y  +  yr ,  {  steps : 5  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  const  circleMove  =  async  (  
						 
					
						
							
								
									
										
										
										
											2024-08-22 15:00:13 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  page : Page , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-24 11:45:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  x : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  y : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  steps : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  diameter : number , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  locator? : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)  = >  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  tau  =  Math . PI  *  2 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  step  =  tau  /  steps 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  for  ( let  i  =  0 ;  i  <  tau ;  i  +=  step )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( locator )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  isElVis  =  await  page . locator ( locator ) . isVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( isElVis )  return 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  [ x1 ,  y1 ]  =  [ Math . cos ( i )  *  diameter ,  Math . sin ( i )  *  diameter ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  [ xr ,  yr ]  =  [ x1 ,  y1 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  page . mouse . move ( x  +  xr ,  y  +  yr ,  {  steps : 5  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  const  getMovementUtils  =  ( opts : any )  = >  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // The way we truncate is kinda odd apparently, so we need this function
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // "[k]itty[c]ad round"
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  kcRound  =  ( n : number )  = >  Math . trunc ( n  *  100 )  /  100 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // To translate between screen and engine ("[U]nit") coordinates
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // NOTE: these pretty much can't be perfect because of screen scaling.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Handle on a case-by-case.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  toU  =  ( x : number ,  y : number )  = >  [ 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-18 16:08:41 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    kcRound ( x  *  0.0678 ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    kcRound ( - y  *  0.0678 ) ,  // Y is inverted in our coordinate system
 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Turn the array into a string with specific formatting
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  fromUToString  =  ( xy : number [ ] )  = >  ` [ ${ xy [ 0 ] } ,  ${ xy [ 1 ] } ] ` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Combine because used often
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  toSU  =  ( xy : number [ ] )  = >  fromUToString ( toU ( xy [ 0 ] ,  xy [ 1 ] ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Make it easier to click around from center ("click [from] zero zero")
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  click00  =  ( x : number ,  y : number )  = > 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-24 11:45:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    opts . page . mouse . click ( opts . center . x  +  x ,  opts . center . y  +  y ,  {  delay : 100  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Relative clicker, must keep state
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  let  last  =  {  x : 0 ,  y : 0  } 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-24 11:45:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  click00r  =  async  ( x? : number ,  y? : number )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // reset relative coordinates when anything is undefined
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( x  ===  undefined  ||  y  ===  undefined )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      last . x  =  0 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      last . y  =  0 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-24 11:45:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  circleMove ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      opts . page , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      opts . center . x  +  last . x  +  x , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      opts . center . y  +  last . y  +  y , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      10 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      10 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  click00 ( last . x  +  x ,  last . y  +  y ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    last . x  +=  x 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    last . y  +=  y 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Returns the new absolute coordinate if you need it.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-24 11:45:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    return  [ last . x ,  last . y ] 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-13 09:41:27 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  return  {  toSU ,  toU ,  click00r  } 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-06-29 18:10:07 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								async  function  waitForAuthAndLsp ( page : Page )  {  
						 
					
						
							
								
									
										
										
										
											2024-08-08 09:19:07 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  waitForLspPromise  =  page . waitForEvent ( 'console' ,  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    predicate : async  ( message : any )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-08 09:19:07 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      // it would be better to wait for a message that the kcl lsp has started by looking for the message  message.text().includes('[lsp] [window/logMessage]')
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // but that doesn't seem to make it to the console for macos/safari :(
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( message . text ( ) . includes ( 'start kcl lsp' ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  new  Promise ( ( resolve )  = >  setTimeout ( resolve ,  200 ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  false 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    timeout : 45_000 , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-29 18:10:07 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-05 21:30:16 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  if  ( process . env . CI )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  waitForPageLoadWithRetry ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  page . goto ( '/' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  waitForPageLoad ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-29 18:10:07 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  waitForLspPromise 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-12 15:16:13 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  function  normaliseKclNumbers ( code : string ,  ignoreZero  =  true ) :  string  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  numberRegexp  =  /(?<!\w)-?\b\d+(\.\d+)?\b(?!\w)/g 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  replaceNumber  =  ( number :  string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( ignoreZero  &&  ( number  ===  '0'  ||  number  ===  '-0' ) )  return  number 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  sign  =  number . startsWith ( '-' )  ?  '-'  :  '' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    return  ` ${ sign } 12.34 ` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  replaceNumbers  =  ( text : string )  = > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    text . replace ( numberRegexp ,  replaceNumber ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  replaceNumbers ( code ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  async  function  getUtils ( page : Page ,  test_? : typeof  test )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( ! test )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    console . warn ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      'Some methods in getUtils requires test object as second argument' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-24 16:11:49 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  // Chrome devtools protocol session only works in Chromium
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  browserType  =  page . context ( ) . browser ( ) ? . browserType ( ) . name ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-23 02:20:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  cdpSession  = 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-24 16:11:49 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    browserType  !==  'chromium'  ?  null  :  await  page . context ( ) . newCDPSession ( page ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-23 02:20:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  util  =  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-29 18:10:07 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    waitForAuthSkipAppStart :  ( )  = >  waitForAuthAndLsp ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-05 05:42:54 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    waitForPageLoad :  ( )  = >  waitForPageLoad ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-05 21:30:16 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    waitForPageLoadWithRetry :  ( )  = >  waitForPageLoadWithRetry ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    removeCurrentCode :  ( )  = >  removeCurrentCode ( page ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    sendCustomCmd :  ( cmd : EngineCommand )  = >  sendCustomCmd ( page ,  cmd ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-11 12:59:00 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    updateCamPosition : async  ( xyz :  [ number ,  number ,  number ] )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      const  fillInput  =  async  ( axis :  'x'  |  'y'  |  'z' ,  value : number )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . fill ( ` [data-testid="cam- ${ axis } -position"] ` ,  String ( value ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . waitForTimeout ( 100 ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-11 12:59:00 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  fillInput ( 'x' ,  xyz [ 0 ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  fillInput ( 'y' ,  xyz [ 1 ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  fillInput ( 'z' ,  xyz [ 2 ] ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-11 12:59:00 +11:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    clearCommandLogs :  ( )  = >  clearCommandLogs ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-29 10:36:04 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    expectCmdLog :  ( locatorStr : string ,  timeout  =  5000 )  = > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expectCmdLog ( page ,  locatorStr ,  timeout ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-15 12:04:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    openKclCodePanel :  ( )  = >  openKclCodePanel ( page ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    closeKclCodePanel :  ( )  = >  closeKclCodePanel ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    openDebugPanel :  ( )  = >  openDebugPanel ( page ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    closeDebugPanel :  ( )  = >  closeDebugPanel ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 14:21:34 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    openFilePanel :  ( )  = >  openFilePanel ( page ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    closeFilePanel :  ( )  = >  closeFilePanel ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-20 22:11:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    openVariablesPane :  ( )  = >  openVariablesPane ( page ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    openLogsPane :  ( )  = >  openLogsPane ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-26 18:25:05 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    openAndClearDebugPanel :  ( )  = >  openAndClearDebugPanel ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    clearAndCloseDebugPanel : async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  clearCommandLogs ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  closeDebugPanel ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    waitForCmdReceive :  ( commandType : string )  = > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      waitForCmdReceive ( page ,  commandType ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-31 11:36:08 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    getSegmentBodyCoords : async  ( locator : string ,  px  =  30 )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  overlay  =  page . locator ( locator ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  bbox  =  await  overlay 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . boundingBox ( {  timeout : 5_000  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . then ( ( box : any )  = >  ( {  . . . box ,  x : box?.x  ||  0 ,  y : box?.y  ||  0  } ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-31 11:36:08 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      const  angle  =  Number ( await  overlay . getAttribute ( 'data-overlay-angle' ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  angleXOffset  =  Math . cos ( ( ( angle  -  180 )  *  Math . PI )  /  180 )  *  px 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  angleYOffset  =  Math . sin ( ( ( angle  -  180 )  *  Math . PI )  /  180 )  *  px 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-05 10:36:12 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        x : Math.round ( bbox . x  +  angleXOffset ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        y : Math.round ( bbox . y  -  angleYOffset ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-31 11:36:08 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-04 08:32:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    getAngle : async  ( locator : string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  overlay  =  page . locator ( locator ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  Number ( await  overlay . getAttribute ( 'data-overlay-angle' ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-24 20:54:42 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    getBoundingBox : async  ( locator : string )  = > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      page 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . locator ( locator ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . boundingBox ( {  timeout : 5_000  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        . then ( ( box : any )  = >  ( {  . . . box ,  x : box?.x  ||  0 ,  y : box?.y  ||  0  } ) ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-05 14:43:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    codeLocator : page.locator ( '.cm-content' ) , 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    crushKclCodeIntoOneLineAndThenMaybeSome : async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  code  =  await  page . locator ( '.cm-content' ) . innerText ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  code . replaceAll ( ' ' ,  '' ) . replaceAll ( '\n' ,  '' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-12 15:16:13 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    normalisedEditorCode : async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  code  =  await  page . locator ( '.cm-content' ) . innerText ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  normaliseKclNumbers ( code ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    normalisedCode :  ( code : string )  = >  normaliseKclNumbers ( code ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-18 16:08:41 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    canvasLocator : page.getByTestId ( 'client-side-scene' ) , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    doAndWaitForCmd : async  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      fn :  ( )  = >  Promise < void > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      commandType : string , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      endWithDebugPanelOpen  =  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  openDebugPanel ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  clearCommandLogs ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  closeDebugPanel ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  fn ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  openDebugPanel ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  waitForCmdReceive ( page ,  commandType ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( ! endWithDebugPanelOpen )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  closeDebugPanel ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-05 10:36:12 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  Given  an  expected  RGB  value ,  diff  if  the  channel  with  the  largest  difference 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    getGreatestPixDiff : async  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      coords :  {  x : number ;  y : number  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      expected :  [ number ,  number ,  number ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ) :  Promise < number >  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  buffer  =  await  page . screenshot ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        fullPage : true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  screenshot  =  await  PNG . sync . read ( buffer ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-07 13:10:52 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      const  pixMultiplier : number  =  await  page . evaluate ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'window.devicePixelRatio' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-05 10:36:12 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      const  index  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ( screenshot . width  *  coords . y  *  pixMultiplier  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          coords . x  *  pixMultiplier )  * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        4  // rbga is 4 channels
 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-28 14:40:59 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      const  maxDiff  =  Math . max ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-05 10:36:12 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        Math . abs ( screenshot . data [ index ]  -  expected [ 0 ] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        Math . abs ( screenshot . data [ index  +  1 ]  -  expected [ 1 ] ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        Math . abs ( screenshot . data [ index  +  2 ]  -  expected [ 2 ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-28 14:40:59 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      if  ( maxDiff  >  4 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        console . log ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          ` Expected:  ${ expected }  Actual: [ ${ screenshot . data [ index ] } ,  ${ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            screenshot . data [ index  +  1 ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ,  $ { screenshot . data [ index  +  2 ] } ] ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  maxDiff 
							 
						 
					
						
							
								
									
										
										
										
											2024-06-05 10:36:12 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-02 13:15:40 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    getPixelRGBs : getPixelRGBs ( page ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-09 18:17:45 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    doAndWaitForImageDiff :  ( fn :  ( )  = >  Promise < unknown > ,  diffCount  =  200 )  = > 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-26 18:25:05 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      doAndWaitForImageDiff ( page ,  fn ,  diffCount ) , 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-23 02:20:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    emulateNetworkConditions : async  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      networkOptions : Protocol.Network.emulateNetworkConditionsParameters 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-07 13:10:52 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      if  ( cdpSession  ===  null )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Use a fail safe if we can't simulate disconnect (on Safari)
 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  page . evaluate ( 'window.engineCommandManager.tearDown()' ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-07 13:10:52 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-23 02:20:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 15:36:18 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      return  cdpSession ? . send ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        'Network.emulateNetworkConditions' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        networkOptions 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-23 02:20:40 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    toNormalizedCode ( text : string )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  toNormalizedCode ( text ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    async  editorTextMatches ( code : string )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      const  editor  =  page . locator ( editorSelector ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      return  expect 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . poll ( async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          const  text  =  await  editor . textContent ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          return  toNormalizedCode ( text  ? ?  '' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        . toContain ( toNormalizedCode ( code ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    pasteCodeInEditor : async  ( code : string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  test ? . step ( 'Paste in KCL code' ,  async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  editor  =  page . locator ( editorSelector ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  editor . fill ( code ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  util . editorTextMatches ( code ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    clickPane : async  ( paneId : PaneId )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  test ? . step ( ` Open  ${ paneId }  pane ` ,  async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . getByTestId ( paneId  +  '-pane-button' ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  expect ( page . locator ( '#'  +  paneId  +  '-pane' ) ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-28 06:38:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    createNewFile : async  ( name : string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  test ? . step ( ` Create a file named  ${ name } ` ,  async  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-17 23:42:24 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // If the application is in the middle of connecting a stream
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // then creating a new file won't work in the end.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  expect ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          page . getByRole ( 'button' ,  {  name :  'Start Sketch'  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ) . not . toBeDisabled ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-28 06:38:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        await  page . getByTestId ( 'create-file-button' ) . click ( ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        await  page . getByTestId ( 'tree-input-field' ) . fill ( name ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-28 06:38:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        await  page . keyboard . press ( 'Enter' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-02-04 18:13:59 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    cloneFile : async  ( name : string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  test ? . step ( ` Cloning file ' ${ name } ' ` ,  async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . locator ( '[data-testid="file-pane-scroll-container"] button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . filter ( {  hasText : name  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . click ( {  button :  'right'  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . getByTestId ( 'context-menu-clone' ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-28 06:38:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    selectFile : async  ( name : string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  test ? . step ( ` Select  ${ name } ` ,  async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . locator ( '[data-testid="file-pane-scroll-container"] button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . filter ( {  hasText : name  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-29 18:42:53 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        await  expect ( page . getByTestId ( 'project-sidebar-toggle' ) ) . toContainText ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          name 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-28 06:38:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    createNewFileAndSelect : async  ( name : string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  test ? . step ( ` Create a file named  ${ name } , select it ` ,  async  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-06 17:14:02 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        await  openFilePanel ( page ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        await  page . getByTestId ( 'create-file-button' ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . getByTestId ( 'file-rename-field' ) . fill ( name ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . keyboard . press ( 'Enter' ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-06 17:14:02 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        const  newFile  =  page 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-28 06:38:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          . locator ( '[data-testid="file-pane-scroll-container"] button' ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          . filter ( {  hasText : name  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-06 17:14:02 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  expect ( newFile ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  newFile . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-28 06:38:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    renameFile : async  ( fromName : string ,  toName : string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  test ? . step ( ` Rename  ${ fromName }  to  ${ toName } ` ,  async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . locator ( '[data-testid="file-pane-scroll-container"] button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . filter ( {  hasText : fromName  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . click ( {  button :  'right'  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . getByTestId ( 'context-menu-rename' ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . getByTestId ( 'file-rename-field' ) . fill ( toName ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . keyboard . press ( 'Enter' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . locator ( '[data-testid="file-pane-scroll-container"] button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . filter ( {  hasText : toName  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    deleteFile : async  ( name : string )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  test ? . step ( ` Delete  ${ name } ` ,  async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . locator ( '[data-testid="file-pane-scroll-container"] button' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . filter ( {  hasText : name  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . click ( {  button :  'right'  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . getByTestId ( 'context-menu-delete' ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . getByTestId ( 'delete-confirmation' ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-09-06 17:14:02 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    / * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  @deprecated  Sorry  I  don ' t  have  time  to  fix  this  right  now ,  but  runs  like 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  the  one  linked  below  show  me  that  setting  the  open  panes  in  this  manner  is  not  reliable . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  You  can  either  set  ` openPanes `  as  a  part  of  the  same  initScript  we  run  in  setupElectron / setup , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  or  you  can  imperatively  open  the  panes  with  functions  like  { openKclCodePanel } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  ( or  we  can  make  a  general  openPane  function  that  takes  a  paneId ) . , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  but  having  a  separate  initScript  does  not  seem  to  work  reliably . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     *  @link  https : //github.com/KittyCAD/modeling-app/actions/runs/10731890169/job/29762700806?pr=3807#step:20:19553
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								     * / 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    panesOpen : async  ( paneIds : PaneId [ ] )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  test ? . step ( ` Setting  ${ paneIds }  panes to be open ` ,  async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . addInitScript ( 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          ( {  PERSIST_MODELING_CONTEXT ,  paneIds  } :  any )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            localStorage . setItem ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              PERSIST_MODELING_CONTEXT , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              JSON . stringify ( {  openPanes : paneIds  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          {  PERSIST_MODELING_CONTEXT ,  paneIds  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . reload ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  util 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 08:59:24 +11:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-05-02 15:26:23 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								type  TemplateOptions  =  Array < number  |  Array < number > >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								type  makeTemplateReturn  =  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  regExp : RegExp 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  genNext :  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    templateParts : TemplateStringsArray , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    . . . options : TemplateOptions 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  )  = >  makeTemplateReturn 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								const  escapeRegExp  =  ( string :  string )  = >  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  string . replace ( /[.*+?^${}()|[\]\\]/g ,  '\\$&' )  // $& means the whole matched string
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								const  _makeTemplate  =  (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  templateParts : TemplateStringsArray , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  . . . options : TemplateOptions 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)  = >  {  
						 
					
						
							
								
									
										
										
										
											2024-08-22 16:08:49 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  length  =  Math . max ( . . . options . map ( ( a )  = >  ( isArray ( a )  ?  a [ 0 ]  :  0 ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-02 15:26:23 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  let  reExpTemplate  =  '' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  for  ( let  i  =  0 ;  i  <  length ;  i ++ )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  currentStr  =  templateParts . map ( ( str ,  index )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  currentOptions  =  options [ index ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        escapeRegExp ( str )  + 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        String ( 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 16:08:49 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          isArray ( currentOptions ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-02 15:26:23 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            ?  currentOptions [ i ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            :  typeof  currentOptions  ===  'number' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ?  currentOptions 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            :  '' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    reExpTemplate  +=  '|'  +  currentStr . join ( '' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  new  RegExp ( reExpTemplate ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/ * *  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Tool  for  making  templates  to  match  code  snippets  in  the  editor  with  some  fudge  factor , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  as  there ' s  some  level  of  non - determinism . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Usage  is  as  such : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  ` ` ` typescript
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  const  result  =  makeTemplate ` const myVar = aFunc( ${ [ 1 ,  2 ,  3 ] } ) ` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  await  expect ( page . locator ( '.cm-content' ) ) . toHaveText ( result . regExp ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  ` ` ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Where  the  value  ` 1 ` ,  ` 2 `  or  ` 3 `  are  all  valid  and  should  make  the  test  pass . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  The  function  also  has  a  ` genNext `  function  that  allows  you  to  chain  multiple  templates 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  together  without  having  to  repeat  previous  parts  of  the  template . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  ` ` ` typescript
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  const  result2  =  result . genNext ` const myVar2 = aFunc( ${ [ 4 ,  5 ,  6 ] } ) ` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  ` ` ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * / 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  const  makeTemplate :  (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  templateParts : TemplateStringsArray , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  . . . values : TemplateOptions 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)  = >  makeTemplateReturn  =  ( templateParts ,  . . . options )  = >  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    regExp : _makeTemplate ( templateParts ,  . . . options ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    genNext :  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      nextTemplateParts : TemplateStringsArray , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      . . . nextOptions : TemplateOptions 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    )  = > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      makeTemplate ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        [ . . . templateParts ,  . . . nextTemplateParts ]  as  any  as  TemplateStringsArray , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        [ . . . options ,  . . . nextOptions ]  as  any 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-05-29 18:04:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								const  PLAYWRIGHT_DOWNLOAD_DIR  =  'downloads-during-playwright'  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  const  getPlaywrightDownloadDir  =  ( rootDir : string )  = >  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  path . resolve ( rootDir ,  PLAYWRIGHT_DOWNLOAD_DIR ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								const  moveDownloadedFileTo  =  async  ( rootDir : string ,  toLocation : string )  = >  {  
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  fsp . mkdir ( path . dirname ( toLocation ) ,  {  recursive : true  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  const  downloadDir  =  getPlaywrightDownloadDir ( rootDir ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Expect there to be at least one file
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    . poll ( async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  files  =  await  fsp . readdir ( downloadDir ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  files . length 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    . toBeGreaterThan ( 0 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Go through the downloads dir and move files to new location
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  files  =  await  fsp . readdir ( downloadDir ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Assumption: only ever one file here.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  for  ( let  file  of  files )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  fsp . rename ( path . resolve ( downloadDir ,  file ) ,  toLocation ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 18:04:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  interface  Paths  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  modelPath : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  imagePath : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  outputType : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  const  doExport  =  async  (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  output : Models [ 'OutputFormat_type' ] , 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  rootDir : string , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 16:29:44 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  page : Page , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-21 15:02:39 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  exportFrom :  'dropdown'  |  'sidebarButton'  |  'commandBar'  =  'dropdown' 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 18:04:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								) :  Promise < Paths >  = >  {  
						 
					
						
							
								
									
										
										
										
											2024-08-21 15:02:39 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  if  ( exportFrom  ===  'dropdown' )  { 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  page . getByTestId ( 'project-sidebar-toggle' ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 16:29:44 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    const  exportMenuButton  =  page . getByRole ( 'button' ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      name :  'Export current part' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  expect ( exportMenuButton ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  exportMenuButton . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-21 15:02:39 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }  else  if  ( exportFrom  ===  'sidebarButton' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  expect ( page . getByTestId ( 'export-pane-button' ) ) . toBeVisible ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 16:29:44 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  page . getByTestId ( 'export-pane-button' ) . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-21 15:02:39 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }  else  if  ( exportFrom  ===  'commandBar' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  commandBarButton  =  page . getByRole ( 'button' ,  {  name :  'Commands'  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  expect ( commandBarButton ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Click the command bar button
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  commandBarButton . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Wait for the command bar to appear
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  cmdSearchBar  =  page . getByPlaceholder ( 'Search commands' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  expect ( cmdSearchBar ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  textToCadCommand  =  page . getByRole ( 'option' ,  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      name :  'floppy disk arrow Export' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  expect ( textToCadCommand . first ( ) ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Click the Text-to-CAD command
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  textToCadCommand . first ( ) . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 16:29:44 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 18:04:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  expect ( page . getByTestId ( 'command-bar' ) ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Go through export via command bar
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  page . getByRole ( 'option' ,  {  name : output.type ,  exact : false  } ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  page . locator ( '#arg-form' ) . waitFor ( {  state :  'detached'  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( 'storage'  in  output )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  page . getByTestId ( 'arg-name-storage' ) . waitFor ( {  timeout : 1000  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  page . getByRole ( 'button' ,  {  name :  'storage' ,  exact : false  } ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  page 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      . getByRole ( 'option' ,  {  name : output.storage ,  exact : false  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  page . locator ( '#arg-form' ) . waitFor ( {  state :  'detached'  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( page . getByText ( 'Confirm Export' ) ) . toBeVisible ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  page . getByRole ( 'button' ,  {  name :  'Submit command'  } ) . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 18:04:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  // This usually happens immediately after. If we're too slow we don't
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // catch it.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  expect ( page . getByText ( 'Exported successfully' ) ) . toBeVisible ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 18:04:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-21 15:02:39 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  if  ( exportFrom  ===  'sidebarButton'  ||  exportFrom  ===  'commandBar' )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-19 16:29:44 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    return  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      modelPath :  '' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      imagePath :  '' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      outputType : output.type , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 18:04:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Handle download
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  downloadLocationer  =  ( extra  =  '' ,  isImage  =  false )  = > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ` ./e2e/playwright/export-snapshots/ ${ output . type } - ${ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      'storage'  in  output  ?  output . storage  :  '' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } $ { extra } . $ { isImage  ?  'png'  :  output . type } ` 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  downloadLocation  =  downloadLocationer ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( output . type  ===  'step' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // stable timestamps for step files
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  fileContents  =  await  fsp . readFile ( downloadLocation ,  'utf-8' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  newFileContents  =  fileContents . replace ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      /[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+[0-9]+[0-9]\+[0-9]{2}:[0-9]{2}/g , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      '1970-01-01T00:00:00.0+00:00' 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  fsp . writeFile ( downloadLocation ,  newFileContents ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // By default all files are downloaded to the same place in playwright
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // (declared in src/lib/exportSave)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // To remain consistent with our old web tests, we want to move some downloads
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // (images) to another directory.
 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  moveDownloadedFileTo ( rootDir ,  downloadLocation ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-05-29 18:04:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    modelPath : downloadLocation , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    imagePath : downloadLocationer ( '' ,  true ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    outputType : output.type , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-06-04 14:36:34 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  async  function  tearDown ( page : Page ,  testInfo : TestInfo )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( testInfo . status  ===  'skipped' )  return 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( testInfo . status  ===  'failed' )  return 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  u  =  await  getUtils ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // Kill the network so shutdown happens properly
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  u . emulateNetworkConditions ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    offline : true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // values of 0 remove any active throttling. crbug.com/456324#c9
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    latency : 0 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    downloadThroughput :  - 1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    uploadThroughput :  - 1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								// settingsOverrides may need to be augmented to take more generic items,
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// but we'll be strict for now
  
						 
					
						
							
								
									
										
										
										
											2024-09-16 07:32:33 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  async  function  setup (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  context : BrowserContext , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  page : Page , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  testInfo? : TestInfo 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)  {  
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  context . addInitScript ( 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    async  ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      token , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      settingsKey , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      settings , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      IS_PLAYWRIGHT_KEY , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      PLAYWRIGHT_TEST_DIR , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      PERSIST_MODELING_CONTEXT , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-20 22:11:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      localStorage . clear ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      localStorage . setItem ( 'TOKEN_PERSIST_KEY' ,  token ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      localStorage . setItem ( 'persistCode' ,  ` ` ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      localStorage . setItem ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        PERSIST_MODELING_CONTEXT , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        JSON . stringify ( {  openPanes :  [ 'code' ]  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      localStorage . setItem ( settingsKey ,  settings ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      localStorage . setItem ( IS_PLAYWRIGHT_KEY ,  'true' ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      localStorage . setItem ( 'PLAYWRIGHT_TEST_DIR' ,  PLAYWRIGHT_TEST_DIR ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      token : secrets.token , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      settingsKey : TEST_SETTINGS_KEY , 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-05 18:03:49 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      settings : settingsToToml ( { 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        settings :  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . . . TEST_SETTINGS , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          app :  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-05 18:03:49 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            . . . TEST_SETTINGS . project , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            project_directory : TEST_SETTINGS.app?.project_directory , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            onboarding_status :  'dismissed' , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            theme :  'dark' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } , 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-05 18:03:49 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      } ) , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      IS_PLAYWRIGHT_KEY , 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-05 18:03:49 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      PLAYWRIGHT_TEST_DIR : TEST_SETTINGS.app?.project_directory  ||  '' , 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      PERSIST_MODELING_CONTEXT , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-14 14:26:44 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  context . addCookies ( [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      name : COOKIE_NAME , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      value : secrets.token , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      path :  '/' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      domain :  'localhost' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      secure : true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ] ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-16 07:32:33 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  failOnConsoleErrors ( page ,  testInfo ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  // kill animations, speeds up tests and reduced flakiness
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  page . emulateMedia ( {  reducedMotion :  'reduce'  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-20 22:11:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 13:38:53 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  // Trigger a navigation, since loading file:// doesn't.
 
							 
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  // await page.reload()
 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-07 19:27:32 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-08-16 07:15:42 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-09-16 07:32:33 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								function  failOnConsoleErrors ( page : Page ,  testInfo? : TestInfo )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  // enabled for chrome for now
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( page . context ( ) . browser ( ) ? . browserType ( ) . name ( )  ===  'chromium' )  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-13 10:54:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // No idea wtf exception is
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    page . on ( 'pageerror' ,  ( exception : any )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-16 07:32:33 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								      if  ( isErrorWhitelisted ( exception ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // only set this env var to false if you want to collect console errors
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // This can be configured in the GH workflow.  This should be set to true by default (we want tests to fail when
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // unwhitelisted console errors are detected).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      if  ( process . env . FAIL_ON_CONSOLE_ERRORS  ===  'true' )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Fail when running on CI and FAIL_ON_CONSOLE_ERRORS is set
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // use expect to prevent page from closing and not cleaning up
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        expect ( ` An error was detected in the console:  \ r \ n message: ${ exception . message }   \ r \ n name: ${ exception . name }   \ r \ n stack: ${ exception . stack } 
 
							 
						 
					
						
							
								
									
										
										
										
											2025-03-20 23:52:30 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          * Either  fix  the  console  error  or  add  it  to  the  whitelist  defined  in  . / lib / console - error - whitelist . ts  ( if  the  error  can  be  safely  ignored ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-09-16 07:32:33 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          ` ).toEqual('Console error detected')
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // the (test-results/exceptions.txt) file will be uploaded as part of an upload artifact in GH
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        fsp 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . appendFile ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            './test-results/exceptions.txt' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              '~~~' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              ` triggered_by_test: ${ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                testInfo ? . file  +  ' '  +  ( testInfo ? . title  ||  ' ' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              } ` ,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              ` name: ${ exception . name } ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              ` message: ${ exception . message } ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              ` stack: ${ exception . stack } ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              ` project: ${ testInfo ? . project . name } ` , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								              '~~~' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ] . join ( '\n' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          . catch ( ( err )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            console . error ( err ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-08-20 05:34:26 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  async  function  isOutOfViewInScrollContainer (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  element : Locator , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  container : Locator 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								) :  Promise < boolean >  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  elementBox  =  await  element . boundingBox ( {  timeout : 5_000  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  const  containerBox  =  await  container . boundingBox ( {  timeout : 5_000  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  let  isOutOfView  =  false 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  if  ( elementBox  &&  containerBox ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    return  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      elementBox . y  +  elementBox . height  >  containerBox . y  +  containerBox . height  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      elementBox . y  <  containerBox . y  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      elementBox . x  +  elementBox . width  >  containerBox . x  +  containerBox . width  || 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      elementBox . x  <  containerBox . x 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  isOutOfView 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-08-22 15:00:13 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-28 16:18:06 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export  async  function  createProject ( {  
						 
					
						
							
								
									
										
										
										
											2024-08-22 15:00:13 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  name , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  page , 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-28 16:18:06 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  returnHome  =  false , 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 15:00:13 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								} :  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  name : string 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  page : Page 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-28 16:18:06 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  returnHome? : boolean 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 15:00:13 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								} )  {  
						 
					
						
							
								
									
										
										
										
											2024-10-28 16:18:06 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  await  test . step ( ` Create project and navigate to it ` ,  async  ( )  = >  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-01-17 14:46:52 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  page . getByRole ( 'button' ,  {  name :  'Create project'  } ) . click ( ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-28 16:18:06 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    await  page . getByRole ( 'textbox' ,  {  name :  'Name'  } ) . fill ( name ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    await  page . getByRole ( 'button' ,  {  name :  'Continue'  } ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( returnHome )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  page . waitForURL ( '**/file/**' ,  {  waitUntil :  'domcontentloaded'  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  page . getByTestId ( 'app-logo' ) . click ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-22 15:00:13 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-08-23 10:50:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  function  executorInputPath ( fileName : string ) :  string  {  
						 
					
						
							
								
									
										
										
										
											2025-03-01 13:59:01 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  return  path . join ( 'rust' ,  'kcl-lib' ,  'e2e' ,  'executor' ,  'inputs' ,  fileName ) 
							 
						 
					
						
							
								
									
										
										
										
											2024-08-23 10:50:40 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-09-26 18:25:05 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  async  function  doAndWaitForImageDiff (  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  page : Page , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  fn :  ( )  = >  Promise < unknown > , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  diffCount  =  200 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								)  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  new  Promise < boolean > ( ( resolve )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ; ( async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  page . screenshot ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        path :  './e2e/playwright/temp1.png' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        fullPage : true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      await  fn ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  isImageDiff  =  async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        await  page . screenshot ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          path :  './e2e/playwright/temp2.png' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          fullPage : true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  screenshot1  =  PNG . sync . read ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          await  fsp . readFile ( './e2e/playwright/temp1.png' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  screenshot2  =  PNG . sync . read ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          await  fsp . readFile ( './e2e/playwright/temp2.png' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        const  actualDiffCount  =  pixelMatch ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          screenshot1 . data , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          screenshot2 . data , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          null , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          screenshot1 . width , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          screenshot2 . height 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  actualDiffCount  >  diffCount 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      // run isImageDiff every 50ms until it returns true or 5 seconds have passed (100 times)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      let  count  =  0 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  interval  =  setInterval ( ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ; ( async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          count ++ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          if  ( await  isImageDiff ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            clearInterval ( interval ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            resolve ( true ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          }  else  if  ( count  >  100 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            clearInterval ( interval ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            resolve ( false ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } ) ( ) . catch ( reportRejection ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      } ,  50 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) ( ) . catch ( reportRejection ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  async  function  openAndClearDebugPanel ( page : Page )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  await  openDebugPanel ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  clearCommandLogs ( page ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-10-01 07:56:04 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  function  sansWhitespace ( str : string )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  str . replace ( /\s+/g ,  '' ) . trim ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2024-10-02 13:15:40 +10:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  function  getPixelRGBs ( page : Page )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  async  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    coords :  {  x : number ;  y : number  } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    radius : number 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  ) :  Promise < [ number ,  number ,  number ] [ ] >  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  buffer  =  await  page . screenshot ( { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      fullPage : true , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  screenshot  =  await  PNG . sync . read ( buffer ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  pixMultiplier : number  =  await  page . evaluate ( 'window.devicePixelRatio' ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    const  allCords :  [ number ,  number ] [ ]  =  [ [ coords . x ,  coords . y ] ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    for  ( let  i  =  1 ;  i  <  radius ;  i ++ )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      allCords . push ( [ coords . x  +  i ,  coords . y ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      allCords . push ( [ coords . x  -  i ,  coords . y ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      allCords . push ( [ coords . x ,  coords . y  +  i ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      allCords . push ( [ coords . x ,  coords . y  -  i ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    return  allCords . map ( ( [ x ,  y ] )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  index  = 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ( screenshot . width  *  y  *  pixMultiplier  +  x  *  pixMultiplier )  *  4  // rbga is 4 channels
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  [ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        screenshot . data [ index ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        screenshot . data [ index  +  1 ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        screenshot . data [ index  +  2 ] , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
											 
										
											
												Move all tests over to electron (#4484)
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* One last try with window-16-cores
* Trigger CI
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Skip more win tests, add back all three oses
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-16-cores)
* Add two more fixmes
* 2 more fixmes
* skip segment overlays on win32
* Another fixme
* Trigger CI
* Trigger CI
* Quick clean up
* Move all tests over to electron
* Pass the correct param to playwright-electron.sh
* Add shebang to script and add macos-14-large as a target
* Get sketch-tests.spec.ts passing in electron
* Try out 4 workers
* Got testing-segment-overlays passing
* Pass testing-selections.spec.ts
* Go back to fix up sketch-tests test
* Pass various.spec.ts, by far the hardest one
* Pass can-sketch-on-all-planes... with ease
* Pass command bar tests
* fmt
* Completely fix code mirror text navigating for tests
* Pass debug pane tests
* Pass desktop export tests
* Pass editor tests
* Pass file tree tests
* Pass onboarding tests
* Corrected a fixme in file-tree.spec!
* Painfully fix hardcoded coordinates in point-click.spec
* Pass machine.spec tests
* Pass projects, fought hard with filechooser
* Pass regresion-tests.spec tests
* Pass network and connection tests
* Pass camera-movement.spec tests
* Extreme time eaten by gizmo test fixes. All passing now.
* Merge main (tests changed x_x) and pass all constraints.spec tests (pain)
* Pass another painful spec suite: testing-settings
* Pass perspective-toggle, interesting note
* Pass samples loading tests
* Pass app header tests
* Pass text-to-cad tests
* Pass segment-overlays (minor ache) and ability to switch to web if needed :)
* Fix a ton of syntax changes and deflake 2 more tests (pain)
* Correct all tsc errors
* Remove to-electron script
* Add an f-ton of shit because playwright doesnt want S P R E A D
* Try CI again
* Stop snapshots of exports (already test in e2e)
* Fix flake in double click editor
* Hopefully help CI flake
* Fixmes, fixmes everywhere
* One more fixme to settings
* Skip another code pane flake
* Port jess's projects.spec tests
* fixup
* Reuse electron window; difficult task
* Rebased and refixed
* Remove duplicate cases
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* Reduce the workers to something CI can handle
* Lower it further, we need to think about the others
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Update package.json
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
* Fix the last tests and tsc errors
* Timeout to 120 and windows-2022-16core
* Fix windows runner detection, enable concurrency temporarily
* Hopefully this time fix windows runner detection
* Comment out Vector, add back removed camera test code
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Fix camera tests again
* Massively deflake a whole class of tests
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: macos-14-large)
* Try new CI and fix small onboarding test
* Derp
* No github tuning
* Try mac
* Add back all the OS
* Lord, hallow be thy name
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)
* Try AWS Windows runner
* Passing on windows locally with a few skips
* Trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores)
* fmt, tsc, lint
* Enable two fixmes again
* Fix lint, codespell, fmt
* Fix lint
* Don't run e2e on draft, add back concurrency, clean up
* One last windows skip
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
Co-authored-by: Pierre Jacquier <pierre@zoo.dev>
											 
										 
										
											2024-12-18 17:58:03 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  async  function  pollEditorLinesSelectedLength ( page : Page ,  lines : number )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  expect 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    . poll ( async  ( )  = >  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      const  lines  =  await  page . locator ( '.cm-activeLine' ) . all ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      return  lines . length 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    . toBe ( lines ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2025-03-05 18:03:49 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  function  settingsToToml ( settings : DeepPartial < Configuration > )  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  TOML . stringify ( settings  as  any ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								export  function  tomlToSettings ( toml : string ) :  DeepPartial < Configuration >  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  return  TOML . parse ( toml ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}