fix: align archived habits on mobile
This commit is contained in:
@@ -228,7 +228,13 @@ describe('mobile list row language', () => {
|
||||
it('provides a minimal archived-habit viewing path', () => {
|
||||
expect(mvpPanel).toContain("request('/habits?archived=true')")
|
||||
expect(mvpPanel).toContain("{{ archivedHabitsLoaded ? `已归档(${archivedHabits.length})` : '已归档' }}")
|
||||
expect(mvpPanel).toContain('class="archived-toggle habit-archive-toggle"')
|
||||
expect(mvpPanel).toContain('v-for="h in archivedHabits"')
|
||||
expect(css).toMatch(/@media\(max-width:930px\)\{\.habit-archive-toggle\{[^}]*width:100%;[^}]*min-height:44px;[^}]*appearance:none;[^}]*background:var\(--surface-raised\);[^}]*border:1px solid var\(--border-cream\)/)
|
||||
expect(css).toMatch(/\.archived-habits\{[^}]*width:100%;[^}]*display:grid/)
|
||||
expect(css).toMatch(/\.archived-habits>button\{[^}]*width:100%;[^}]*min-height:44px;[^}]*appearance:none;[^}]*grid-template-columns:minmax\(0,1fr\) auto;[^}]*background:var\(--surface-raised\);[^}]*border-bottom:1px solid var\(--border-cream\)/)
|
||||
expect(css).toMatch(/\.archived-habits>button span\{[^}]*min-width:0;[^}]*overflow:hidden;[^}]*text-overflow:ellipsis;[^}]*white-space:nowrap/)
|
||||
expect(css).toMatch(/\.archived-habits>button small\{[^}]*white-space:nowrap/)
|
||||
})
|
||||
|
||||
it('reuses the habit composer for edits and patches only changed fields', () => {
|
||||
|
||||
Reference in New Issue
Block a user