style: 将工作区操作移入标签页后缀并增强浅色分隔线
This commit is contained in:
1 parent
2ddd9b8009
commit
4229426339
10 files changed
+112
-44
No files matched your search
@@ -829,14 +829,15 @@ describe('工作台页面交互', () => {
|
||||
expect(fetcher.mock.calls.every(([, init]) => init?.method === 'GET')).toBe(true)
|
||||
})
|
||||
|
||||
it('拆解导出按钮紧邻标签栏且保持空快照禁用状态', () => {
|
||||
it('拆解导出按钮位于 Tabs suffix,且保持空快照禁用状态', () => {
|
||||
wrapper = mount(BreakdownPage, {
|
||||
attachTo: document.body,
|
||||
global: { provide: { [projectContextKey as symbol]: context() }, stubs: { RouterLink: true } }
|
||||
})
|
||||
const toolbar = wrapper.get('.result-toolbar')
|
||||
expect(toolbar.find('[aria-label="拆解结果"]').exists()).toBe(true)
|
||||
const exportButton = toolbar.get<HTMLButtonElement>(':scope > button')
|
||||
expect(toolbar.find(':scope > button').exists()).toBe(false)
|
||||
const exportButton = toolbar.get<HTMLButtonElement>('.n-tabs-nav__suffix button')
|
||||
expect(exportButton.text()).toBe('导出 JSON')
|
||||
expect(exportButton.element.disabled).toBe(true)
|
||||
})
|
||||
@@ -1422,6 +1423,9 @@ describe('工作台页面交互', () => {
|
||||
attachTo: document.body,
|
||||
global: { provide: { [projectContextKey as symbol]: context() }, stubs: { RouterLink: true } }
|
||||
})
|
||||
const suffix = wrapper.get('.script-section .n-tabs-nav__suffix')
|
||||
expect(suffix.findAll('button').map(item => item.text())).toEqual(['执行记录', '导出剧本'])
|
||||
expect(suffix.get('router-link-stub').attributes('to')).toBe(`/projects/${fixture.id}/breakdown`)
|
||||
const reader = wrapper.get<HTMLElement>('.reader-scroll .n-scrollbar-container').element
|
||||
reader.scrollTop = 120
|
||||
expect(wrapper.find('.history-panel').exists()).toBe(false)
|
||||
|
||||
Reference in new issue
Block a user