q1 - I found I had to open <project>.njsproj in order to set <startupfile> element to C:\Users\<myusername>\AppData\Roaming\npm\node_modules\protractor\bin\protractor in order to get angular protractor selenium end2end test debugging working. Did I overlook some <project>| properties | general field or other way of doing this?
q2 - I landed on this thread, and the node.js tools for visual studio in order to debug an issue I first raised in this angularjs forum thread [ https://groups.google.com/forum/#!topic/angular/8BcnbYqzqdM ] but was getting no answers there. What's happening is the angularjs tutorial step 4 introduces an angular protractor selenium end2end test that isn't working because the "expect(getNames()).toEqual" calls, see attached, are failing because getNames() returns null even though the earlier "phoneList" based test works and it uses same model as getNames() for grabbing list of controller injected set of <li > elements. Using the node.js tools for visual studio I can now debug into this work but it doesn't get me any further since inspecting variables such as [ var phoneNameColumn = element.all(by.repeater('phone in phones').column('phone.name')); ] appears to show only a set of late bound promises based results. Any thoughts on how I diagnose this issue using the tools so I can fix it and get the test working?
q2 - I landed on this thread, and the node.js tools for visual studio in order to debug an issue I first raised in this angularjs forum thread [ https://groups.google.com/forum/#!topic/angular/8BcnbYqzqdM ] but was getting no answers there. What's happening is the angularjs tutorial step 4 introduces an angular protractor selenium end2end test that isn't working because the "expect(getNames()).toEqual" calls, see attached, are failing because getNames() returns null even though the earlier "phoneList" based test works and it uses same model as getNames() for grabbing list of controller injected set of <li > elements. Using the node.js tools for visual studio I can now debug into this work but it doesn't get me any further since inspecting variables such as [ var phoneNameColumn = element.all(by.repeater('phone in phones').column('phone.name')); ] appears to show only a set of late bound promises based results. Any thoughts on how I diagnose this issue using the tools so I can fix it and get the test working?
describe('PhoneCat App', function () {
describe('Phone list view', function () {
beforeEach(function () {
browser.get('http://localhost:44300/index.html'); // browser object requires selenium "webdriver-manager start"
});
it('should be possible to control phone order via the drop down select box', function () {
var phoneNameColumn = element.all(by.repeater('phone in phones').column('phone.name'));
var query = element(by.model('query'));
function getNames() {
return phoneNameColumn.map(function (elm) {
return elm.getText();
});
}
query.sendKeys('tablet'); // let's narrow the dataset to make the test assertions shorter
expect(getNames()).toEqual([
"Surface v2",
"Lumia 2520"
]);
element(by.model('orderProp')).element(by.css('option[value="name"]')).click();
expect(getNames()).toEqual([
"Lumia 2520",
"Surface v2"
]);
});
});
});