Applitools Eyes is a service that lets us upload and compare screenshots of our site over time.
Code.org employees as of this writing should receive login details for a shared account. If not, contact Brian about getting an account.
Either add your test to /dashboard/test/ui/features/eyes.feature
OR
add your test to a new .feature
file, annotating it with @eyes
If you need to write an eyes test that is specific to a mobile device, make sure
it is annotated with @eyes_mobile
and not @eyes
. By default, @eyes
tests
will only run against Chrome 33 and @eyes_mobile
tests will only run against
iPhone.
To run locally, you must have the Applitools secret key installed in your locals.yml
.
# code-dot-org/locals.yml
applitools_eyes_api_key: 'my_applitools_eyes_key'
You can find that key by logging in and pressing (Profile Icon) -> My API Key.
./runner.rb -m -l --eyes
(running Chromedriver)- Toggle ONLY running @eyes annotated tests with
--eyes
- Usually the first test run will fail due to there being no baseline yet. In
error.log
you can see the exact error which usually includes a link to the session - Visit the Applitools sessions dashboard to see your test run
- Accept the changes and Save (bottom right)
bundle exec ./runner.rb --eyes -c Chrome33Win7,iPhone
Both on CircleCI In aws/build.rake
, as part of the test.code.org CI script, the eyes tests will be run (as of writing, currently only against the Chrome 33 browser and iPhone).
Results will show up in the Selenium HTML output when changes occur. You can navigate to the reported URL from there to accept the new baseline.
Each time an Eyes UI test is run, it is run with branch set to that branch, and parent_branch set to either the target of a PR with that branch or the default base branch for that given branch (test
-> production
, staging
-> test
, [feature branches, etc.]
-> staging
).
Per Applitools' documentation, we use the copybranch API endpoint to merge baselines when a merge commit is detected on a given branch.