diff --git a/.github/workflows/testdriver.yml b/.github/workflows/testdriver.yml new file mode 100644 index 0000000..9863bfd --- /dev/null +++ b/.github/workflows/testdriver.yml @@ -0,0 +1,32 @@ +name: TestDriver.ai + +on: + push: + branches: ["main"] + pull_request: + workflow_dispatch: + +jobs: + test: + name: "TestDriver" + runs-on: ubuntu-latest + steps: + - uses: testdriverai/action@main + with: + key: ${{secrets.TESTDRIVER_API_KEY}} + prompt: | + 1. /run testdriver/test.yml + prerun: | + cd $env:TEMP + npm init -y + npm install dashcam-chrome + git clone https://github.com/testdriverai/mainframe.git + cd mainframe + npm install + npm start + Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized", "--load-extension=$(pwd)/node_modules/dashcam-chrome/build", "${{ env.LOCALHOST }}" + exit + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + FORCE_COLOR: "3" + LOCALHOST: "http://localhost:8744" diff --git a/.gitignore b/.gitignore index 2a9d629..34efe47 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ node_modules/ /mainframe.service .turbo + +.DS_Store diff --git a/testdriver/test.yml b/testdriver/test.yml new file mode 100644 index 0000000..15663e5 --- /dev/null +++ b/testdriver/test.yml @@ -0,0 +1,46 @@ +version: 4.1.9 +steps: + - prompt: focus chrome + commands: + - command: focus-application + name: Google Chrome + - prompt: >- + click on the input field for the username and enter testdriverai and for + password enter aitesting and click on sign up + commands: + - command: focus-application + name: Google Chrome + - prompt: >- + click on the input field for the username and enter testdriverai and for + password enter aitesting and click on sign up + commands: + - command: hover-text + text: Username + description: username input field + action: click + - command: type + text: testdriverai + - command: hover-text + text: Password + description: password input field + action: click + - command: type + text: aitesting + - command: hover-text + text: Sign up + description: sign up button + action: click + - prompt: >- + click on the input field for the username and enter testdriverai and for + password enter aitesting and click on sign up + commands: + - command: hover-text + text: Username + description: username input field + action: click + - command: type + text: testdriverai + - command: hover-text + text: Password + description: password input field + action: click