Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Last active June 30, 2024 14:38
Show Gist options
  • Save trikitrok/b25781f3fe50d25ebe05 to your computer and use it in GitHub Desktop.
Save trikitrok/b25781f3fe50d25ebe05 to your computer and use it in GitHub Desktop.
describe("In the project details 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);
});
// some other tests
// ...
it("A landing gets duplicated", function () {
expect(
element.all(
by.repeater('landing in project.landings')).count()
).toBe(6);
element.all(by.css('.duplicate')).first().click();
element(by.css('#input_duplicate_new_name')).sendKeys("new_name");
TestTools.clickDropdownOptionWithGivenValue(
'project-name-select', 'Excecutive Education'
).then(function () {
element(by.css('.button_big')).click();
expect(
element.all(
by.repeater('landing in project.landings')
).count()
).toBe(7);
}
);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment