fix: widen Today on desktop
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { APIRequestContext } from '@playwright/test'
|
||||
import { expect, test } from './fixtures'
|
||||
|
||||
const widths = [721, 720, 390, 375]
|
||||
const widths = [1440, 721, 720, 390, 375]
|
||||
|
||||
async function csrf(request: APIRequestContext) {
|
||||
const state = await request.storageState()
|
||||
@@ -50,8 +50,8 @@ test('Today plain-list layout matches the approved responsive geometry', async (
|
||||
}
|
||||
})).toEqual({
|
||||
media720: width <= 720,
|
||||
contentWidth: width === 721 ? 630 : width - 58,
|
||||
environmentHeight: width === 721 ? 55 : width === 375 ? 90 : 93,
|
||||
contentWidth: width >= 1440 ? 900 : width === 721 ? 630 : width - 58,
|
||||
environmentHeight: width >= 721 ? 55 : width === 375 ? 90 : 93,
|
||||
})
|
||||
await expect(taskRowLocator).toHaveCount(1)
|
||||
await expect(habitRowLocator).toHaveCount(1)
|
||||
@@ -188,9 +188,9 @@ test('Today plain-list layout matches the approved responsive geometry', async (
|
||||
expect(metrics.styles.filterBorderRadius).toBe('0px')
|
||||
expect(metrics.styles.fabShadow).toContain('8px 18px')
|
||||
expect(metrics.styles.fabIconWidth).toBeCloseTo(30, 0)
|
||||
if (width === 721) {
|
||||
if (width >= 721) {
|
||||
expect(metrics.uniqueRows).toHaveLength(1)
|
||||
expect(metrics.content.width).toBeCloseTo(630, 0)
|
||||
expect(metrics.content.width).toBeCloseTo(width >= 1440 ? 900 : 630, 0)
|
||||
expect(metrics.environment.height).toBeLessThanOrEqual(72)
|
||||
expect(metrics.styles.titleFontSize).toBe('34px')
|
||||
} else {
|
||||
@@ -207,8 +207,8 @@ test('Today plain-list layout matches the approved responsive geometry', async (
|
||||
}
|
||||
}
|
||||
if (width >= 721) {
|
||||
expect(metrics.content.width).toBeLessThanOrEqual(721)
|
||||
expect(Math.abs(metrics.content.left - (width - metrics.content.width) / 2)).toBeLessThanOrEqual(2)
|
||||
expect(metrics.content.width).toBeLessThanOrEqual(width >= 1440 ? 900 : 721)
|
||||
expect(Math.abs(metrics.content.left - (metrics.main.left + (metrics.main.width - metrics.content.width) / 2))).toBeLessThanOrEqual(2)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -59,6 +59,8 @@ describe('Today environment integration', () => {
|
||||
expect(app).toContain("'today-active': activeView==='today'")
|
||||
expect(css).toContain('.shell.today-active .unified-fab{box-shadow:0 8px 18px rgba(174,65,29,.22)}')
|
||||
expect(css).not.toContain('\n.unified-fab{box-shadow:0 8px 18px rgba(174,65,29,.22)}')
|
||||
expect(css).toContain('main.today-main{padding-left:max(44px,calc((100% - 900px)/2));padding-right:max(44px,calc((100% - 900px)/2))}')
|
||||
expect(css).toContain('@media(max-width:930px){main.today-main{padding-left:max(44px,calc((100% - 630px)/2));padding-right:max(44px,calc((100% - 630px)/2))}}')
|
||||
expect(css).toContain('@media(max-width:720.98px){main.today-main{padding-left:29px!important;padding-right:29px!important}')
|
||||
expect(css).toContain('.today-context{margin:0 0 14px;border-bottom:0}')
|
||||
expect(css).toContain('.today-remaining{margin:0 0 24px;color:var(--muted);font-size:13px}')
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user