Skip to content

Commit

Permalink
test support
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon committed May 4, 2017
1 parent 14e38cc commit fbb7889
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/ui/public/kbn_top_nav/kbn_top_nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
tooltip-popup-delay="400"
tooltip-append-to-body="1"
data-test-subj="{{menuItem.testId}}"
></div>
>
</div>

<!-- Time-picker "menu item" -->
<kbn-global-timepicker></kbn-global-timepicker>
Expand Down
1 change: 1 addition & 0 deletions src/ui/public/notify/notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ function add(notif, cb) {
notif.customActions = notif.customActions.map((action, index) => {
return {
key: action.text,
dataTestSubj: action.dataTestSubj,
callback: closeNotif(notif, action.callback, action.text),
getButtonClass() {
const buttonTypeClass = typeToButtonClassMap[notif.type];
Expand Down
1 change: 1 addition & 0 deletions src/ui/public/notify/partials/toaster.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
ng-class="action.getButtonClass()"
ng-click="action.callback()"
ng-bind="action.key"
data-test-subj="{{action.dataTestSubj}}"
></button>
</div>

Expand Down
10 changes: 6 additions & 4 deletions test/functional/page_objects/header_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,12 @@ export function HeaderPageProvider({ getService, getPageObjects }) {
.findByLinkText(quickTime).click();
}

async getToastMessage() {
remote.setFindTimeout(defaultFindTimeout);
return await remote.findDisplayedByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
.getVisibleText();
async getToastMessage(findTimeout = defaultFindTimeout) {
await remote.setFindTimeout(findTimeout);
const message = await remote.findDisplayedByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
.getVisibleText();
await remote.setFindTimeout(defaultFindTimeout);
return message;
}

async waitForToastMessageGone() {
Expand Down

0 comments on commit fbb7889

Please sign in to comment.