From 27128a5029972d7f0f510e48c2f6e07df7ce151d Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Wed, 24 Mar 2021 21:27:57 +0000 Subject: [PATCH] Use playwright@next (#194) * Use playwright@next * Fix bad snapshots * Fix some bugs --- ..._Rich_text_Can_select_and_delete_a_word.png | Bin 26894 -> 0 bytes package.json | 2 +- .../__tests__/TextEntry-test.js | 12 ++---------- .../src/OutlineSelectionHelpers.js | 17 +++++++++++++++-- yarn.lock | 8 ++++---- 5 files changed, 22 insertions(+), 17 deletions(-) delete mode 100644 BasicTextEntry_Firefox_Rich_text_Can_select_and_delete_a_word.png diff --git a/BasicTextEntry_Firefox_Rich_text_Can_select_and_delete_a_word.png b/BasicTextEntry_Firefox_Rich_text_Can_select_and_delete_a_word.png deleted file mode 100644 index e9d148633dc6f87ad432a3464771f72a10fc4013..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26894 zcmeFacT`i`+CI7v1r-(D3MdHJQL3n*(yb^cAkteAqqno^MC}Qe zP8$wq$IBO(cQiHE9F)k6de-PTB*`jhy{*IG`IW08O-kwZ!tXn*C+B~dAB_0x(9MW7 z0ZQ!-XFjf*m%+}vS29O^KJAZNo*^#z7~&{pYql)wl#GpgXJnu1w9SV{K!1L`_&m(E z`YU2Tb`)8&`nzN$vVQfqA3K@%to~+fvdM4tH@_h9{}VrWcEGW4$F^;6MGcEIEXw_u zUSY%#q#U{^=fRMLtc@XhL)8s|cgpJ%_I!}fa` z&WCIt7#PafkkaX-D8le%LJ-mOE2Ce(3%y$TLI~4Vn2Wtmg$4mno@nUkyk=c}{{i~` zPwm5EVyZ&g8EG0?T3Y3?0zyK{*ArD{dnkN&R<6=&jI2eFc@D=y1509t;REgApnw4N zn>TOf%ANep_02Wb^Ixtp&p7|BSlMYm?tVG;U?G zYE01QBbR2!GEZa^^NI#)Q`6I>7vtIG=F6w7ingxU#Ih%9Lw--! zEq*Y#ZXg;)VET|1Lc(M5nd1^LCl(eKN|!FF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@@ -64,7 +64,7 @@ "google-closure-compiler": "^20201006.0.0", "jest": "26.6.0", "minimist": "^1.2.5", - "playwright": "^1.9.2", + "playwright": "^1.10.0-1616563674000", "prettier": "^2.1.2", "react-test-renderer": "^17.0.1", "rollup": "^2.33.1", diff --git a/packages/outline-playground/__tests__/TextEntry-test.js b/packages/outline-playground/__tests__/TextEntry-test.js index 40f1acc2dbd..1c3f15d6437 100644 --- a/packages/outline-playground/__tests__/TextEntry-test.js +++ b/packages/outline-playground/__tests__/TextEntry-test.js @@ -94,19 +94,11 @@ describe('TextEntry', () => { }); }); - // Some issues with this test: - // - // - Doesn't work correctly on Chromium, Shift+Alt+ArrowLeft + // Test doesn't work correctly on Chromium, Shift+Alt+ArrowLeft // on selects the period the first time, rather than the word // "characters". We plan to use Intl.Segmeneter for this anway // so this should be fixed. - // - // - Also seems to fail for Firefox when run on CI. Not sure why, - // as it seems to work fine when run locally. I can see from the - // screenshot (hint: use e2e.logScreenshot) that the selection - // has moved at all. I can use this keyboard shortcut on - // - e2e.skip(['chromium', 'firefox-ci'], () => { + e2e.skip(['chromium'], () => { it(`Can select and delete a word`, async () => { const {page} = e2e; diff --git a/packages/outline-react/src/OutlineSelectionHelpers.js b/packages/outline-react/src/OutlineSelectionHelpers.js index d8353eba531..9d0d0f24f5a 100644 --- a/packages/outline-react/src/OutlineSelectionHelpers.js +++ b/packages/outline-react/src/OutlineSelectionHelpers.js @@ -730,7 +730,6 @@ export function deleteForward(selection: Selection): void { removeText(selection); return; } - const anchorOffset = selection.anchorOffset; const anchorNode = selection.getAnchorNode(); if (anchorNode === null) { return; @@ -738,7 +737,21 @@ export function deleteForward(selection: Selection): void { const currentBlock = anchorNode.getParentBlockOrThrow(); const textContent = anchorNode.getTextContent(); const textContentLength = textContent.length; - const nextSibling = anchorNode.getNextSibling(); + let nextSibling = anchorNode.getNextSibling(); + let anchorOffset = selection.anchorOffset; + + // If we're dealing with an anchor that is either segmented or immutable + // then we need to ensure that we actually affect the anchor instead. So + // we make the next sibling the anchor to emulate this (less code than + // forking the logic again). + if ( + isTextNode(nextSibling) && + (anchorNode.isImmutable() || anchorNode.isSegmented()) + ) { + nextSibling.select(0, 0); + nextSibling = anchorNode; + anchorOffset = textContentLength; + } if (anchorOffset === textContentLength) { if (nextSibling === null) { diff --git a/yarn.lock b/yarn.lock index d16f62d3dda..52dd2932026 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8456,10 +8456,10 @@ pkg-up@3.1.0: dependencies: find-up "^3.0.0" -playwright@^1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.9.2.tgz#294910950b76ec4c3dfed6a1e9d28e9b8560b0f4" - integrity sha512-Hsgfk3GZO+hgewRNW9xl9/tHjdZvVwxTseHagbiNpDf90PXICEh8UHXy/2eykeIXrZFMA6W6petEtRWNPi3gfQ== +playwright@^1.10.0-1616563674000: + version "1.10.0-1616563674000" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.10.0-1616563674000.tgz#d39eb46611e2065acaef9ab549c03ff318bd535f" + integrity sha512-gYNW3fZg17+k64pv8I4QzSkwOaf5MqxmXFfSo/vzNty1hFcHs9TuE6yQyRvRBB0I4jza+P7lg/tx1GDApoHGEA== dependencies: commander "^6.1.0" debug "^4.1.1"