element-web/test
commonlawfeature 08a2d81d6b
Resolve emoji autocomplete not being temporally consistent (#8086)
* Adds a test to demonstrate the issue with emoji autocomplete reported in https://github.com/vector-im/element-web/issues/19302.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Trim trailing `:` when checking for autocompletes for emoji.

Closes https://github.com/vector-im/element-web/issues/19302

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Move all references to the emoji delimiter character to reference a constant.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Revert "Move all references to the emoji delimiter character to reference a constant."

This reverts commit ac09e71e4c6151e35d21f612c9b329ead2a381f1.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Rename variable.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Make the test file a .js file.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Update quotes to match style and make a valid stubbed room.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Fix variable name and test reporting.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Use str.replace with a regex.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Use an improved regex that does not have have to iterate through the entire string, and can just backtrack at most the last 2 characters.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Revert "Use an improved regex that does not have have to iterate through the
entire string, and can just backtrack at most the last 2 characters."

This regex is very efficient, but requires a specific form of the emoji
shortcode that it is not clear is within our control. This is a restriction
that is not required by the technicalities of solving the bug this PR is
attempting to fix. (It requires that an emoji shortcode end with a colon.)

This reverts commit 220cb0efb8de247158c11daf9170464a57cc3af2.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

Co-authored-by: Ryan Browne <code@commonlawfeature.com>
2022-04-14 20:31:50 +00:00
..
__snapshots__ Don't try (and fail) to show replies for redacted events (#8141) 2022-03-24 12:17:42 +00:00
accessibility Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
audio Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
autocomplete Resolve emoji autocomplete not being temporally consistent (#8086) 2022-04-14 20:31:50 +00:00
components Live location sharing - basic maximised beacon map (#8310) 2022-04-14 13:14:05 +00:00
editor Unit test typescriptification - editor utils (#8226) 2022-04-06 12:40:13 +01:00
end-to-end-tests Add a Cypress Test 🌲 (#8295) 2022-04-14 10:41:58 +01:00
i18n Fix languages.json 2017-06-01 21:10:32 +02:00
i18n-test fallback properly with pluralized strings (#7495) 2022-01-10 14:54:57 +01:00
images Add support for Animated (A)PNG (#8158) 2022-03-28 09:38:54 +01:00
img Fix a load of warnings in the tests 2016-10-11 14:20:40 +01:00
notifications Typescriptification - notification utils (#8209) 2022-04-01 08:45:50 +02:00
settings Unit test settings controllers pt 1 (#8155) 2022-03-25 16:50:17 +00:00
setup Step 8.2: Fix wiring of jest test setup to avoid import cycle issues 2022-03-28 14:02:31 -06:00
stores Live location sharing - set replaces relation when stopping beacon (#8266) 2022-04-11 10:28:43 +02:00
test-utils Prevent soft crash around room list header context menu when space changes (#8289) 2022-04-12 14:23:04 +00:00
utils Location sharing - extract isSelfLocation util (#8279) 2022-04-11 13:58:35 +02:00
.eslintrc.js Migrate to eslint-plugin-matrix-org 2021-06-29 12:51:13 +01:00
CallHandler-test.ts Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
createRoom-test.ts Make Jitsi widgets in video rooms immutable (#8244) 2022-04-07 07:34:07 -04:00
DecryptionFailureTracker-test.js Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
DeviceListener-test.ts Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
globalSetup.js Fix TimeZone to be UTC in Jest tests (#7082) 2021-11-04 10:39:49 +00:00
Image-test.ts Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
KeyBindingsManager-test.ts Work towards unifying KeyboardShortcuts and KeyBindingsDefaults #2 (#7674) 2022-01-31 15:55:45 +00:00
languageHandler-test.ts Add support for overriding strings in the app (#7886) 2022-03-01 11:53:09 -07:00
linkify-matrix-test.ts Delete groups (legacy communities system) (#8027) 2022-03-22 23:07:37 +00:00
Markdown-test.ts Fix formatting not being applied after links (#7990) 2022-03-08 13:12:36 +00:00
MatrixClientPeg-test.ts Don't show the prompt to enable desktop notifications immediately after registration (#8274) 2022-04-13 19:05:08 +01:00
PosthogAnalytics-test.ts Replace deprecated String#substr with String#slice (#8314) 2022-04-14 07:52:42 +00:00
Reply-test.ts Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
RoomNotifs-test.ts Include /test in tsc config, fix rest of issues (#8119) 2022-03-23 10:27:28 +00:00
ScalarAuthClient-test.js Auto-fix lint errors 2021-06-29 13:11:58 +01:00
setupTests.js Step 8.2: Fix wiring of jest test setup to avoid import cycle issues 2022-03-28 14:02:31 -06:00
Terms-test.js Mandate use of js-sdk/src/matrix import over js-sdk/src (#7933) 2022-03-01 20:42:05 +00:00
TextForEvent-test.ts Fix export of redacted polls (#8118) 2022-04-11 11:10:16 +02:00
UserActivity-test.ts Typescriptification - notification utils (#8209) 2022-04-01 08:45:50 +02:00