Skip to content

Instantly share code, notes, and snippets.

Created September 17, 2017 15:31
The spc file contains a test case which checks the title of the page.
var request = require( "superagent" );
describe('Protractor Demo App', function() {
it('should have a title', function() {
browser.waitForAngularEnabled(false);
browser.get('http://localhost:3001/test.html');
browser.executeScript(
function(arg1) {
return window.__coverage__;
}, null).then(function(response){
request
.post( "http://localhost:3002/coverage/client" )
.set("Content-Type", "application/json")
.send(JSON.stringify(response))
.end( function(resp,error){
} );
});
expect(browser.getTitle()).toEqual('Test page');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment