-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into bug/6008-Selection-…
…is-removed-when-changing-style-of-2-different-nodes
- Loading branch information
Showing
19 changed files
with
194 additions
and
118 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...es/lexical-playground/__tests__/e2e/CopyAndPaste/lexical/ContextMenuCopyAndPaste.spec.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
*/ | ||
|
||
import { | ||
assertHTML, | ||
click, | ||
doubleClick, | ||
focusEditor, | ||
html, | ||
initialize, | ||
pasteFromClipboard, | ||
test, | ||
} from '../../../utils/index.mjs'; | ||
|
||
test.describe('ContextMenuCopyAndPaste', () => { | ||
test.use({shouldUseLexicalContextMenu: true}); | ||
test.beforeEach(({isCollab, page, shouldUseLexicalContextMenu}) => | ||
initialize({isCollab, page, shouldUseLexicalContextMenu}), | ||
); | ||
|
||
test('Basic copy-paste #6231', async ({page, isPlainText}) => { | ||
test.skip(isPlainText); | ||
await focusEditor(page); | ||
|
||
await page.keyboard.type('hello'); | ||
await click(page, '.lock'); | ||
|
||
await page.pause(); | ||
await doubleClick(page, 'div[contenteditable="false"] span'); | ||
await page.pause(); | ||
await click(page, 'div[contenteditable="false"] span', {button: 'right'}); | ||
await click(page, '#typeahead-menu [role="option"] :text("Copy")'); | ||
|
||
await click(page, '.unlock'); | ||
await focusEditor(page); | ||
|
||
await pasteFromClipboard(page); | ||
|
||
await assertHTML( | ||
page, | ||
html` | ||
<p | ||
class="PlaygroundEditorTheme__paragraph PlaygroundEditorTheme__ltr" | ||
dir="ltr"> | ||
<span data-lexical-text="true">hellohello</span> | ||
</p> | ||
`, | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.