Skip to content

Commit

Permalink
fix: fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbret committed Jan 3, 2025
1 parent 67a1aec commit 72ad8e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/spineItem/renderer/DocumentRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ export abstract class DocumentRenderer extends DestroyableClass {
if (this.renditionLayout === `pre-paginated`) {
this.lastLayoutDims = {
height: this.context.getPageSize().height,
// width: params.minimumWidth,
width: this.context.getPageSize().width,
width: params.minimumWidth,
}
} else {
this.lastLayoutDims = {
Expand Down
4 changes: 2 additions & 2 deletions packages/tests/tests/prepaginated/layout-spread.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test.describe("Given a prepaginated book with first page on spread right", () =>

await page.waitForSelector(".prose-spineItem-ready")

expect(await page.screenshot()).toMatchSnapshot(`page-spread-right.png`, { threshold: 0.03 })
expect(await page.screenshot()).toMatchSnapshot(`page-spread-right.png`, {})
})

/**
Expand All @@ -34,7 +34,7 @@ test.describe("Given a prepaginated book with first page on spread right", () =>

await waitForSpineItemReady(page, [1, 2])

expect(await page.screenshot()).toMatchSnapshot(`right-navigation-layout.png`, { threshold: 0.03 })
expect(await page.screenshot()).toMatchSnapshot(`right-navigation-layout.png`, {})

const numberOfLayout = await page.evaluate(() => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down

0 comments on commit 72ad8e4

Please sign in to comment.