discourse/test/javascripts/acceptance
Jeff Wong 111fa7e277 FEATURE: prevent accidental canceling when drafting penalties (#9129)
Pop up a confirmation box when there is input. This prevents accidental closing
of the dialog boxes due to clicking outside.

This adds a development hook on modals in the form of a `beforeClose`
function. Modal windows can abort the close if the funtion returns false.

Additionally fixing a few issues with loop and state on the modal popups:

Escape key with bootbox is keyup.
Updating modal to close on keyup as well so escape key is working.
Fixes an issue where pressing esc will loop immediately back to the modal by:
keydown -> bootbox -> keyup -> acts as "cancel", restores modal

Needs a next call to reopenModal otherwise, keyup is handled again by the modal.
Fixes an issue where pressing esc will loop immediately back to the confirm:
esc keyup will be handled and bubble immediately back to the modal.

Additionally, only handle key events when the #discourse-modal is visible.
This resolves issues where escape or enter events were being handled by
a hidden modal window.
2020-03-23 16:01:39 -07:00
..
about-test.js.es6 DEV: migrate acceptance tests to async await - admin, about, account created (#6111) 2018-07-19 17:35:10 +08:00
account-created-test.js.es6 DEV: migrate acceptance tests to async await - admin, about, account created (#6111) 2018-07-19 17:35:10 +08:00
admin-emails-test.js.es6 DEV: Apply code review. 2018-12-05 21:56:18 +01:00
admin-search-log-term-test.js.es6 DEV: Improve component test skip option and skipped new tests 2019-05-16 15:15:37 -03:00
admin-search-logs-test.js.es6 DEV: Improve component test skip option and skipped new tests 2019-05-16 15:15:37 -03:00
admin-site-settings-test.js.es6 DEV: Fix function prototype deprecations (#8681) 2020-01-16 18:56:53 +01:00
admin-site-text-test.js.es6 FEATURE: Locale support for seeded categories and topics (#7110) 2019-03-18 21:09:13 +01:00
admin-suspend-user-test.js.es6 FEATURE: prevent accidental canceling when drafting penalties (#9129) 2020-03-23 16:01:39 -07:00
admin-user-badges-test.js.es6 FIX: adds groupBy to lodash available functions list (#7579) 2019-05-21 08:58:57 +02:00
admin-user-emails-test.js.es6 Make prettier happy. 2018-07-16 11:31:23 +08:00
admin-user-index-test.js.es6 DEV: select-kit 2 (#7998) 2020-02-03 14:22:14 +01:00
admin-users-list-test.js.es6 fix tests (#7234) 2019-03-21 13:16:55 +01:00
admin-watched-words-test.js.es6 Merge diffs from master 2020-02-25 17:23:37 -05:00
auth-complete-test.js.es6 FIX: Fix registration dialog popup for 'full screen' social logins 2019-01-12 12:08:13 +00:00
badges-test.js.es6 REFACTOR: Test Memory Usage Fixes (#7769) 2019-06-14 14:54:20 +02:00
category-chooser-test.js.es6 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
category-edit-security-test.js.es6 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
category-edit-test.js.es6 DEV: Use category ids in more URLs preferentially 2019-12-04 09:47:41 +00:00
category-hashtag-test.js.es6 FIX: Flaky tests 2019-10-11 15:33:34 -04:00
click-track-test.js.es6 DEV: Use classes for styling user and group cards (#8913) 2020-02-13 09:58:17 +00:00
composer-actions-test.js.es6 FIX: Warn users of overwriting new topic draft (#8841) 2020-02-04 09:59:56 -06:00
composer-attachment-test.js.es6 DEV: Extend plugin API for uploads (#8440) 2019-12-09 16:20:03 +02:00
composer-edit-conflict-test.js.es6 UX: Changed error draft status to icon (#7369) 2019-04-19 09:18:01 +02:00
composer-hyperlink-test.js.es6 FEATURE: search topics when adding a link in composer (#8178) 2019-10-11 11:37:44 -04:00
composer-onebox-test.js.es6 Fix the build. 2019-06-11 10:05:57 +08:00
composer-test.js.es6 DEV: Make image resize controls more resilient (#8867) 2020-02-06 17:19:24 +02:00
composer-topic-links-test.js.es6 DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
composer-uncategorized-test.js.es6 DEV: select-kit 2 (#7998) 2020-02-03 14:22:14 +01:00
create-account-user-fields-test.js.es6 DEV: upgrades from Ember 2.13 to Ember 3.5.1 (#6808) 2019-01-10 11:06:01 +01:00
custom-html-set-test.js.es6 DEV: migrate acceptance tests to async await - badges, category, composer, customHTML 2018-07-19 13:52:48 +02:00
custom-html-template-test.js.es6 DEV: migrate acceptance tests to async await - badges, category, composer, customHTML 2018-07-19 13:52:48 +02:00
dashboard-test.js.es6 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
email-notice-test.js.es6 DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
emoji-picker-test.js.es6 DEV: Reenable Emoji Picker tests 2019-12-03 20:39:11 +01:00
emoji-test.js.es6 FIX: This emoji test was broken too 2019-10-11 15:41:19 -04:00
enforce-second-factor-test.js.es6 DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
forgot-password-test.js.es6 DEV: migrate acceptance tests to async/await 2018-07-26 12:51:16 +02:00
group-card-mobile-test.js.es6 DEV: Use classes for styling user and group cards (#8913) 2020-02-13 09:58:17 +00:00
group-card-test.js.es6 DEV: Use classes for styling user and group cards (#8913) 2020-02-13 09:58:17 +00:00
group-index-test.js.es6 DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
group-manage-interaction-test.js.es6 DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
group-manage-logs-test.js.es6 UX: Default user facing routes to /g instead of /groups. (#7042) 2019-02-21 13:44:25 +08:00
group-manage-membership-test.js.es6 FIX: ensures group automatic membership dropdown works (#9022) 2020-02-21 22:14:24 +01:00
group-manage-profile-test.js.es6 DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
group-requests-test.js.es6 FIX: Better handling of Group model state (#8356) 2019-11-18 14:59:28 +02:00
group-test.js.es6 DEV: select-kit 2 (#7998) 2020-02-03 14:22:14 +01:00
groups-index-test.js.es6 UX: new layout for groups page, allow changes to automatic group bio (#7350) 2019-04-17 22:44:30 -04:00
groups-new-test.js.es6 REFACTOR: Test Memory Usage Fixes (#7769) 2019-06-14 14:54:20 +02:00
invite-accept-test.js.es6 DEV: migrate acceptance tests to async await - invite, login, mobile 2018-07-19 16:38:37 +02:00
invite-show-user-fields-test.js.es6 DEV: migrate acceptance tests to async await - invite, login, mobile 2018-07-19 16:38:37 +02:00
jump-to-test.js.es6 DEV: upgrades from Ember 2.13 to Ember 3.5.1 (#6808) 2019-01-10 11:06:01 +01:00
keyboard-shortcuts-test.js.es6 DEV: Fix lint. 2019-02-06 23:55:05 +02:00
login-redirect-test.js.es6 DEV: Correct qunit test description 2018-12-10 15:44:05 +00:00
login-required-test.js.es6 DEV: migrate acceptance tests to async await - invite, login, mobile 2018-07-19 16:38:37 +02:00
login-with-email-and-hide-email-address-taken-test.js.es6 DEV: migrate acceptance tests to async/await 2018-07-26 12:51:16 +02:00
login-with-email-and-no-social-logins-test.js.es6 DEV: migrate acceptance tests to async/await 2018-07-26 12:51:16 +02:00
login-with-email-disabled-test.js.es6 DEV: migrate acceptance tests to async await - invite, login, mobile 2018-07-19 16:38:37 +02:00
login-with-email-test.js.es6 DEV: migrate acceptance tests to async/await 2018-07-26 12:51:16 +02:00
mobile-discovery-test.js.es6 DEV: migrate acceptance tests to async await - invite, login, mobile 2018-07-19 16:38:37 +02:00
mobile-sign-in-test.js.es6 DEV: migrate acceptance tests to async await - invite, login, mobile 2018-07-19 16:38:37 +02:00
mobile-users-test.js.es6 DEV: migrate acceptance tests to async await - invite, login, mobile 2018-07-19 16:38:37 +02:00
modal-test.js.es6 FEATURE: prevent accidental canceling when drafting penalties (#9129) 2020-03-23 16:01:39 -07:00
new-message-test.js.es6 REFACTOR: Test Memory Usage Fixes (#7769) 2019-06-14 14:54:20 +02:00
new-topic-test.js.es6 REFACTOR: Test Memory Usage Fixes (#7769) 2019-06-14 14:54:20 +02:00
password-reset-test.js.es6 DEV: migrate acceptance tests to async/await 2018-07-26 12:51:16 +02:00
personal-message-test.js.es6 FIX: correctly shows suggested topics label (#9017) 2020-02-21 12:35:49 +01:00
plugin-outlet-connector-class-test.js.es6 DEV: Add the @action decorator (#8836) 2020-02-04 11:42:25 +01:00
plugin-outlet-decorator-test.js.es6 FEATURE: adds a new plugin api to decorate plugin outlets (#8937) 2020-02-13 23:44:34 +01:00
plugin-outlet-multi-template-test.js.es6 DEV: migrate acceptance tests to async await - plugin, reports, user, topic 2018-07-19 16:40:12 +02:00
plugin-outlet-single-template-test.js.es6 DEV: migrate acceptance tests to async await - plugin, reports, user, topic 2018-07-19 16:40:12 +02:00
preferences-test.js.es6 FIX: Make dropdown custom user fields compatible with select-kit 2 2020-02-03 13:19:38 -05:00
raw-plugin-outlet-test.js.es6 DEV: migrate acceptance tests to async await - plugin, reports, user, topic 2018-07-19 16:40:12 +02:00
redirect-to-top-test.js.es6 REFACTOR: Test Memory Usage Fixes (#7769) 2019-06-14 14:54:20 +02:00
reports-test.js.es6 fix tests (#7853) 2019-07-03 16:32:27 +02:00
review-test.js.es6 DEV: select-kit 2 (#7998) 2020-02-03 14:22:14 +01:00
search-full-test.js.es6 FIX: Warn users of overwriting new topic draft (#8841) 2020-02-04 09:59:56 -06:00
search-mobile-test.js.es6 UX: Collapse advanced search on mobile when searching. 2019-03-29 08:59:02 +08:00
search-test.js.es6 FIX: Use new tag routes (#8683) 2020-01-21 19:23:08 +02:00
share-and-invite-desktop-test.js.es6 UX: puts back share-panel as floating pane on post actions (#7066) 2019-02-26 14:15:25 +01:00
share-and-invite-mobile-test.js.es6 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
shared-drafts-test.js.es6 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
sign-in-test.js.es6 FEATURE: Webauthn authenticator management with 2FA login (Security Keys) (#8099) 2019-10-01 19:08:41 -07:00
static-test.js.es6 DEV: migrate acceptance tests to async await - plugin, reports, user, topic 2018-07-19 16:40:12 +02:00
tag-groups-test.js.es6 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
tag-hashtag-test.js.es6 FIX: Use new tag routes (#8683) 2020-01-21 19:23:08 +02:00
tags-intersection-test.js.es6 FIX: Use new tag routes (#8683) 2020-01-21 19:23:08 +02:00
tags-test.js.es6 FIX: Use new tag routes (#8683) 2020-01-21 19:23:08 +02:00
topic-anonymous-test.js.es6 FEATURE: Add site setting to show more detailed 404 errors. (#8014) 2019-10-08 14:15:08 +03:00
topic-discovery-test.js.es6 FEATURE: Sync unread state live to topic lists (#7933) 2019-07-29 10:28:42 +01:00
topic-edit-timer-test.js.es6 DEV: select-kit 2 (#7998) 2020-02-03 14:22:14 +01:00
topic-footer-buttons-mobile-test.js.es6 DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
topic-move-posts-test.js.es6 FIX: Styling for feature topic on profile modal (#8727) 2020-01-15 15:20:12 -06:00
topic-notifications-button-test.js.es6 FIX: muted was not working in topic timeline (#9021) 2020-02-21 21:32:58 +01:00
topic-test.js.es6 FIX: correctly shows suggested topics label (#9017) 2020-02-21 12:35:49 +01:00
unknown-test.js.es6 DEV: migrate acceptance tests to async await - plugin, reports, user, topic 2018-07-19 16:40:12 +02:00
user-anonymous-test.js.es6 FIX: Fixed deleted posts layout (#7348) 2019-04-10 19:00:39 +02:00
user-card-mobile-test.js.es6 DEV: Use classes for styling user and group cards (#8913) 2020-02-13 09:58:17 +00:00
user-card-test.js.es6 DEV: Use classes for styling user and group cards (#8913) 2020-02-13 09:58:17 +00:00
user-drafts-stream-test.js.es6 FIX: Warn users of overwriting new topic draft (#8841) 2020-02-04 09:59:56 -06:00
user-test.js.es6 DEV: Respond with error 400 to uploads requested via XHR 2019-06-27 11:30:05 +02:00
users-test.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00