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

setup local dev server, incorporate playwright e2e testing #19

Merged
merged 21 commits into from
Mar 25, 2024
Merged
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
384 changes: 194 additions & 190 deletions .eslintrc.js

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,26 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'

- name: Install Node.js dependencies
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name : Run test
run: npm run prepublishOnly
run: npm run prepublishOnly

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ build/
dist/

.git/
.vscode/
.vscode/

.DS_Store
test-results/
playwright-report/
blob-report/
playwright/.cache/
2 changes: 1 addition & 1 deletion example/example.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { init } from '../dist/es2015';

init('../node_modules/pdfjs-dist/build/pdf.worker.min.js');
init('http://localhost:8080/pdf.worker.min.js');
2 changes: 1 addition & 1 deletion example/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>
<div class="viewer-container" id="doc-1" data-document-url="https://raw.githubusercontent.com/mozilla/pdf.js/ba2edeae/web/compressed.tracemonkey-pldi-09.pdf"></div>
<div class="viewer-container" id="doc-2" data-document-url="https://www.w3.org/TR/PNG/iso_8859-1.txt"></div>
<div class="viewer-container" id="doc-2" data-document-url="https://example-files.online-convert.com/document/txt/example.txt"></div>
<div class="viewer-container" id="doc-3" data-document-url="http://ieee802.org:80/secmail/docIZSEwEqHFr.doc"></div>
<div class="viewer-container" id="doc-4"></div>
</body>
Expand Down
5 changes: 0 additions & 5 deletions jest.config.js

This file was deleted.

Loading