discourse/plugins/chat/spec
Joffrey JAFFEUX 6cd4b8de6d
FIX: long press chat message test failure (#23791)
This commit brings two fixes.

- increase the delay to trigger the action menu

- check of user activation before using vibrate:

https://developer.mozilla.org/en-US/docs/Glossary/Sticky_activation
https://developer.mozilla.org/en-US/docs/Web/Security/User_activation
https://developer.mozilla.org/en-US/docs/Web/API/UserActivation/hasBeenActive

> Sticky activation is a window state that indicates a user has pressed a button, moved a mouse, used a menu, or performed some other user interaction. It is not reset after it has been set initially (unlike transient activation).
> APIs that require sticky activation (not exhaustive):
> - Navigator.vibrate()
> - VirtualKeyboard.show()
> - Autoplay of Media and Web Audio APIs (in particular for AudioContexts).


Before this fix, we could end up with this error in the console in tests:

> Blocked call to navigator.vibrate because user hasn't tapped on the frame or any embedded 

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2023-10-05 10:16:13 +02:00
..
components/chat DEV: Migrate Chat::MessageCreator to a service (#22390) 2023-09-07 08:57:29 +02:00
fabricators FEATURE: add outgoing web hooks for Chat messages 2023-09-13 17:31:42 -03:00
integration FEATURE: add outgoing web hooks for Chat messages 2023-09-13 17:31:42 -03:00
jobs FEATURE: Link chat notifications directly to message (#23617) 2023-09-16 20:37:35 +01:00
lib Revert "FEATURE: Add chat message notifications for personal chats (#23307)" (#23559) 2023-09-13 19:33:22 +08:00
mailers DEV: Migrate Chat::MessageCreator to a service (#22390) 2023-09-07 08:57:29 +02:00
models FIX: ensures an empty last message won't cause errors (#23647) 2023-09-25 12:43:04 +02:00
policies/chat/channel DEV: Migrate Chat::MessageCreator to a service (#22390) 2023-09-07 08:57:29 +02:00
queries/chat FEATURE: thread pagination (#22624) 2023-07-27 09:57:03 +02:00
requests DEV: removes the notion of staged thread (#23612) 2023-09-15 18:09:45 +02:00
serializer FEATURE: implements user based sidebar mode (#23078) 2023-08-18 20:33:07 +02:00
services DEV: enforces system user membership (#23771) 2023-10-04 17:03:23 +02:00
support FEATURE: Show unread in sidebar for unread channel threads (#22342) 2023-07-17 13:00:49 +10:00
system FIX: long press chat message test failure (#23791) 2023-10-05 10:16:13 +02:00
validators DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
plugin_helper.rb DEV: Migrate Chat::MessageCreator to a service (#22390) 2023-09-07 08:57:29 +02:00
plugin_spec.rb DEV: Refactor chat oneboxes (#23031) 2023-09-04 16:55:02 +02:00