Browse Source

test: update cases for page content search

Junyi 3 years ago
parent
commit
b8bb5c9dc6
2 changed files with 3 additions and 3 deletions
  1. 1 1
      e2e-tests/page-search.spec.ts
  2. 2 2
      src/test/frontend/util/text_test.cljs

+ 1 - 1
e2e-tests/page-search.spec.ts

@@ -39,7 +39,7 @@ import { IsMac, createRandomPage, newBlock, newInnerBlock, randomString, lastBlo
 
   await page.waitForTimeout(500)
   const results = await page.$$('#ui__ac-inner>div')
-  expect(results.length).toEqual(3) // 2 blocks + 1 page
+  expect(results.length).toEqual(5) // 2 blocks + 1 page + 2 page content
   await page.keyboard.press("Escape")
   await page.keyboard.press("Escape")
 })

+ 2 - 2
src/test/frontend/util/text_test.cljs

@@ -77,10 +77,10 @@
     ["prop" "" "value"]
     (text-util/cut-by "prop::value" "::" "")
 
-    ["some" "content" "here"]
+    ["some " "content" " here"]
     (text-util/cut-by "some $pfts>$content$pfts<$ here" "$pfts>$" "$pfts<$")
 
-    ["some" "content$pft" nil]
+    ["some " "content$pft" nil]
     (text-util/cut-by "some $pfts>$content$pft" "$pfts>$" "$pfts<$")
 
     ["some $pf" nil nil]