Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add testing #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build:dev
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run tests
run: npx playwright test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ coverage
vellum-random-table.js*
custom-elements.json
docs
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
11 changes: 6 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<body>
<h2>One-column random table</h2>

<vellum-random-table select="#result" preroll hideroll>
<caption>
Random Encounters
</caption>
<vellum-random-table select="#results" hideroll>
<table>
<caption>
Random Encounters
</caption>
<thead>
<tr>
<th>Encounter</th>
Expand All @@ -34,7 +34,8 @@ <h2>One-column random table</h2>
</tbody>
</table>
<button>Roll</button>
<input id="result" type="text" />
<label for="results">Result:</label>
<input id="results" type="text" />
</vellum-random-table>

<h2>Two-column random table with dice</h2>
Expand Down
257 changes: 61 additions & 196 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading