GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - keys-github/smartui-node-sample

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

66 Commits
66 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
tests/generalCases
tests/generalCases
 
 
util
util
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
config.json
config.json
 
 
lazyLoadingImages.js
lazyLoadingImages.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

SmartUI NodeJS Sample

Prerequisites

  1. Node version >=14 required
node --version
  1. You can switch the node version by below command
nvm install 12.0.0
node --version

Steps to Run the Test

Step 1. Set LambdaTest Username and Access Key in environment variables.

For Linux/macOS:

export LT_USERNAME="YOUR_USERNAME"
export LT_ACCESS_KEY="YOUR ACCESS KEY"

For Windows:

set LT_USERNAME="YOUR_USERNAME"
set LT_ACCESS_KEY="YOUR ACCESS KEY"

Step 2. Clone the smartui-node-sample Repo.

git clone https://github.com/LambdaTest/smartui-node-sample

Step 3. Install Dependencies.

npm i

Running Test

We have many different examples revolving around different usecases.

Test Cases

  1. General Capability Change.

    • index.js - This Test is an example of all the advanced funtionalities possible with Smart UI
      npm start
      
    • general.js - This Test is an example of all the general test.
      npm start general
      
    • errorSetting.js - This Test is an example of how error settings can be modified.
      npm start error
      
    • transparency.js - This Test is to show how to alter the opacity of the comparison screenshot.
      npm start transparency
      
    • BoundingBoxes.js - This Test shows an example of comparing only a certain area in the screenshot.
      npm start boundingBoxes
      
    • ignoredBoxes.js - This test is for excluding certain areas in the screenshot for comparison.
      npm start ignoredBoxes
      
    • ignoreAreasColoredWith.js - This test is for removing the colored content from the comparison.
      npm start ignoreAreasColoredWith
      

Execute Tests on Multiple resolutions

If you want to execute visual regression tests on multiple resolutions, need to add capability resolution in capabilities option.

  let capabilities = {
      ...
      resolution = "1920x1080";
      ...
  }

Few common resolutions are

  • 1024x768
  • 1280x800
  • 1600x1200
  • 1920x1080
  • 2560x1440

Run Test on 1024x768 resolution

$ node custom-resolutions.js 1024x768

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.