Running End2End

Jupyter Data
1 min readDec 14, 2015

--

Install protractor

>> sudo npm install protractor -g
>> sudo webdriver-manager update

Setup protractor.conf.js

exports.config = {
specs: [
‘./e2e/**/*.spec.js’
],
baseUrl: ‘
http://localhost:4567'
}

Sample Protractor spec

describe('datacasserole-e2e',function(){    describe('index with cookie', function(){
beforeEach(function() {
browser.get('/#');
var cookie_input = element(By.id('enter-cookie'));
cookie_input.sendKeys('myspecialcookie');
var form = element(By.css('form'));
form.submit();
});
it('after submitting cookie, should take to home page', function(){
browser.get('/#');
expect(element(by.css('h1')).getText()).toBe('Visualize and better understand your data')
});
});

});

Run protractor

>> protractor protractor.conf.js

References:
http://angular.github.io/protractor/#/
https://github.com/angular/protractor/blob/master/docs/tutorial.md

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Jupyter Data
Jupyter Data

Written by Jupyter Data

Fastest way to Explore your Data

No responses yet

Write a response