Add TestDriver sample tests for the easydocs docs site - #22
Open
testdriverai[bot] wants to merge 1 commit into
Open
Add TestDriver sample tests for the easydocs docs site#22testdriverai[bot] wants to merge 1 commit into
testdriverai[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #20.
Sets up TestDriver in this repo with three short, passing sample tests. All 3 pass against the live target.
Target: the published documentation site
easydocs is a self-hostable app — you install it with
docker compose up, so there is no public/hosted "production" instance of the app itself to drive, and no example credentials exist for one. The one publicly deployed production surface for this project is the documentation site published from this repo via GitHub Pages:https://robertzu43.github.io/easydocs/
So these samples target that live site. They're intentionally short and stable — good starting points to copy from. (When you have a hosted app instance, or want tests to run the full stack, these can be repointed at it and extended to cover register/login/upload/branch/merge.)
What the tests cover
tests/testdriver/docs-home.test.mjstests/testdriver/docs-navigation.test.mjstests/testdriver/docs-search.test.mjsTest recordings (all ✅)
Home page loads with heading + tagline

📊 Report
Navigate to "Getting started"

📊 Report
Docs search returns results

📊 Report
Full run: https://console-test.testdriver.ai/runs/6a6ef1c89d180790099e49a2 — 3/3 passed.
Setup notes
npx testdriverai initscaffoldedvitest.config.mjs,package.json, and.github/workflows/testdriver.yml.vitest.config.mjssetsinclude: ['tests/testdriver/**/*.test.mjs']so vitest runs only these TestDriver tests and stays out of the existingtests/EasyDocs.Api.Tests/.NET project.npx vitest run.Running in CI (recommended: OIDC, no stored secret)
The included workflow uses
testdriverai/action. The recommended way to authenticate is GitHub OIDC — authorize the TestDriver GitHub App for the org once (https://console.testdriver.ai) and the action mints/exchanges a token at run time, so there's noTD_API_KEYsecret to add or rotate. A storedTD_API_KEYrepo secret is only needed as a fallback on runners without OIDC.