Skip to content

Commit

Permalink
Resolves tests for management redirect changes
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <[email protected]>
  • Loading branch information
Tyler Smalley committed Jun 22, 2016
1 parent a5220c0 commit 14ef797
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ <h4>Caution: You can break stuff here</h4>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
<th>Actions <kbn-info info="Edit or restore the default value."></kbn-info></th>
<th class="col-xs-4 col-sm-4">Name</th>
<th class="col-xs-4 col-sm-5">Value</th>
<th class="col-xs-3 col-sm-2">Actions <kbn-info info="Edit or restore the default value."></kbn-info></th>
</tr>
</thead>
<tbody>
Expand Down
8 changes: 6 additions & 2 deletions src/plugins/kibana/public/management/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ kbn-management-objects {
kbn-management-advanced {
// super specific rule to override bootstrap's equally specific rule
// https://github.com/twbs/bootstrap/blob/1f329f8f17aa989eabc6e94bdcab93e69ef0e463/less/tables.less#L35
.table > tbody > tr > td {
vertical-align: middle;
.table {
table-layout: fixed;

tbody > tr > td {
vertical-align: middle;
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions test/functional/apps/management/_creation_form_changes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ bdd.describe('user input reactions', function () {
return esClient.deleteAndUpdateConfigDoc()
.then(function () {
return settingsPage.navigateTo();
})
.then(function () {
return settingsPage.clickExistingData();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ bdd.describe('creating and deleting default index', function describeIndexTests(
return esClient.deleteAndUpdateConfigDoc()
.then(function () {
return settingsPage.navigateTo();
})
.then(function () {
return settingsPage.clickExistingData();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ bdd.describe('index result field sort', function describeIndexTests() {
columns.forEach(function (col) {
bdd.describe('sort by heading - ' + col.heading, function indexPatternCreation() {
bdd.before(function () {
return settingsPage.navigateTo();
return settingsPage.navigateTo()
.then(function () {
return settingsPage.clickExistingData();
});
});

bdd.beforeEach(function () {
Expand Down
3 changes: 3 additions & 0 deletions test/functional/apps/management/_initial_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ bdd.describe('initial state', function () {
return esClient.deleteAndUpdateConfigDoc()
.then(function () {
return settingsPage.navigateTo();
})
.then(function () {
return settingsPage.clickExistingData();
});
});

Expand Down
6 changes: 6 additions & 0 deletions test/functional/apps/management/_kibana_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ bdd.describe('creating and deleting default index', function describeIndexTests(
bdd.before(function () {
// delete .kibana index and then wait for Kibana to re-create it
return esClient.deleteAndUpdateConfigDoc()
.then(function () {
return settingsPage.navigateTo();
})
.then(function () {
return settingsPage.clickExistingData();
})
.then(function () {
return settingsPage.createIndexPattern();
})
Expand Down
15 changes: 11 additions & 4 deletions test/support/pages/settings_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@ export default (function () {
return this.remote.findDisplayedByCssSelector('.app-link:nth-child(5) a').click();
},

clickPath: function (path) {
return this.remote.findDisplayedByCssSelector('[kbn-href="#/management/' + path + '"]').click();
clickLinkText: function (text) {
return this.remote.findDisplayedByLinkText(text).click();
},

clickKibanaSettings: function () {
return this.clickPath('kibana/settings');
return this.clickLinkText('Advanced Settings');
},

clickKibanaIndicies: function () {
return this.clickPath('kibana/indices');
return this.clickLinkText('Index Patterns');
},

clickExistingData: function () {
return this.clickLinkText('Existing Data');
},

getAdvancedSettings: function getAdvancedSettings(propertyName) {
Expand Down Expand Up @@ -315,6 +319,9 @@ export default (function () {

return common.try(function () {
return self.navigateTo()
.then(function () {
return self.clickExistingData();
})
.then(function () {
return self.selectTimeFieldOption('@timestamp');
})
Expand Down

0 comments on commit 14ef797

Please sign in to comment.