Privly Seamless-posting Keyboard Forwarding Test File

This file contains a test cases for different circumstances in which the Privly seamless-posting form should correctly forward ENTER keyboard events.

Test cases are intended to be tested automatically.
To test it manually, please click the Privly posting button in each editable element to start seamless-posting mode. Detailed expectations are listed in each test case.

General Test

Tests below simulate circumstances of the specific website. The purpose is to test embed-posting in the real world.

1. Facebook status

You should see submitted when: Command+ENTER (Mac OS), Control+ENTER (Other OS).



2. Facebook chat

You should NOT see submitted when: Shift+ENTER.
You should see submitted when: (Any other)+ENTER.



3. GitHub

GitHub only listens keydown event when the textarea is focused. This test case simulate this circumstance.

You should see submitted when: Command+ENTER or Control+ENTER.



4. Twitter

You should see submitted when: Command+ENTER or Control+ENTER.




Edge Test

Tests below only contain specific environments in which embed-posting once failed. The purpose is to make sure embed-posting really works in those edge cases and doesn't fail again.

5. Live Mail / Baidu Tieba

It once failed because Privly injection functionality tried to parse the Privly link inserted by embed-posting (inside <p> in the contentEditable element) and generated a wrong hyperlink.

You should NOT see seamless-posting form auto closed.




6. Yahoo Mail

It once failed because Yahoo Mail changed it into a hyperlink (which converts & into &amp;).

You should NOT see seamless-posting form auto closed.