mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
adding side menu for download option (#33307)
* adding side menu for download option * fixing the E2E tests to adapt the new behaviour GitOrigin-RevId: d96df4906a40006d36ac0ea525d74a1644ec4085
This commit is contained in:
@@ -140,6 +140,7 @@ describe('editor', function () {
|
|||||||
describe('file menu', function () {
|
describe('file menu', function () {
|
||||||
it('can download project sources', function () {
|
it('can download project sources', function () {
|
||||||
cy.findByRole('button', { name: 'File' }).click()
|
cy.findByRole('button', { name: 'File' }).click()
|
||||||
|
cy.findByRole('link', { name: 'Download' }).click()
|
||||||
cy.findByRole('menuitem', { name: 'Download as source (.zip)' }).click()
|
cy.findByRole('menuitem', { name: 'Download as source (.zip)' }).click()
|
||||||
const zipName = projectName.replaceAll('-', '_')
|
const zipName = projectName.replaceAll('-', '_')
|
||||||
cy.task('readFileInZip', {
|
cy.task('readFileInZip', {
|
||||||
@@ -156,6 +157,7 @@ describe('editor', function () {
|
|||||||
)
|
)
|
||||||
|
|
||||||
cy.findByRole('button', { name: 'File' }).click()
|
cy.findByRole('button', { name: 'File' }).click()
|
||||||
|
cy.findByRole('link', { name: 'Download' }).click()
|
||||||
cy.findByRole('menuitem', { name: 'Download as PDF' }).click()
|
cy.findByRole('menuitem', { name: 'Download as PDF' }).click()
|
||||||
const pdfName = projectName.replaceAll('-', '_')
|
const pdfName = projectName.replaceAll('-', '_')
|
||||||
cy.task('readPdf', `cypress/downloads/${pdfName}.pdf`).should(
|
cy.task('readPdf', `cypress/downloads/${pdfName}.pdf`).should(
|
||||||
|
|||||||
@@ -87,14 +87,24 @@ export const ToolbarMenuBar = () => {
|
|||||||
{ id: 'submit', children: ['submit-project', 'manage-template'] },
|
{ id: 'submit', children: ['submit-project', 'manage-template'] },
|
||||||
{
|
{
|
||||||
id: 'file-download',
|
id: 'file-download',
|
||||||
children: ['download-as-source-zip', 'download-pdf', 'export-as-docx'],
|
children: [
|
||||||
|
{
|
||||||
|
id: 'file-download-group',
|
||||||
|
title: t('download'),
|
||||||
|
children: [
|
||||||
|
'download-as-source-zip',
|
||||||
|
'download-pdf',
|
||||||
|
'export-as-docx',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'settings',
|
id: 'settings',
|
||||||
children: ['open-settings'],
|
children: ['open-settings'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[]
|
[t]
|
||||||
)
|
)
|
||||||
|
|
||||||
const editMenuStructure: MenuStructure = useMemo(
|
const editMenuStructure: MenuStructure = useMemo(
|
||||||
|
|||||||
Reference in New Issue
Block a user