Skip to content

Commit

Permalink
Fix ListView e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromemacias committed May 18, 2015
1 parent 8de0a91 commit 93d932d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
30 changes: 12 additions & 18 deletions src/javascripts/test/e2e/ListViewSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,30 @@
describe('ListView', function () {
'use strict';

beforeEach(function() {
beforeEach(function () {
browser.get(browser.baseUrl + '#/posts/list');
});

describe('Edition link', function () {
it('should allow edition of an entity', function () {
// Retrieve first edit button
$$('table tr:nth-child(1) a.btn').then(function (buttons) {
// Click on it
buttons[1].click().then(function() {
// Check browser URL
browser.getLocationAbsUrl().then(function(url) {
expect(url).toContain('/posts/edit/');
});
});
$('table tr:nth-child(1) ma-edit-button a span').click();

// Check browser URL
browser.getLocationAbsUrl().then(function(url) {
expect(url).toContain('/posts/edit/');
});
});
});

describe('Show link', function () {
it('should allow display of an entity', function () {
// Retrieve first show button
$$('table tr:nth-child(1) a.btn').then(function (buttons) {
// Click on it
buttons[0].click().then(function() {
// Check browser URL
browser.getLocationAbsUrl().then(function(url) {
expect(url).toContain('/posts/show/');
});
});
// Retrieve first edit button
$('table tr:nth-child(1) ma-show-button a span').click();

// Check browser URL
browser.getLocationAbsUrl().then(function(url) {
expect(url).toContain('/posts/show/');
});
});
});
Expand Down
3 changes: 2 additions & 1 deletion src/javascripts/test/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ exports.config = {
browserName: 'chrome',
build: process.env.TRAVIS_BUILD_NUMBER ? process.env.TRAVIS_BUILD_NUMBER : null,
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER ? process.env.TRAVIS_JOB_NUMBER : null,
name: 'ng-admin'
name: 'ng-admin',
screenResolution: '1280x1024'
}
],

Expand Down

0 comments on commit 93d932d

Please sign in to comment.