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

Adding playwright test to the project #13

Closed
wants to merge 145 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
f613b13
First check-in on playwright script. The 'helloworld.spec.ts' script…
eugene-dynamsoft Jul 16, 2024
f1ee506
Clean up the helloworld ui test and strucutred using POM pattern. Add…
eugene-dynamsoft Jul 19, 2024
fe71d36
Fixed Typo
eugene-dynamsoft Jul 19, 2024
ff20ba9
refactor playwright test to use fixtures and clean up the POM pattern.
eugene-dynamsoft Jul 25, 2024
65ecc24
Refactored the project again to separate the test for minimum-element…
eugene-dynamsoft Jul 25, 2024
d393029
First check-in on playwright script. The 'helloworld.spec.ts' script…
eugene-dynamsoft Jul 16, 2024
778fa2e
Clean up the helloworld ui test and strucutred using POM pattern. Add…
eugene-dynamsoft Jul 19, 2024
27f58bb
Fixed Typo
eugene-dynamsoft Jul 19, 2024
d414e96
refactor playwright test to use fixtures and clean up the POM pattern.
eugene-dynamsoft Jul 25, 2024
aea63c1
Refactored the project again to separate the test for minimum-element…
eugene-dynamsoft Jul 25, 2024
bd7646c
Added Test to locate the ddl selector for resolution
eugene-dynamsoft Aug 1, 2024
e1a808a
Merge branch 'Playwright-test' of https://github.com/Dynamsoft/captur…
eugene-dynamsoft Aug 6, 2024
7a985b7
Merge branch 'main' of https://github.com/Dynamsoft/capture-vision-ja…
yeugeneu Aug 17, 2024
9834115
Added Unittest for index.html page.
eugene-dynamsoft Aug 19, 2024
5839c47
Adding Code Coverage dependencies and initial commit to the unittest …
eugene-dynamsoft Aug 20, 2024
cf79b6d
Refactored VIN Scanner e2e test to update the locator paths and optim…
eugene-dynamsoft Aug 20, 2024
50f0a54
Added GitHub action to run test on container.
eugene-dynamsoft Aug 20, 2024
0232446
Add GitHub workflow to run test on container
eugene-dynamsoft Aug 20, 2024
9c367c0
Clean up unnecessary .gitignore and move the playwright yml workflow …
eugene-dynamsoft Aug 20, 2024
6f79a3a
Fix the install dependency step for playwright test action
eugene-dynamsoft Aug 20, 2024
71e6823
Navigate into VINScanner page to execute playwright tests.
eugene-dynamsoft Aug 20, 2024
3df680a
try to execute all action scripts within the VINScanner folder
eugene-dynamsoft Aug 20, 2024
a5c0698
Set default working directory to VINScanner. Clean up playwright.conf…
eugene-dynamsoft Aug 20, 2024
a30592d
Added minimum-elements unittest
eugene-dynamsoft Aug 20, 2024
c164050
Experimenting with GitHub container test execution
eugene-dynamsoft Aug 21, 2024
58ab966
feat(VINScanner): allow vertical scan on barcode only
felixindrawan Aug 21, 2024
187ea45
fix: ui on mobile and bug on camera rotate
felixindrawan Aug 22, 2024
21a6ea5
fix: remove fields from result that's not detected
felixindrawan Aug 22, 2024
aaefce0
fix: scan mode showing up on result
felixindrawan Aug 23, 2024
c9dad29
feat: removed restart video on header
felixindrawan Aug 23, 2024
9b2b5ce
fix: sizing
felixindrawan Aug 23, 2024
c16f3de
fix: json
felixindrawan Aug 26, 2024
3a97264
Try setting up docker image container to run in GitHub Action
eugene-dynamsoft Aug 27, 2024
e2d2136
Merge branch 'Playwright-test' of https://github.com/Dynamsoft/captur…
eugene-dynamsoft Aug 27, 2024
96625dd
draft: playwright test
felixindrawan Aug 27, 2024
d7ffc18
Starting local server and run against it on github action
eugene-dynamsoft Aug 27, 2024
c5ef3bf
added wait-on package dependency. Updated the wait-on path.
eugene-dynamsoft Aug 27, 2024
1518dfd
Updated the wait-on command to add a timeout and avoid using localhost
eugene-dynamsoft Aug 27, 2024
0dad7f7
Experiment using start-server-and-test npm package to kick off build …
eugene-dynamsoft Aug 27, 2024
a51aeff
fix: playwright.yml to add https
felixindrawan Aug 27, 2024
5a05ac9
fix: install deps
felixindrawan Aug 27, 2024
5ad1642
remove openssl download
felixindrawan Aug 27, 2024
c0b76f1
Try running with a test file that will for sure pass.
eugene-dynamsoft Aug 27, 2024
0dc9de2
fix: start with vite
felixindrawan Aug 27, 2024
2493c5c
fix: test url
felixindrawan Aug 27, 2024
91965b8
fix: playwright config
felixindrawan Aug 27, 2024
8c69eac
fix: get title
felixindrawan Aug 27, 2024
07d826d
fix: added camera options
felixindrawan Aug 27, 2024
6624267
feat: add documentation on readme
felixindrawan Aug 27, 2024
876ae97
Merge branch 'playwright-felix' into playwright-test
eugene-dynamsoft Aug 27, 2024
aea69ef
fix: removed gitignore for lock
felixindrawan Aug 27, 2024
c4303c8
fix: rmeoved unused config file
felixindrawan Aug 27, 2024
b17ddc1
fix: setup config.ts
felixindrawan Aug 27, 2024
05aa577
fix and add more test for minimum-elements
felixindrawan Aug 27, 2024
62f4d26
fix: added testDir
felixindrawan Aug 28, 2024
6c8e705
Try to fix the playwright yml to execute 'npm run test' which should …
eugene-dynamsoft Aug 28, 2024
f87e88d
fix: added back yml command
felixindrawan Aug 28, 2024
32c163f
Merge branch 'playwright-felix' into playwright-test
eugene-dynamsoft Aug 28, 2024
4496156
Updated the testDir to point to VINSCanner/tests folder. Change all p…
eugene-dynamsoft Aug 28, 2024
0546da5
enabled headless mode to allow execution with github action
eugene-dynamsoft Aug 28, 2024
30d8781
fix: position of scan region on min
felixindrawan Aug 28, 2024
32724a3
feat: moved cameraEnhancer cvRouter cameraView for debugging
felixindrawan Aug 28, 2024
b1e006c
adding longer delay to ensure video stream starts before validating t…
eugene-dynamsoft Aug 28, 2024
27406f7
Merge branch 'vinscanner/vertical-scan' into playwright-test
eugene-dynamsoft Aug 28, 2024
51e2b13
Minor fixes on VINScanner test.
eugene-dynamsoft Aug 28, 2024
be8ddb7
comment out the webkit test for now as desktop safari does not run pr…
eugene-dynamsoft Aug 28, 2024
249d7cd
Clean up test and ensure chrome/firefox are running with headless mod…
eugene-dynamsoft Aug 31, 2024
4794683
Adding some try-catch block and update the execution of min-element t…
eugene-dynamsoft Sep 4, 2024
e8f3ffe
turned on ignoreHTTPSErrors for all projects
eugene-dynamsoft Sep 4, 2024
73c8538
Due to the playwright bug for waitFor not really work, changing the w…
eugene-dynamsoft Sep 4, 2024
4b3eccd
feat(VINScanner): allow vertical scan on barcode mode (#11)
felixindynamsoft Sep 5, 2024
67e7def
feat(VINScanner): add resolution options (#10)
felixindynamsoft Sep 5, 2024
2296e7b
revert the change to wait for scanModeContainer in the test and try t…
eugene-dynamsoft Sep 5, 2024
58091c5
First check-in on playwright script. The 'helloworld.spec.ts' script…
eugene-dynamsoft Jul 16, 2024
59837f6
Clean up the helloworld ui test and strucutred using POM pattern. Add…
eugene-dynamsoft Jul 19, 2024
b5e7144
Fixed Typo
eugene-dynamsoft Jul 19, 2024
725e7db
refactor playwright test to use fixtures and clean up the POM pattern.
eugene-dynamsoft Jul 25, 2024
ac8a3f9
Refactored the project again to separate the test for minimum-element…
eugene-dynamsoft Jul 25, 2024
91c9410
Added Test to locate the ddl selector for resolution
eugene-dynamsoft Aug 1, 2024
a63a6f8
First check-in on playwright script. The 'helloworld.spec.ts' script…
eugene-dynamsoft Jul 16, 2024
0109d02
Clean up the helloworld ui test and strucutred using POM pattern. Add…
eugene-dynamsoft Jul 19, 2024
8e1d872
Fixed Typo
eugene-dynamsoft Jul 19, 2024
2efdd2b
refactor playwright test to use fixtures and clean up the POM pattern.
eugene-dynamsoft Jul 25, 2024
bc39a6a
Refactored the project again to separate the test for minimum-element…
eugene-dynamsoft Jul 25, 2024
d3a97e9
Added Unittest for index.html page.
eugene-dynamsoft Aug 19, 2024
11676f2
Adding Code Coverage dependencies and initial commit to the unittest …
eugene-dynamsoft Aug 20, 2024
3f1821c
Refactored VIN Scanner e2e test to update the locator paths and optim…
eugene-dynamsoft Aug 20, 2024
0447aec
Added GitHub action to run test on container.
eugene-dynamsoft Aug 20, 2024
6b11803
Add GitHub workflow to run test on container
eugene-dynamsoft Aug 20, 2024
79081da
Clean up unnecessary .gitignore and move the playwright yml workflow …
eugene-dynamsoft Aug 20, 2024
82345b0
Fix the install dependency step for playwright test action
eugene-dynamsoft Aug 20, 2024
fd9fc79
Navigate into VINScanner page to execute playwright tests.
eugene-dynamsoft Aug 20, 2024
8a0e5de
try to execute all action scripts within the VINScanner folder
eugene-dynamsoft Aug 20, 2024
0cc1216
Set default working directory to VINScanner. Clean up playwright.conf…
eugene-dynamsoft Aug 20, 2024
a89ae20
Added minimum-elements unittest
eugene-dynamsoft Aug 20, 2024
c8f2b9d
Experimenting with GitHub container test execution
eugene-dynamsoft Aug 21, 2024
8554359
Try setting up docker image container to run in GitHub Action
eugene-dynamsoft Aug 27, 2024
3c656b7
fix: json
felixindrawan Aug 26, 2024
a1133d0
Starting local server and run against it on github action
eugene-dynamsoft Aug 27, 2024
7ad6e49
added wait-on package dependency. Updated the wait-on path.
eugene-dynamsoft Aug 27, 2024
42c889b
Updated the wait-on command to add a timeout and avoid using localhost
eugene-dynamsoft Aug 27, 2024
e855df9
Experiment using start-server-and-test npm package to kick off build …
eugene-dynamsoft Aug 27, 2024
30d7aa2
Try running with a test file that will for sure pass.
eugene-dynamsoft Aug 27, 2024
68fdb97
draft: playwright test
felixindrawan Aug 27, 2024
e8f9f04
fix: playwright.yml to add https
felixindrawan Aug 27, 2024
c2b0a37
fix: install deps
felixindrawan Aug 27, 2024
951d1a8
remove openssl download
felixindrawan Aug 27, 2024
3437933
fix: start with vite
felixindrawan Aug 27, 2024
2e3860d
fix: test url
felixindrawan Aug 27, 2024
1e75eb2
fix: playwright config
felixindrawan Aug 27, 2024
6e13999
fix: get title
felixindrawan Aug 27, 2024
5ced69e
fix: added camera options
felixindrawan Aug 27, 2024
1c672bc
feat: add documentation on readme
felixindrawan Aug 27, 2024
9bca440
fix: removed gitignore for lock
felixindrawan Aug 27, 2024
309b1f3
fix: rmeoved unused config file
felixindrawan Aug 27, 2024
3ad5c79
fix: setup config.ts
felixindrawan Aug 27, 2024
d2992a6
fix and add more test for minimum-elements
felixindrawan Aug 27, 2024
28aacf2
fix: added testDir
felixindrawan Aug 28, 2024
87a4fab
Try to fix the playwright yml to execute 'npm run test' which should …
eugene-dynamsoft Aug 28, 2024
f445ac2
fix: added back yml command
felixindrawan Aug 28, 2024
4fc5fea
Updated the testDir to point to VINSCanner/tests folder. Change all p…
eugene-dynamsoft Aug 28, 2024
34ebad9
enabled headless mode to allow execution with github action
eugene-dynamsoft Aug 28, 2024
4a89505
adding longer delay to ensure video stream starts before validating t…
eugene-dynamsoft Aug 28, 2024
e1c3079
feat(VINScanner): allow vertical scan on barcode only
felixindrawan Aug 21, 2024
484ef72
fix: ui on mobile and bug on camera rotate
felixindrawan Aug 22, 2024
24277d9
fix: scan mode showing up on result
felixindrawan Aug 23, 2024
0fdd950
feat: removed restart video on header
felixindrawan Aug 23, 2024
0371e26
fix: sizing
felixindrawan Aug 23, 2024
1714e1c
Minor fixes on VINScanner test.
eugene-dynamsoft Aug 28, 2024
1939ddb
comment out the webkit test for now as desktop safari does not run pr…
eugene-dynamsoft Aug 28, 2024
79c19a1
Clean up test and ensure chrome/firefox are running with headless mod…
eugene-dynamsoft Aug 31, 2024
cbc51bc
Adding some try-catch block and update the execution of min-element t…
eugene-dynamsoft Sep 4, 2024
13bfd17
turned on ignoreHTTPSErrors for all projects
eugene-dynamsoft Sep 4, 2024
fb06645
Due to the playwright bug for waitFor not really work, changing the w…
eugene-dynamsoft Sep 4, 2024
9b685dc
revert the change to wait for scanModeContainer in the test and try t…
eugene-dynamsoft Sep 5, 2024
e47ff08
Merge branch 'playwright-test' of https://github.com/Dynamsoft/captur…
eugene-dynamsoft Sep 5, 2024
ee53b1e
fixed merge conflicts
eugene-dynamsoft Sep 5, 2024
c08e588
feat(VINScanner): allow vertical scan on barcode mode (#11)
felixindynamsoft Sep 5, 2024
a53cba2
removed unused files
felixindrawan Sep 6, 2024
20cea9d
Merge branch 'playwright-test' of https://github.com/Dynamsoft/captur…
eugene-dynamsoft Sep 16, 2024
adc72dd
Adding userAgent header to try avoiding firefox to think the playwrig…
eugene-dynamsoft Sep 17, 2024
9badb9e
Adding differenet waitForLoadState to prevent firefox headless mode t…
eugene-dynamsoft Sep 17, 2024
b02c023
use fake camera/ui for chrome
eugene-dynamsoft Sep 17, 2024
e364ffd
Setting firefox to run in debug mode when executing in headless
eugene-dynamsoft Sep 17, 2024
bc33468
Clean up the script and removed unused function. This should fixed bo…
eugene-dynamsoft Sep 17, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
with:
name: playwright-report
path: playwright-report/
retention-days: 30
retention-days: 30
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ CaptureImageModal
.env.local
.env.*.local

# test related files
test-results/
playwright-report/
blob-report/
playwright/.cache/
coverage/
.nyc_output/


# Log files
npm-debug.log*
yarn-debug.log*
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@
| ------------ | ------------------------------------------------------------------------------------ |
| `VIN Scanner` | Scan the VIN code from a barcode or a text line and extract the vehicle information. |

## Testing

Install dependencies

```
cd VINScanner

npm install
```

Execute playwright code coverage test by simply run

```
npm test
```

## License

You can request a 30-day trial license via the [Request a Trial License](https://www.dynamsoft.com/customer/license/trialLicense/?product=cvs&utm_source=github&package=js) link.
Expand Down
5 changes: 5 additions & 0 deletions VINScanner/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": ["@babel/preset-env"],
"plugins": ["istanbul"]
}

12 changes: 12 additions & 0 deletions VINScanner/.nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"all": true,
"check-coverage": true,
"reporter": ["text", "html", "lcov"],
"include": ["**/*.js"],
"exclude": [
"tests",
"node_modules",
"coverage"
]
}
Loading