mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Fix functional tests.
This commit is contained in:
parent
0f7ebb71ef
commit
0504874e5c
4 changed files with 26 additions and 17 deletions
|
@ -102,7 +102,9 @@
|
|||
data-test-subj="tab-{{ editSection.index }}"
|
||||
>
|
||||
{{ editSection.title }}
|
||||
({{ editSection.count }})
|
||||
<span data-test-subj="tab-count-{{ editSection.index }}">
|
||||
({{ editSection.count }})
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<div class="kuiBar kuiVerticalRhythm">
|
||||
<div class="kuiBarSection">
|
||||
<!-- Index pattern name -->
|
||||
<h1 class="kuiTitle kuiVerticalRhythm" css-truncate>
|
||||
<h1
|
||||
class="kuiTitle kuiVerticalRhythm"
|
||||
css-truncate
|
||||
data-test-subj="indexPatternTitle"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
ng-if="defaultIndex === indexPattern.id"
|
||||
|
@ -17,6 +21,7 @@
|
|||
ng-click="setDefault()"
|
||||
tooltip="Set as default index"
|
||||
class="kuiButton kuiButton--basic"
|
||||
data-test-subj="setDefaultIndexPatternButton"
|
||||
>
|
||||
<span class="sr-only">Set as default index</span>
|
||||
<ispan
|
||||
|
@ -42,6 +47,7 @@
|
|||
aria-label="Remove index pattern"
|
||||
tooltip="Remove index pattern"
|
||||
class="kuiButton kuiButton--danger"
|
||||
data-test-subj="deleteIndexPatternButton"
|
||||
>
|
||||
<span class="sr-only">Remove index pattern</span>
|
||||
<span
|
||||
|
|
|
@ -42,7 +42,11 @@
|
|||
<form class="form-inline pagination-size" ng-if="showSelector">
|
||||
<div class="form-group">
|
||||
<label>Page Size</label>
|
||||
<select ng-model="paginate.perPage" ng-options="opt.value as opt.title for opt in paginate.sizeOptions">
|
||||
<select
|
||||
ng-model="paginate.perPage"
|
||||
ng-options="opt.value as opt.title for opt in paginate.sizeOptions"
|
||||
data-test-subj="paginateControlsPageSizeSelect"
|
||||
>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -97,19 +97,16 @@ export default class SettingsPage {
|
|||
}
|
||||
|
||||
async clickDefaultIndexButton() {
|
||||
await this.remote.setFindTimeout(defaultFindTimeout)
|
||||
.findByCssSelector('button.btn.btn-success.ng-scope').click();
|
||||
await PageObjects.common.findTestSubject('setDefaultIndexPatternButton').click();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
}
|
||||
|
||||
async clickDeletePattern() {
|
||||
await this.remote.setFindTimeout(defaultFindTimeout)
|
||||
.findByCssSelector('button.btn.btn-danger.ng-scope').click();
|
||||
await PageObjects.common.findTestSubject('deleteIndexPatternButton').click();
|
||||
}
|
||||
|
||||
getIndexPageHeading() {
|
||||
return this.remote.setFindTimeout(defaultFindTimeout)
|
||||
.findByCssSelector('h1.title.ng-binding.ng-isolate-scope');
|
||||
return PageObjects.common.findTestSubject('indexPatternTitle');
|
||||
}
|
||||
|
||||
getConfigureHeader() {
|
||||
|
@ -154,17 +151,17 @@ export default class SettingsPage {
|
|||
|
||||
getFieldsTabCount() {
|
||||
return PageObjects.common.try(() => {
|
||||
return this.remote.setFindTimeout(defaultFindTimeout / 10)
|
||||
.findByCssSelector('a[data-test-subj="tab-indexedFields"] small').getVisibleText()
|
||||
.then((theText) => {
|
||||
// the value has () around it, remove them
|
||||
return theText.replace(/\((.*)\)/, '$1');
|
||||
});
|
||||
return PageObjects.common.findTestSubject('tab-count-indexedFields')
|
||||
.getVisibleText()
|
||||
.then((theText) => {
|
||||
// the value has () around it, remove them
|
||||
return theText.replace(/\((.*)\)/, '$1');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async getScriptedFieldsTabCount() {
|
||||
const selector = 'a[data-test-subj="tab-scriptedFields"] small';
|
||||
const selector = '[data-test-subj="tab-count-scriptedFields"]';
|
||||
return await PageObjects.common.try(async () => {
|
||||
const theText = await this.remote.setFindTimeout(defaultFindTimeout / 10)
|
||||
.findByCssSelector(selector).getVisibleText();
|
||||
|
@ -255,7 +252,7 @@ export default class SettingsPage {
|
|||
|
||||
async setPageSize(size) {
|
||||
await this.remote.setFindTimeout(defaultFindTimeout)
|
||||
.findByCssSelector('form.form-inline.pagination-size.ng-scope.ng-pristine.ng-valid div.form-group option[label="' + size + '"]')
|
||||
.findByCssSelector(`[data-test-subj="paginateControlsPageSizeSelect"] option[label="${size}"]`)
|
||||
.click();
|
||||
await PageObjects.header.waitUntilLoadingHasFinished();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue