Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions react-checkout/e2e/checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ export async function expectNoSidewaysScroll(page: Page, message?: string) {

/**
* Fails when the status line cuts what it holds. The mode, the keys switch and the name of the
* theme are whole and inside it, and its path shows whole or not at all: when it shows, "~…" fits
* in its text box, and the text has as much room before the keys switch as after the mode. It is
* gone only when "~…" and its padding have no room there. Says whether the path showed.
* theme are whole and inside it, and its path shows whole or not at all: when it shows, five
* characters and an ellipsis fit in its text box, and the text has as much room before the keys
* switch as after the mode. It is gone only when those and its padding have no room there. Says
* whether the path showed.
*/
export async function expectStatusLineWhole(page: Page, message?: string) {
const line = await page.locator('.ws-status-line').evaluate((line) => {
Expand Down Expand Up @@ -63,7 +64,7 @@ export async function expectStatusLineWhole(page: Page, message?: string) {
const probe = document.createElement('span')
probe.style.position = 'absolute'
probe.style.font = textStyle.font
probe.textContent = '~…'
probe.textContent = 'xxxxx…'
document.body.append(probe)
const shortest = probe.getBoundingClientRect().width
probe.remove()
Expand Down Expand Up @@ -96,17 +97,19 @@ export async function expectStatusLineWhole(page: Page, message?: string) {
`the status line cuts its end${at}`,
).toBeLessThanOrEqual(0)
if (line.shown) {
expect(line.text, `the path shows a cut glyph${at}`).toBeGreaterThanOrEqual(
line.shortest,
)
expect(
line.text,
`the path shows less than five characters${at}`,
).toBeGreaterThanOrEqual(line.shortest)
expect(
line.after,
`the path runs into the keys switch${at}`,
).toBeGreaterThanOrEqual(line.before)
} else {
expect(line.room, `the path is gone with room for "~…"${at}`).toBeLessThan(
line.needed,
)
expect(
line.room,
`the path is gone with room for five characters${at}`,
).toBeLessThan(line.needed)
}
return line.shown
}
2 changes: 1 addition & 1 deletion react-checkout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@formisch/react": "^1.2.0",
"@hono/node-server": "^2.1.7",
"@valibot/i18n": "^1.3.0",
"@whatsaaaa/design-system": "^0.8.0",
"@whatsaaaa/design-system": "^0.8.1",
"@whatsaaaa/form-builder-affects": "0.2.2-rc.0",
"@whatsaaaa/form-builder-react": "1.0.0-rc.0",
"@whatsaaaa/form-builder-schema": "1.0.0-rc.0",
Expand Down
10 changes: 5 additions & 5 deletions react-checkout/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion react-checkout/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ minimumReleaseAgeExclude:
- '@whatsaaaa/form-builder-schema@1.0.0-rc.0'
- '@whatsaaaa/form-builder-react@1.0.0-rc.0'
- '@whatsaaaa/form-builder-affects@0.2.2-rc.0'
- '@whatsaaaa/design-system@0.8.0'
- '@whatsaaaa/design-system@0.8.1'
21 changes: 12 additions & 9 deletions vue-event-registration/e2e/frame.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ function keysSwitch(page: Page) {

/**
* Fails when the status line cuts what it holds. It fits in the line, and its path shows whole or
* not at all: when it shows, "~…" fits in its text box, and the text has as much room before the
* keys switch as after the mode. It is gone only when "~…" and its padding have no room there.
* not at all: when it shows, five characters and an ellipsis fit in its text box, and the text has
* as much room before the keys switch as after the mode. It is gone only when those and its
* padding have no room there.
*/
async function expectStatusLineWhole(page: Page) {
const line = await page.locator('.ws-status-line').evaluate((line) => {
Expand All @@ -31,7 +32,7 @@ async function expectStatusLineWhole(page: Page) {
const probe = document.createElement('span')
probe.style.position = 'absolute'
probe.style.font = textStyle.font
probe.textContent = '~…'
probe.textContent = 'xxxxx…'
document.body.append(probe)
const shortest = probe.getBoundingClientRect().width
probe.remove()
Expand All @@ -58,17 +59,19 @@ async function expectStatusLineWhole(page: Page) {
})
expect(line.overflow, 'the status line cuts its end').toBeLessThanOrEqual(0)
if (line.shown) {
expect(line.text, 'the path shows a cut glyph').toBeGreaterThanOrEqual(
line.shortest,
)
expect(
line.text,
'the path shows less than five characters',
).toBeGreaterThanOrEqual(line.shortest)
expect(
line.after,
'the path runs into the keys switch',
).toBeGreaterThanOrEqual(line.before)
} else {
expect(line.room, 'the path is gone with room for "~…"').toBeLessThan(
line.needed,
)
expect(
line.room,
'the path is gone with room for five characters',
).toBeLessThan(line.needed)
}
return line.shown
}
Expand Down
2 changes: 1 addition & 1 deletion vue-event-registration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@formisch/vue": "^1.2.0",
"@whatsaaaa/design-system": "^0.8.0",
"@whatsaaaa/design-system": "^0.8.1",
"@whatsaaaa/form-builder-affects": "0.2.2-rc.0",
"@whatsaaaa/form-builder-schema": "1.0.0-rc.0",
"@whatsaaaa/form-builder-vue": "1.0.0-rc.0",
Expand Down
10 changes: 5 additions & 5 deletions vue-event-registration/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vue-event-registration/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ minimumReleaseAgeExclude:
- '@whatsaaaa/form-builder-schema@1.0.0-rc.0'
- '@whatsaaaa/form-builder-vue@1.0.0-rc.0'
- '@whatsaaaa/form-builder-affects@0.2.2-rc.0'
- '@whatsaaaa/design-system@0.8.0'
- '@whatsaaaa/design-system@0.8.1'
Loading