* WIP: Add tauri e2e test for auth on Linux Fixes #968 * WIP * WIP * Working of through /tmp file for user code sharing * rust int * User code only in /tmp, fixes * Longer timeout for github actions * Remove timeout * Fmt * Fmt, 30sec timeout * Test BUILD_RELEASE true * Revert "Test BUILD_RELEASE true" This reverts commitd3b59d4a6c. * Disable concurrency limit for faster iterations on this PR * Add logs for responses * Test manual tauri build before e2e * WIP * Catch error on tauri::api:🐚:open * Clean up * Clean up * timeout * Force BUILD_RELEASE: true * Back to debug, longer timeout * Print if url opens ok too * Check default browser in actions * Remote shell call on linux (aka e2e for now) * Fix fmt * Move to data-testid, clean up * Add log out section * Clean up * Fix typo * Fix text detection * Test AppImage * Revert "Test AppImage" This reverts commitcf126b1aa6. * Add comments * Change to env var * Clean up * Fmt fix * Better package json name * Add import @wdio/globals * Back to require * Update wdio, fix globals * Move to typescript * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
		
			
				
	
	
		
			40 lines
		
	
	
		
			969 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			969 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import os from 'os'
 | 
						|
import path from 'path'
 | 
						|
import { spawn, ChildProcess } from 'child_process'
 | 
						|
 | 
						|
let tauriDriver: ChildProcess
 | 
						|
 | 
						|
const application =
 | 
						|
  process.env.E2E_APPLICATION || `./src-tauri/target/release/kittycad-modeling`
 | 
						|
 | 
						|
export const config = {
 | 
						|
  port: 4444,
 | 
						|
  specs: ['./e2e/tauri/specs/**/*.ts'],
 | 
						|
  maxInstances: 1,
 | 
						|
  capabilities: [
 | 
						|
    {
 | 
						|
      maxInstances: 1,
 | 
						|
      'tauri:options': {
 | 
						|
        application,
 | 
						|
      },
 | 
						|
    },
 | 
						|
  ],
 | 
						|
  reporters: ['spec'],
 | 
						|
  framework: 'mocha',
 | 
						|
  mochaOpts: {
 | 
						|
    ui: 'bdd',
 | 
						|
    timeout: 600000,
 | 
						|
  },
 | 
						|
 | 
						|
  // ensure we are running `tauri-driver` before the session starts so that we can proxy the webdriver requests
 | 
						|
  beforeSession: () =>
 | 
						|
    (tauriDriver = spawn(
 | 
						|
      path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver'),
 | 
						|
      [],
 | 
						|
      { stdio: [null, process.stdout, process.stderr] }
 | 
						|
    )),
 | 
						|
 | 
						|
  // clean up the `tauri-driver` process we spawned at the start of the session
 | 
						|
  afterSession: () => tauriDriver.kill(),
 | 
						|
}
 |