Skip to content

Commit

Permalink
here goes nothin
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjennings committed Sep 10, 2024
1 parent cd2f897 commit 0a027e4
Show file tree
Hide file tree
Showing 21 changed files with 143 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/testdriver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: TestDriver.ai

on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:

jobs:
gather-markdown-files:
name: Gather Markdown Files
runs-on: ubuntu-latest
outputs:
markdown_files: ${{ steps.markdown_list.outputs.files }}
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Find all markdown files
id: markdown_list
run: |
FILES=$(ls ./testdriver/.generate/*.md)
FILES_JSON=$(echo "$FILES" | jq -R -s -c 'split("\n")[:-1]')
echo "::set-output name=files::$FILES_JSON"
test:
needs: gather-markdown-files
name: "TestDriver - ${{ matrix.file_name }}"
runs-on: ubuntu-latest
strategy:
matrix:
markdown: ${{ fromJson(needs.gather-markdown-files.outputs.markdown_files) }}
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Extract file name
id: extract_filename
run: |
FILE_NAME=$(basename ${{ matrix.markdown }} .md)
echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV
- name: "Read markdown content"
run: |
MARKDOWN_FILE=${{ matrix.markdown }}
echo "MARKDOWN_CONTENT=$(cat $MARKDOWN_FILE)" >> $GITHUB_ENV
- uses: testdriverai/action@main
with:
key: ${{ secrets.TESTDRIVER_API_KEY }}
prompt: ${{ env.MARKDOWN_CONTENT }}
prerun: |
cd $env:TEMP
npm init -y
npm install dashcam-chrome
Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized", "--load-extension=$(pwd)/node_modules/dashcam-chrome/build", "${{ env.WEBSITE_URL }}"
exit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FORCE_COLOR: "3"
WEBSITE_URL: "https://example.com"
5 changes: 5 additions & 0 deletions testdriver/.generate/test-accessibility-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1. Focus the browser window.
2. Navigate through the website using only the keyboard.
3. Assert that all interactive elements are accessible.
4. Use screen reader software to navigate the website.
5. Assert that all content is read correctly by the screen reader.
4 changes: 4 additions & 0 deletions testdriver/.generate/test-add-to-cart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. Click on "Add to Cart" for a product.
2. Assert that the item is added to the cart successfully.
3. Proceed to checkout.
4. Assert that no errors are shown.
4 changes: 4 additions & 0 deletions testdriver/.generate/test-api-documentation-access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. Focus the browser window.
2. Navigate to the Developers section.
3. Click on API Documentation.
4. Assert that the API documentation page loads and is accessible.
6 changes: 6 additions & 0 deletions testdriver/.generate/test-contact-sales.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1. Focus the browser window.
2. Click on "Contact Sales".
3. Assert that the contact form is displayed.
4. Fill in the contact form fields with test data.
5. Submit the form.
6. Assert that a confirmation message is displayed or an appropriate response is received.
3 changes: 3 additions & 0 deletions testdriver/.generate/test-downloadable-resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. Focus the browser window.
2. Navigate to the Resources section.
3. Click on a downloadable resource
4 changes: 4 additions & 0 deletions testdriver/.generate/test-error-pages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. Focus the browser window.
2. Navigate to a non-existent page.
3. Assert that a 404 error page is displayed.
4. Navigate to other error-prone scenarios
4 changes: 4 additions & 0 deletions testdriver/.generate/test-footer-links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. Focus the browser window.
2. Scroll down to the footer.
3. Click on each link in the footer.
4. Assert that each link navigates to the correct page.
2 changes: 2 additions & 0 deletions testdriver/.generate/test-form-auto-complete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Focus the browser window.
2. Navigate to a form
2 changes: 2 additions & 0 deletions testdriver/.generate/test-form-validations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Focus the browser window.
2. Navigate to a form
4 changes: 4 additions & 0 deletions testdriver/.generate/test-home-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. Focus the browser window.
2. Assert that the home page loads correctly.
3. Assert that the header and footer are displayed.
4. Assert that the main content of the home page is displayed.
4 changes: 4 additions & 0 deletions testdriver/.generate/test-link-to-blog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1. Focus the browser window.
2. Navigate to the Resources section.
3. Click on the link to the Blog.
4. Assert that the Blog page loads successfully.
6 changes: 6 additions & 0 deletions testdriver/.generate/test-login-functionality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1. Focus the browser window.
2. Click on "Login".
3. Enter valid credentials.
4. Assert that the user is logged in successfully.
5. Log out.
6. Assert that the user is logged out successfully.
2 changes: 2 additions & 0 deletions testdriver/.generate/test-navigation-links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Focus the browser window.
2. Click on each navigation link
3 changes: 3 additions & 0 deletions testdriver/.generate/test-responsiveness.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. Resize the browser window to various sizes.
2. Assert that the website is responsive and adjusts layout appropriately.
3. Check for any overlapping or hidden elements.
3 changes: 3 additions & 0 deletions testdriver/.generate/test-search-functionality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. Focus the browser window.
2. Click on the search icon.
3. Type a search query
5 changes: 5 additions & 0 deletions testdriver/.generate/test-search-results-pagination.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1. Focus the browser window.
2. Perform a search with a query that has multiple results.
3. Assert that pagination controls are displayed.
4. Navigate through the pages.
5. Assert that the results are updated correctly on each page.
5 changes: 5 additions & 0 deletions testdriver/.generate/test-sign-up-form.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1. Focus the browser window.
2. Navigate to the sign-up page.
3. Fill in the sign-up form fields with test data.
4. Click the "Sign Up" button.
5. Assert that a confirmation message is displayed or that the user is redirected to a welcome page.
3 changes: 3 additions & 0 deletions testdriver/.generate/test-social-media-links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. Focus the browser window.
2. Scroll to the footer.
3. Click on the social media links
6 changes: 6 additions & 0 deletions testdriver/.generate/test-try-for-free.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1. Focus the browser window.
2. Click on "Try for Free".
3. Assert that the sign-up page or trial page is displayed.
4. Fill in the necessary details for trial.
5. Submit the form.
6. Assert that a confirmation message is displayed or trial account is set up successfully.
6 changes: 6 additions & 0 deletions testdriver/.generate/test-video-playback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1. Focus the browser window.
2. Navigate to a page with a video.
3. Play the video.
4. Assert that the video is playing.
5. Pause the video.
6. Assert that the video is paused.

0 comments on commit 0a027e4

Please sign in to comment.