mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
display document path instead of file name in the main document settings menu
GitOrigin-RevId: f5e1773b8d20d2ffbfed04c8483c755d0f323cc2
This commit is contained in:
parent
f4455d3e87
commit
52b487e7be
2 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ export default function SettingsDocument() {
|
|||
|
||||
const mappedDocs: Array<Option> = filteredDocs.map(doc => ({
|
||||
value: doc.doc.id,
|
||||
label: doc.doc.name,
|
||||
label: doc.path,
|
||||
}))
|
||||
|
||||
return mappedDocs
|
||||
|
|
|
@ -355,7 +355,7 @@ describe('<EditorLeftMenu />', function () {
|
|||
} as MainDocument['doc'],
|
||||
},
|
||||
{
|
||||
path: 'main2.tex',
|
||||
path: 'folder/main2.tex',
|
||||
doc: {
|
||||
name: 'main2.tex',
|
||||
id: 'id2',
|
||||
|
@ -381,10 +381,10 @@ describe('<EditorLeftMenu />', function () {
|
|||
cy.get<HTMLOptionElement>('#settings-menu-rootDocId option').then(
|
||||
options => {
|
||||
const values = [...options].map(o => o.value)
|
||||
expect(values).to.deep.eq(['id1', 'id2'])
|
||||
expect(values).to.deep.eq(docs.map(doc => doc.doc.id))
|
||||
|
||||
const texts = [...options].map(o => o.text)
|
||||
expect(texts).to.deep.eq(['main.tex', 'main2.tex'])
|
||||
expect(texts).to.deep.eq(docs.map(doc => doc.path))
|
||||
}
|
||||
)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue