test(web): expect the wider fold preview in the page card replay
This commit is contained in:
1 parent
7a58410d66
commit
00efaf376d
6 files changed
+9
-6
No files matched your search
@@ -75,7 +75,10 @@ describe('creation recommendation after an explicit wish', () => {
|
||||
const compactHeight = await plan.evaluate(element => element.clientHeight)
|
||||
const previewText = await plan.innerText()
|
||||
expect(previewText.endsWith('…')).toBe(true)
|
||||
expect(Array.from(new Intl.Segmenter(undefined, { granularity: 'grapheme' }).segment(previewText))).toHaveLength(81)
|
||||
// The preview keeps about 260 Latin-letter widths before the ellipsis; a trailing space may be trimmed.
|
||||
const previewLength = Array.from(new Intl.Segmenter(undefined, { granularity: 'grapheme' }).segment(previewText)).length
|
||||
expect(previewLength).toBeGreaterThan(200)
|
||||
expect(previewLength).toBeLessThanOrEqual(261)
|
||||
await expand.click()
|
||||
expect(await plan.evaluate(element => element.clientHeight)).toBeGreaterThan(compactHeight)
|
||||
expect(await card.getByRole('button', { name: 'Create', exact: true }).isEnabled()).toBe(true)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- text: Personalized pages
|
||||
- button "How creation works and token usage"
|
||||
- strong: Counter
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled…"
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled Today’s achievements in the right sidebar. Controls: Increment and reset buttons beside the current value. Storage: Save changes in browser storage across navigation and refresh.…"
|
||||
- button "View full plan"
|
||||
- text: Add to
|
||||
- 'button "Add to: Write your own"': Write your own
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
- button "How creation works and token usage"
|
||||
- status: Dismissed
|
||||
- strong: Counter
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled…"
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled Today’s achievements in the right sidebar. Controls: Increment and reset buttons beside the current value. Storage: Save changes in browser storage across navigation and refresh.…"
|
||||
- button "View full plan"
|
||||
- paragraph: Add to · Session tab
|
||||
@@ -7,7 +7,7 @@
|
||||
- strong: Creation may take a while and use a large number of tokens.
|
||||
- paragraph: Click Create to start in the background. You can keep chatting here.
|
||||
- strong: Counter
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled…"
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled Today’s achievements in the right sidebar. Controls: Increment and reset buttons beside the current value. Storage: Save changes in browser storage across navigation and refresh.…"
|
||||
- button "View full plan"
|
||||
- text: Add to
|
||||
- 'button "Add to: Right sidebar"': Right sidebar
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- strong: Creation may take a while and use a large number of tokens.
|
||||
- paragraph: Click Create to start in the background. You can keep chatting here.
|
||||
- strong: Counter
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled…"
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled Today’s achievements in the right sidebar. Controls: Increment and reset buttons beside the current value. Storage: Save changes in browser storage across navigation and refresh.…"
|
||||
- button "View full plan"
|
||||
- text: Add to
|
||||
- 'button "Add to: Right sidebar"': Right sidebar
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- text: Personalized pages
|
||||
- button "How creation works and token usage"
|
||||
- strong: Counter
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled…"
|
||||
- paragraph: "Need: Keep a small counter visible across conversations. Location: A card titled Today’s achievements in the right sidebar. Controls: Increment and reset buttons beside the current value. Storage: Save changes in browser storage across navigation and refresh.…"
|
||||
- button "View full plan"
|
||||
- text: Add to
|
||||
- 'button "Add to: Session tab"': Session tab
|
||||
|
||||
Reference in new issue
Block a user