Coder Social home page Coder Social logo

protractor-new-hope's Introduction

Protractor: A New Hope

This is the demo app for our ng-conf 2018 talk - Protractor: A New Hope.

It's the admin interface for the Death Star. You can run the different milestones from our talk with the following scripts:

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Milestones

Easter Egg: If you click the Rebel icon in the home page, you'll get a control panel for a Sphero R2D2. The code for this is in src/app/home/droid.ts - you'll need to edit that and put the name of your droid there in order to control it.

The Tractor Beam Lever (Screenshot Testing)

Run 1-screenshots.sh

Compares images at /tractor using blue-harvest node module.

  • Prerequisite, download browser driver with npm run webdriver-update
  • Prior to running the test, generate golden images with ./update-goldens.sh. The shell command runs protractor spec file e2e/tractor.e2e-spec.ts with environment variable UPDATE_GOLDENS set to true.
  • Compare screenshots with ./1-screenshots.sh. The shell command compares the golden screenshot against the actual screenshot. If there are diffs, the file we be written to diff.png and the test will fail.

Firing Form (Action Helpers)

Run 2-action-helpers.sh

The finished example test is e2e/firing-form.e2e-spec.complete.ts. It uses Action Helpers to test the firing form.

Prisoner Manifest (Debugging)

Run 3-debugging.sh to debug the test with Chrome Devtools. You'll need to open chrome to chrome://inspect

You can also debug with VSCode, as we did in the demo. The launch configuration is in ./vscode/launch.json

The Prisoner manifest is behind an auth guard which requires a "I'm not a droid" captcha.

protractor-new-hope's People

Contributors

angular-cli avatar cnishina avatar heathkit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.