1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
var tests = {
"Should not break ng-click": function (file) {
return function () {
browser.get("http://localhost:9000/test/fixtures/click" + file + ".html");
element(by.css("button#test1")).click();
expect(element(by.css("#field")).getText()).toBe("Success");
};
},
"Should not break ng-click for translated strings": function (file) {
return function () {
browser.get("http://localhost:9000/test/fixtures/click" + file + ".html");
element(by.css("button#test2")).click();
expect(element(by.css("#field")).getText()).toBe("Success");
};
},
"Should compile ng-click": function (file) {
return function () {
browser.get("http://localhost:9000/test/fixtures/click" + file + ".html");
element(by.css("#test3 button")).click();
expect(element(by.css("#field")).getText()).toBe("Success");
};
}
};
describe("Click", function () {
for (var key in tests) {
it(key, tests[key](""));
}
});
describe("Click (no jQuery)", function () {
for (var key in tests) {
it(key, tests[key]("-nojquery"));
}
});
|