style: 统一页面表单操作左对齐
This commit is contained in:
@@ -29,6 +29,21 @@ afterEach(() => {
|
||||
})
|
||||
|
||||
describe('全站平面主题', () => {
|
||||
it('页面级表单操作统一左对齐,弹窗操作仍保持右对齐', () => {
|
||||
const css = readAllStyles()
|
||||
expect(css).toMatch(
|
||||
/\.page-form-actions\s*\{[^}]*display:\s*flex;[^}]*flex-wrap:\s*wrap;[^}]*align-items:\s*center;[^}]*justify-content:\s*flex-start;[^}]*gap:\s*8px 16px;/
|
||||
)
|
||||
expect(css).toMatch(/\.dialog-footer\s*\{[^}]*justify-content:\s*flex-end;/)
|
||||
for (const file of [
|
||||
'src/features/subject-identity/components/IdentityEditor.vue',
|
||||
'src/features/visual-style/components/StyleEditor.vue',
|
||||
'src/features/generation-config/components/CreativeProfileSettings.vue'
|
||||
]) {
|
||||
expect(readFileSync(file, 'utf8')).toContain('page-form-actions')
|
||||
}
|
||||
})
|
||||
|
||||
it.each([false, true])('模式 %s 的绿色按钮使用白字,禁用后灰底灰字且不可提交', dark => {
|
||||
localStorage.setItem('drama-studio-theme', dark ? 'dark' : 'light')
|
||||
vi.stubGlobal('matchMedia', () => ({ matches: dark, addEventListener() {}, removeEventListener() {} }))
|
||||
|
||||
Reference in New Issue
Block a user