The code:
describe("When adding a car to favorites", function() {
beforeEach(function() {
var add_car_btn = element(by.id('add-car'));
add_car_btn.click() // clicking the button sends the user to a new page with a table of cars
})
it("it should show up on the dashboard table", function() {
element.all(by.repeater('car in cars')).each(function(car) {
car.getText().then(function(val) {
if (val == "prius") console.log("car: ", val);
})
})
})
});
Message received when ran:
Using the selenium server at http://localhost:4444/wd/hub
F
Failures:
1) When adding a car to favorites, it should show up on the dashboard table
Message:
timeout: timed out after 5000 msec waiting for spec to complete
Stacktrace:
undefined