Skip to content

Commit

Permalink
fix database test
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jul 8, 2016
1 parent 1cbaa7c commit 5e88030
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions public/tests/app/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ describe('Database tests', function() {
browser.get('#/database');

var tables = element.all(by.repeater('table in tables'));
expect(tables.count()).toEqual(1);
expect(tables.get(0).getText()).toEqual('foobar');
expect(tables.count()).toEqual(2);
expect(tables.get(0).getText()).toEqual('app_news');
expect(tables.get(1).getText()).toEqual('foobar');
});

it('Table update', function() {
browser.get('#/database');

var EC = protractor.ExpectedConditions;

var tables = element.all(by.repeater('table in tables'));
tables.get(1).click();

element.all(by.css('a.btn-default')).get(1).click();

browser.wait(EC.visibilityOf($('div.modal-body')), 5000);
Expand Down Expand Up @@ -80,6 +84,9 @@ describe('Database tests', function() {

var EC = protractor.ExpectedConditions;

var tables = element.all(by.repeater('table in tables'));
tables.get(1).click();

element.all(by.css('a.btn-danger')).first().click();

browser.wait(EC.visibilityOf($('div.modal-body')), 5000);
Expand Down

0 comments on commit 5e88030

Please sign in to comment.