display document path instead of file name in the main document settings menu

GitOrigin-RevId: f5e1773b8d20d2ffbfed04c8483c755d0f323cc2
This commit is contained in:
Ilkin Ismailov 2023-08-23 14:14:19 +03:00 committed by Copybot
parent f4455d3e87
commit 52b487e7be
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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))
}
)
})