-
Installed BackstopJS node module, initiated Backstop environment, and tested Backstop on my site and the NYU home page using the provided
backstop.json
-
Tested with
readySelector
,delay
,hoverSelector
,clickSelector
,postInteractionWait
, and other properties -
Found out that certain
hoverSelector
andclickSelector
did not work on the NYU home page and threw errors for some reason -
Found out about the timeout thresholds of Backstop
-
Realized that the
hoverSelector
does not seem to work on HTML elements in<header>
or<footer>
-
Realized that the
clickSelector
does not seem to work on HTML elements not visible in the viewport -
Installed yaml node module and converted config file in
.yml
format into JavaScript object literal format that Backstop accepts -
Ran Backstop tests in a (node)
.js
file -
Started testing with listening keyboard input from the console when running (node)
.js
files in the console
-
Added the functionality to print instructions and warnings in various colors in the console, listen to keyboard input, and run accordingly
-
Enabled the program to run smarter and prevent errors by checking existence of necessary files:
If the program is instructed to run
backstop approve
, but the necessary test files do not exist,backstop test
will be automatically run instead, and the user will have to manually runbackstop approve
later on their ownIf the program is instructed to run
backstop test
, but the necessary reference files do not exist,backstop reference
will be automatically run first, and the test will only be run ifbackstop reference
succeeds -
Created two modes for better control and automation of the testing process—auto mode and manual mode:
In auto mode, all scenarios parsed from the
.yml
file will be tested one at a time:-
If
backstop reference
failed for the previous scenario, the process stops and automatically fallbacks to manual mode, as a failedbackstop reference
likely indicates networking issues -
The user is able to pause (and since September 3, resume) the automatic testing process
-
Once all the scenarios have been tested, the program will be automatically switched to manual mode
In manual mode, the user first chooses a scenario based on its index or name, and then chooses whether to run
backstop reference
,backstop test
, orbackstop approve
for that scenarioThe user will be able to switch from manual mode to auto mode in the future (added on September 3)
-
-
Added the functionality to resume auto runs when the user pauses it by typing anything during the run
-
Added the functionality to start auto run from a specific scenario (using the same logic of choosing scenario by index or by name in manual mode) by typing
auto run
into the console -
Added documentation to most functions and important code blocks
-
Fixed multiple bugs related to scenario-choosing and state-tracking
-
Added the functionality to choose the
.yml
file to load the scenarios from (assuming the.yml
file is in the same format asnyu.yml
) -
Greatly improved the safety of loading config files
-
Added the functionality to show a list of all the scenario names by typing
show list
into the console -
Improved the readability of console logs
-
Added the functionality to start approving all scenarios from a specific scenario (using the same logic of choosing scenario by index or by name in manual mode) by typing
approve all
into the consoleUnder the special case of running
approve all
, contrary to earlier claims, thebackstop approve
command will always be run even if no necessary reference and/or test files exist andbackstop reference
orbackstop test
is run first -
Added the functionality to resume auto approvals when the user pauses it by typing anything during the run
-
Fixed several bugs that only arise under special cases like single-scenario files or when auto run is paused when running at the last scenario
-
Added
README.md
-
Added
package.json
-
Added support for scenarios with no reference urls
-
Reorganized file structure
-
Researched on the possibility of running BackstopJS in a Firefox environment
-
Experimented with the Firefox version of Puppeteer
-
Added ability to check which version of Puppeteer is installed (Chrome, Firefox, or other unknown)
-
Experimented with exporting and importing custom variables and functions
-
Experimented with the
child_process
module and itsexec
method -
Added support for switching Puppeteer versions (between Chromium and Firefox)
-
Added ability to store Backstop files for different Puppeteer versions and different browsers under different directories
-
Added support for running
backstopjs-test.js
vianpm start
andswitch-browser.js
vianpm run switch
-
Updated
package.json
andpackage-lock.json
-
Updated
README.md
-
Added ability to ask which version to install when an unknown version of Puppeteer is found or no Puppeteer is found
-
Updated
README.md
-
Merged
firefox-test
intomaster
branch -
Renamed
switch-browser.js
toswitch-environment.js
-
Created
v1.0.0
andv1.0.1
releases
-
Replaced
exec
with more efficient and flexiblespawn
-
Added ability to use environment variable to determine
debugMode
when runningswitch-environment.js
. -
Updated
README.md
-
Prevented interrupted console logs from contaminating the rest of the console output
-
Improved safety when parsing screen sizes
-
Uniformed console log format
-
Updated
README.md
- Updated
package.json
-
Migrated from
BackstopJS
toBackstop-Playwright
-
Removed the use of
helper.js
-
Updated
README.md
-
Rerun all tests
-
Updated
nyu.yml
-
Added support for default screen sizes