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

feat: Playwright test to VIN Scanner #24

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

eugene-dynamsoft
Copy link
Contributor

Adding Playwright test for minimum-element and VinScanner project

Copy link

github-actions bot commented Oct 9, 2024

PR Preview Action v1.4.3
🚀 Deployed preview to https://Dynamsoft.github.io/capture-vision-javascript-samples/pr-preview/pr-24/
on branch gh-pages at 2024-10-16 18:36 UTC

Tom-Dynamsoft and others added 3 commits October 16, 2024 09:52
…tory VINScanner

feat: VIN Scanner sample (#1)

* feat: VIN Scanner sample

* fix: remove css that's not used.

* fix: license key

* fix: removed console log

* fix: Remove Test

---------

Co-authored-by: felixindrawan <[email protected]>

fix: VINScanner - code/ui improvements

fix: remove css that's not used.

fix: license key

fix: removed console log

fix: Remove Test

fix: shortened code for imagedata, removed scanlaser on load, simplified code

Create main.yml to setup CI

feat: Add Code 128 and PDF417 to the template

feat: VINScanner - update DLR DIP and template

* feat: VINScanner - update DLR DIP and template

* fix: removed dip script

* add DIP as engineResourcePath and reverted DLR import

* add DIP as engineResourcePath and reverted DLR import

* fix: updated library

* fix: rgb colors

---------

Co-authored-by: felixindrawan <[email protected]>

feat: ui enhancement, update library

fix: working

feat: add boxshadow

fix: notification to have none display

fix: used different color for background

Bug: fix utm_source from github to samples

Bug: fix utm_source to only say samples

feat: remove camera list on click and optimized ui

feat(VINScanner): update model year parse

fix: Copy result and save image button moved to the top

fix: css

fix: moved VIN code to the top

fix(VINScanner): homepage mobile ui spacing

feat(VINScanner): allow vertical scan on barcode mode (#11)

feat(VINScanner): add resolution options (#10)

* feat(VINScanner): add resolution select

* fix: camera list width

* feat: notification on camera switch

* fix: judge resolution

* fix: button switches

---------

Co-authored-by: felixindrawan <[email protected]>

 First check-in on playwright script. The 'helloworld.spec.ts' script will run test on on the vanilla js helloworld demo to check the title and get the cameraEnhancer class object to test out the getResolution() methods.

    The 'ui-test.spec.ts' script will run a test on felix's DBR/DLR integration to verify the title and make sure use can select all 3 different scan mode (text+barcode, text only, barcode only).

Clean up the helloworld ui test and strucutred using POM pattern. Added install and test script to package.json file.

Fixed Typo

refactor playwright test to use fixtures and clean up the POM pattern.

Refactored the project again to separate the test for minimum-elements and index page. Chrome should have all tests working properly now. Firefox having an issue of getting all available camera resolutions. Could be related to using fake camera permission, will need to look further into this.

Added Test to locate the ddl selector for resolution

 First check-in on playwright script. The 'helloworld.spec.ts' script will run test on on the vanilla js helloworld demo to check the title and get the cameraEnhancer class object to test out the getResolution() methods.

    The 'ui-test.spec.ts' script will run a test on felix's DBR/DLR integration to verify the title and make sure use can select all 3 different scan mode (text+barcode, text only, barcode only).

Clean up the helloworld ui test and strucutred using POM pattern. Added install and test script to package.json file.

Fixed Typo

refactor playwright test to use fixtures and clean up the POM pattern.

Refactored the project again to separate the test for minimum-elements and index page. Chrome should have all tests working properly now. Firefox having an issue of getting all available camera resolutions. Could be related to using fake camera permission, will need to look further into this.

Added Unittest for index.html page.

Adding Code Coverage dependencies and initial commit to the unittest for index page (VIN Scanner)

Refactored VIN Scanner e2e test to update the locator paths and optimize the flow

Added GitHub action to run test on container.

Add GitHub workflow to run test on container

Clean up unnecessary .gitignore and move the playwright yml workflow file to the root

Fix the install dependency step for playwright test action

Navigate into VINScanner page to execute playwright tests.

try to execute all action scripts within the VINScanner folder

Set default working directory to VINScanner. Clean up playwright.config.ts

Added minimum-elements unittest

Experimenting with GitHub container test execution

Try setting up docker image container to run in GitHub Action

fix: json

Starting local server and run against it on github action

added wait-on package dependency. Updated the wait-on path.

Updated the wait-on command to add a timeout and avoid using localhost

Experiment using start-server-and-test npm package to kick off build dev & run playwright test.

Try running with a test file that will for sure pass.

draft: playwright test

fix: playwright.yml to add https

fix: install deps

remove openssl download

fix: start with vite

fix: test url

fix: playwright config

fix: get title

fix: added camera options

feat: add documentation on readme

fix: removed gitignore for lock

fix: rmeoved unused config file

fix: setup config.ts

fix and add more test for minimum-elements

fix: added testDir

Try to fix the playwright yml to execute 'npm run test' which should run npx playwright test

fix: added back yml command

Updated the testDir to point to VINSCanner/tests folder. Change all page.goto path to local file since baseURL is defined in the playwright config setting already.

enabled headless mode to allow execution with github action

adding longer delay to ensure video stream starts before validating the isPlaying bool.

feat(VINScanner): allow vertical scan on barcode only

fix: ui on mobile and bug on camera rotate

fix: scan mode showing up on result

feat: removed restart video on header

fix: sizing

Minor fixes on VINScanner test.

comment out the webkit test for now as desktop safari does not run properly in windows. Minor fix on cameraEnhancer copmarison in minimumElement test.

Clean up test and ensure chrome/firefox are running with headless mode. Setting up non parallel test for test-VinScanner to avoid validation errro for selecting different scan mode buttons.

Adding some try-catch block and update the execution of min-element test to be serial instead of parallel to prevent test failed

turned on ignoreHTTPSErrors for all projects

Due to the playwright bug for waitFor not really work, changing the wait to validate whether the button container exists prior to clicking on the scan mode buttons.

revert the change to wait for scanModeContainer in the test and try to add a hard timeout instead.

 First check-in on playwright script. The 'helloworld.spec.ts' script will run test on on the vanilla js helloworld demo to check the title and get the cameraEnhancer class object to test out the getResolution() methods.

    The 'ui-test.spec.ts' script will run a test on felix's DBR/DLR integration to verify the title and make sure use can select all 3 different scan mode (text+barcode, text only, barcode only).

Clean up the helloworld ui test and strucutred using POM pattern. Added install and test script to package.json file.

Fixed Typo

Fixed Typo

fix: json

Try running with a test file that will for sure pass.

fix: install deps

fix: added back yml command

enabled headless mode to allow execution with github action

fix: remove fields from result that's not detected

fix: sizing

fix: position of scan region on min

feat: moved cameraEnhancer cvRouter cameraView for debugging

Clean up test and ensure chrome/firefox are running with headless mode. Setting up non parallel test for test-VinScanner to avoid validation errro for selecting different scan mode buttons.

Adding some try-catch block and update the execution of min-element test to be serial instead of parallel to prevent test failed

turned on ignoreHTTPSErrors for all projects

revert the change to wait for scanModeContainer in the test and try to add a hard timeout instead.

Adding userAgent header to try avoiding firefox to think the playwright script is a bot. Also fixed the scan mode text to "Text", "Barcode", and "Both"

Adding differenet waitForLoadState to prevent firefox headless mode to pass.

use fake camera/ui for chrome

Setting firefox to run in debug mode when executing in headless

Clean up the script and removed unused function. This should fixed both #15 and #16.

fix: updated error msg on errors caught

feat: add previews for PRs
@felixindynamsoft felixindynamsoft changed the title Playwright test feat: Playwright test to MRZ Scanner Oct 17, 2024
@felixindynamsoft felixindynamsoft changed the title feat: Playwright test to MRZ Scanner feat: Playwright test to VIN Scanner Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants