testOk() {
    dialog = createTestDialog();
    expectOk(dialog);
    expectAfterHide(dialog);
    mockCtrl.$replayAll();

    dialog.show();
    events.fireClickSequence(dialog.getOkButtonElement());
    assertNotOpen('Dialog should not be open after clicking OK', dialog);

    mockCtrl.$verifyAll();
  }
Tests that clicking the OK button dispatches the OK event and closes the
dialog (dispatching the AFTER_HIDE event too).
@suppress {checkTypes,visibility} suppression added to enable type checking