Created
June 9, 2014 11:07
-
-
Save trikitrok/59b6ce45108ab53080c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("A project landings list page", function () { | |
var TestTools = require('./TestTools'), | |
Navigation = require('./Navigation'), | |
ptor; | |
beforeEach(function () { | |
TestTools.resetTestData(); | |
ptor = protractor.getInstance(); | |
ptor.get('/ebo/#/projects/excecutive-education'); | |
Navigation.logIn(ptor); | |
TestTools.waitForElementByCssToBePresent('.project-item__title', ptor); | |
}); | |
it("lists all landings and mailings", function () { | |
var landingsAndMailings = element.all( | |
by.repeater('landing in project.landings')), | |
mailings = element.all( | |
by.repeater('mailing in project.landings | filter:{mailing:true}')); | |
landingsAndMailings.count().then(function (landingsAndMailingsNumber) { | |
mailings.count().then(function (mailingsNumber) { | |
var landingsNumbers = landingsAndMailingsNumber - mailingsNumber; | |
expect(mailingsNumber).toBe(4); | |
expect(landingsNumbers).toBe(2); | |
}); | |
}); | |
}); | |
it("removes a landing", function () { | |
element.all(by.css('.delete')).first().click(); // <- the problem happens here | |
expect( | |
element.all( | |
by.repeater('landing in project.landings')).count() | |
).toBe(5); | |
}); | |
// some other tests | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment