From 67a5ff062439c1a2aeb134e3eea3616a915da2de Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Thu, 26 Sep 2024 12:27:33 -0500 Subject: [PATCH] new main --- .github/workflows/testdriver.yml | 72 ++++++++++++++++++++++++++++++++ testdriver/theme.yml | 39 +++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 .github/workflows/testdriver.yml create mode 100644 testdriver/theme.yml diff --git a/.github/workflows/testdriver.yml b/.github/workflows/testdriver.yml new file mode 100644 index 000000000..596f0203a --- /dev/null +++ b/.github/workflows/testdriver.yml @@ -0,0 +1,72 @@ +name: TestDriver.ai Regression Testing - Waveterm +on: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: 0 21 * * * + workflow_dispatch: null + +permissions: + contents: read # To allow the action to read repository contents + pull-requests: write # To allow the action to create/update pull request comments + +jobs: + test: + name: "TestDriver" + runs-on: ubuntu-latest + steps: + - uses: testdriverai/action@main + id: testdriver + with: + key: ${{secrets.DASHCAM_API}} + prerun: | + # Navigate to the directory + Set-Location "$HOME/actions-runner/_work/testdriver/testdriver/" + + # Install Go using Homebrew + brew install go + + # Tap scripthaus-dev/scripthaus and install necessary packages + brew tap scripthaus-dev/scripthaus + brew install corepack + brew install scripthaus + + # Enable Corepack + corepack enable + + # Install dependencies using Yarn + yarn install + + # Run the build-backend task with scripthaus + scripthaus run build-backend + Write-Host "Yarn" + + # Run yarn + yarn + + Write-Host "Rebuild" + # Rebuild Electron + scripthaus run electron-rebuild + + Write-Host "Webpack" + # Run the Webpack build task + scripthaus run webpack-build + + Write-Host "Starting Electron" + # Start Electron and redirect output to /dev/null + Start-Process -NoNewWindow -FilePath "scripthaus" -ArgumentList "run electron" -RedirectStandardOutput $null -RedirectStandardError $null + + Write-Host "Electron Done" + + # Install testdriverai and dashcam globally using npm + npm install testdriverai -g + npm install dashcam -g + + # Exit the script + exit + prompt: | + 1. /run testdriver/theme.yml diff --git a/testdriver/theme.yml b/testdriver/theme.yml new file mode 100644 index 000000000..d8f94e0c2 --- /dev/null +++ b/testdriver/theme.yml @@ -0,0 +1,39 @@ +version: 4.0.0 +steps: + - prompt: "onboarding" + commands: + - command: focus-application + name: Electron + - command: hover-text + description: Get started CTA + text: Get Started + action: click + - prompt: "change theme" + commands: + - command: hover-text + description: Settings button + text: Settings + action: click + - command: hover-text + description: font size 13 + text: 13px + action: click + - command: hover-text + description: font size 12 + text: 12px + action: click + - command: hover-text + description: theme selector + text: Dark + action: click + - command: hover-text + description: theme color white + text: Light + action: click + - command: hover-text + description: workspace + text: workspace-1 + action: click + - command: assert + expect: the terminal is white +