use data-test-subj click create button in a less fragile manner
This commit is contained in:
parent
af9c3dd8ce
commit
d262deaba2
2 changed files with 4 additions and 5 deletions
|
@ -167,6 +167,7 @@
|
|||
</div>
|
||||
|
||||
<button
|
||||
data-test-subj="submitCreateIndexPatternFromExistingForm"
|
||||
ng-disabled="form.$invalid || index.fetchFieldsError"
|
||||
ng-class="index.fetchFieldsError ? 'btn-default' : 'btn-success'"
|
||||
type="submit"
|
||||
|
|
|
@ -130,13 +130,11 @@ define(function (require) {
|
|||
},
|
||||
|
||||
getCreateButton: function () {
|
||||
return this.remote.setFindTimeout(defaultTimeout)
|
||||
.findByCssSelector('.btn');
|
||||
return common.findTestSubject('submitCreateIndexPatternFromExistingForm');
|
||||
},
|
||||
|
||||
clickCreateButton: function () {
|
||||
return this.remote.setFindTimeout(defaultTimeout)
|
||||
.findByCssSelector('.btn').click();
|
||||
return common.findTestSubject('submitCreateIndexPatternFromExistingForm').click();
|
||||
},
|
||||
|
||||
clickDefaultIndexButton: function () {
|
||||
|
@ -309,7 +307,7 @@ define(function (require) {
|
|||
return common.tryForTime(defaultTimeout, function () {
|
||||
return self.selectTimeFieldOption('@timestamp')
|
||||
.then(function () {
|
||||
return self.getCreateButton().click();
|
||||
return self.clickCreateButton();
|
||||
});
|
||||
})
|
||||
.then(function () {
|
||||
|
|
Loading…
Reference in a new issue