| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898 |
- import EditorLeftMenu from '../../../../frontend/js/features/editor-left-menu/components/editor-left-menu'
- import {
- ImageName,
- OverallThemeMeta,
- SpellCheckLanguage,
- } from '../../../../types/project-settings'
- import {
- EditorProviders,
- makeProjectProvider,
- } from '../../helpers/editor-providers'
- import { mockScope } from './scope'
- import { Folder } from '../../../../types/folder'
- import { docsInFolder } from '@/features/file-tree/util/docs-in-folder'
- import getMeta from '@/utils/meta'
- import { mockProject } from '../../features/source-editor/helpers/mock-project'
- import { UserId } from '../../../../types/user'
- describe('<EditorLeftMenu />', function () {
- beforeEach(function () {
- cy.viewport(800, 800)
- cy.interceptCompile()
- })
- describe('for non-anonymous users', function () {
- const overallThemes: OverallThemeMeta[] = [
- {
- name: 'Overall Theme 1',
- val: '',
- path: 'https://overleaf.com/overalltheme-1.css',
- },
- {
- name: 'Overall Theme 2',
- val: 'light-',
- path: 'https://overleaf.com/overalltheme-2.css',
- },
- ]
- const ImageNames: ImageName[] = [
- {
- imageDesc: 'Image 1',
- imageName: 'img-1',
- allowed: true,
- },
- {
- imageDesc: 'Image 2',
- imageName: 'img-2',
- allowed: true,
- },
- ]
- beforeEach(function () {
- window.metaAttributesCache.set('ol-overallThemes', overallThemes)
- window.metaAttributesCache.set('ol-imageNames', ImageNames)
- window.metaAttributesCache.set('ol-anonymous', false)
- window.metaAttributesCache.set('ol-gitBridgeEnabled', true)
- window.metaAttributesCache.set('ol-showSupport', true)
- Object.assign(getMeta('ol-ExposedSettings'), { ieeeBrandId: 123 })
- window.metaAttributesCache.set('ol-user', {
- email: 'sherlock@holmes.co.uk',
- first_name: 'Sherlock',
- last_name: 'Holmes',
- })
- })
- it('render full menu', function () {
- const scope = mockScope()
- const project = mockProject()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- providers={{ ProjectProvider: makeProjectProvider(project) }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- // Download Menu
- cy.findByRole('heading', { name: 'Download' })
- cy.findByRole('link', { name: 'Source' })
- cy.findByRole('link', { name: 'PDF' })
- // Actions Menu
- cy.findByRole('heading', { name: 'Actions' })
- cy.findByRole('button', { name: 'Copy project' })
- cy.findByRole('button', { name: 'Word Count' })
- // Sync Menu
- cy.findByRole('heading', { name: 'Sync' })
- cy.findByRole('button', { name: 'Dropbox' })
- cy.findByRole('button', { name: 'Git' })
- cy.findByRole('button', { name: 'GitHub' })
- // Settings Menu
- cy.findByRole('heading', { name: 'Settings' })
- cy.findByLabelText('Compiler')
- cy.findByLabelText('TeX Live version')
- cy.findByLabelText('Main document')
- cy.findByLabelText('Spell check')
- cy.findByLabelText('Auto-complete')
- cy.findByLabelText('Auto-close brackets')
- cy.findByLabelText('Code check')
- cy.findByLabelText('Editor theme')
- cy.findByLabelText('Overall theme')
- cy.findByLabelText('Keybindings')
- cy.findByLabelText('Font Size')
- cy.findByLabelText('Font Family')
- cy.findByLabelText('Line Height')
- cy.findByLabelText('PDF Viewer')
- // Help Menu
- cy.findByRole('heading', { name: 'Help' })
- cy.findByRole('button', { name: 'Show Hotkeys' })
- cy.findByRole('link', { name: 'Documentation' })
- cy.findByRole('button', { name: 'Contact us' })
- })
- describe('download menu', function () {
- it('have a correct source & pdf download url', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.findByRole('link', { name: 'Source' }).should(
- 'have.attr',
- 'href',
- '/project/project123/download/zip'
- )
- cy.findByRole('link', { name: 'PDF' })
- .should('have.attr', 'href')
- .and('match', /\/download\/project\/project123\/build/)
- })
- })
- describe('actions menu', function () {
- it('shows copy project modal correctly', function () {
- cy.intercept('POST', '/project/*/clone', {
- body: {
- project_id: 'new_project_id',
- },
- })
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.findByRole('button', { name: 'Copy project' }).click()
- cy.findByRole('heading', { name: 'Copy project' })
- // try closing & re-opening the modal with different methods
- cy.findByRole('button', { name: 'Close dialog' }).click()
- cy.findByRole('button', { name: 'Copy project' }).click()
- cy.findByRole('button', { name: 'Cancel' }).click()
- cy.findByRole('button', { name: 'Copy project' }).click()
- cy.findByLabelText(/New name/i).focus()
- cy.findByLabelText(/New name/i).clear()
- cy.findByLabelText(/New name/i).type('Project Renamed')
- cy.get('#clone-project-form-name[value="Project Renamed"')
- })
- it('shows word count modal correctly', function () {
- cy.intercept('GET', '/project/*/wordcount*', {
- texcount: {
- encode: 'ascii',
- textWords: 781,
- headWords: 66,
- outside: 11,
- headers: 41,
- elements: 2,
- mathInline: 6,
- mathDisplay: 1,
- errors: 0,
- },
- }).as('wordCount')
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.findByRole('button', { name: 'Word Count' }).click()
- cy.wait('@wordCount')
- cy.findByText('Total Words:')
- cy.findByText('781')
- cy.findByText('Headers:')
- cy.findByText('41')
- cy.findByText('Math Inline:')
- cy.findByText('6')
- cy.findByText('Math Display:')
- cy.findByText('1')
- })
- })
- describe('sync menu', function () {
- it('shows dropbox modal correctly', function () {
- cy.intercept('GET', '/dropbox/status', {
- registered: true,
- })
- const scope = mockScope({
- user: {
- features: {
- dropbox: false,
- },
- },
- })
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- projectOwner={{
- _id: '123' as UserId,
- email: 'owner@example.com',
- first_name: 'Test',
- last_name: 'Owner',
- privileges: 'owner',
- signUpDate: new Date('2025-07-07').toISOString(),
- }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.findByRole('button', { name: 'Dropbox' }).click()
- cy.findByText('Dropbox Sync')
- })
- it('shows git modal correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- projectOwner={{
- _id: '123' as UserId,
- email: 'owner@example.com',
- first_name: 'Test',
- last_name: 'Owner',
- privileges: 'owner',
- signUpDate: new Date('2025-07-07').toISOString(),
- }}
- projectFeatures={
- {
- gitBridge: true,
- } as any
- }
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.findByRole('button', { name: 'Git' }).click()
- cy.findByText('Clone with Git')
- cy.findByText(/clone your project by using the link below/)
- })
- it('shows git modal paywall correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- projectOwner={{
- _id: '123' as UserId,
- email: 'owner@example.com',
- first_name: 'Test',
- last_name: 'Owner',
- privileges: 'owner',
- signUpDate: new Date('2025-07-07').toISOString(),
- }}
- projectFeatures={
- {
- gitBridge: false,
- } as any
- }
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.findByRole('button', { name: 'Git' }).click()
- cy.findByText('Collaborate online and offline, using your own workflow')
- })
- it('shows github modal correctly', function () {
- cy.intercept('GET', '/user/github-sync/status', {
- available: false,
- enabled: false,
- }).as('user-status')
- cy.intercept('GET', '/project/*/github-sync/status', {
- enabled: false,
- }).as('project-status')
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.wait('@compile')
- cy.findByRole('button', { name: 'GitHub' }).click()
- cy.findByText('GitHub Sync')
- cy.wait(['@user-status', '@project-status'])
- cy.findByText('Push to GitHub, pull to Overleaf')
- })
- it('hides the entire sync section when git bridge is disabled', function () {
- window.metaAttributesCache.set('ol-gitBridgeEnabled', false)
- cy.findByRole('button', { name: 'Dropbox' }).should('not.exist')
- cy.findByRole('button', { name: 'Git' }).should('not.exist')
- cy.findByRole('button', { name: 'GitHub' }).should('not.exist')
- })
- })
- describe('settings menu', function () {
- it('shows compiler menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-compiler option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq([
- 'pdflatex',
- 'latex',
- 'xelatex',
- 'lualatex',
- ])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq([
- 'pdfLaTeX',
- 'LaTeX',
- 'XeLaTeX',
- 'LuaLaTeX',
- ])
- }
- )
- })
- it('shows texlive version menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-imageName option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['img-1', 'img-2'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(['Image 1', 'Image 2'])
- }
- )
- })
- it('shows document menu correctly', function () {
- const rootFolder: Folder = {
- _id: 'root-folder-id',
- name: 'rootFolder',
- docs: [
- {
- _id: 'id1',
- name: 'main.tex',
- },
- {
- _id: 'id2',
- name: 'main2.tex',
- },
- ],
- fileRefs: [],
- folders: [],
- }
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- layoutContext={{ leftMenuShown: true }}
- scope={scope}
- rootFolder={[rootFolder as any]}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- const docs = docsInFolder(rootFolder)
- cy.get<HTMLOptionElement>('#settings-menu-rootDocId option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(docs.map(doc => doc.doc.id))
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(docs.map(doc => doc.path))
- }
- )
- })
- it('shows spellcheck menu correctly', function () {
- const languages: SpellCheckLanguage[] = [
- {
- name: 'Lang 1',
- code: 'lang-1',
- dic: 'lang_1',
- },
- {
- name: 'Lang 2',
- code: 'lang-2',
- dic: 'lang_2',
- },
- ]
- window.metaAttributesCache.set('ol-languages', languages)
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>(
- '#settings-menu-spellCheckLanguage option'
- ).then(options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['', 'lang-1', 'lang-2'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(['Off', 'Lang 1', 'Lang 2'])
- })
- })
- it('shows dictionary modal correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get('label[for="dictionary-settings"] ~ button').click()
- cy.findByText('Edit Dictionary')
- cy.findByText('Your custom dictionary is empty.')
- })
- it('shows auto-complete menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-autoComplete option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['true', 'false'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(['On', 'Off'])
- }
- )
- })
- it('shows auto-close brackets menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>(
- '#settings-menu-autoPairDelimiters option'
- ).then(options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['true', 'false'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(['On', 'Off'])
- })
- })
- it('shows code check menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>(
- '#settings-menu-syntaxValidation option'
- ).then(options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['true', 'false'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(['On', 'Off'])
- })
- })
- it('shows editor theme menu correctly', function () {
- const editorThemes = ['editortheme-1', 'editortheme-2', 'editortheme-3']
- const legacyEditorThemes = [
- 'legacytheme-1',
- 'legacytheme-2',
- 'legacytheme-3',
- ]
- window.metaAttributesCache.set('ol-editorThemes', editorThemes)
- window.metaAttributesCache.set(
- 'ol-legacyEditorThemes',
- legacyEditorThemes
- )
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-editorTheme option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq([
- 'editortheme-1',
- 'editortheme-2',
- 'editortheme-3',
- '-',
- 'legacytheme-1',
- 'legacytheme-2',
- 'legacytheme-3',
- ])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq([
- 'editortheme-1',
- 'editortheme-2',
- 'editortheme-3',
- '—————————————————',
- 'legacytheme-1 (Legacy)',
- 'legacytheme-2 (Legacy)',
- 'legacytheme-3 (Legacy)',
- ])
- }
- )
- })
- it('shows overall theme menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-overallTheme option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['', 'light-'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(['Overall Theme 1', 'Overall Theme 2'])
- }
- )
- })
- it('shows keybindings menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-mode option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['default', 'vim', 'emacs'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(['None', 'Vim', 'Emacs'])
- }
- )
- })
- it('shows font size menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-fontSize option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq([
- '10',
- '11',
- '12',
- '13',
- '14',
- '16',
- '18',
- '20',
- '22',
- '24',
- ])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq([
- '10px',
- '11px',
- '12px',
- '13px',
- '14px',
- '16px',
- '18px',
- '20px',
- '22px',
- '24px',
- ])
- }
- )
- })
- it('shows font family menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-fontFamily option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['monaco', 'lucida', 'opendyslexicmono'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq([
- 'Monaco / Menlo / Consolas',
- 'Lucida / Source Code Pro',
- 'OpenDyslexic Mono',
- ])
- }
- )
- })
- it('shows line height menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-lineHeight option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['compact', 'normal', 'wide'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(['Compact', 'Normal', 'Wide'])
- }
- )
- })
- it('shows pdf viewer menu correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.get<HTMLOptionElement>('#settings-menu-pdfViewer option').then(
- options => {
- const values = [...options].map(o => o.value)
- expect(values).to.deep.eq(['pdfjs', 'native'])
- const texts = [...options].map(o => o.text)
- expect(texts).to.deep.eq(['Overleaf', 'Browser'])
- }
- )
- })
- })
- describe('help menu', function () {
- it('shows hotkeys modal correctly', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.findByRole('button', { name: 'Show Hotkeys' }).click()
- cy.findByText('Hotkeys')
- })
- it('shows correct url for documentation', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.findByRole('link', { name: 'Documentation' }).should(
- 'have.attr',
- 'href',
- '/learn'
- )
- })
- it('shows correct contact us modal', function () {
- const scope = mockScope()
- cy.mount(
- <EditorProviders
- scope={scope}
- layoutContext={{ leftMenuShown: true }}
- >
- <EditorLeftMenu />
- </EditorProviders>
- )
- cy.findByRole('button', { name: 'Contact us' }).click()
- cy.findByText('Affected project URL (Optional)')
- })
- })
- })
- describe('for anonymous users', function () {
- it('render minimal menu', function () {
- const scope = mockScope()
- window.metaAttributesCache.set('ol-anonymous', true)
- Object.assign(getMeta('ol-ExposedSettings'), { ieeeBrandId: 123 })
- cy.mount(
- <EditorProviders scope={scope} layoutContext={{ leftMenuShown: true }}>
- <EditorLeftMenu />
- </EditorProviders>
- )
- // Download Menu
- cy.findByRole('heading', { name: 'Download' })
- cy.findByRole('link', { name: 'Source' })
- cy.findByRole('link', { name: 'PDF' })
- // Actions Menu
- cy.findByRole('heading', { name: 'Actions' }).should('not.exist')
- cy.findByRole('button', { name: 'Copy project' }).should('not.exist')
- cy.findByRole('button', { name: 'Word Count' }).should('not.exist')
- // Sync Menu
- cy.findByRole('heading', { name: 'Sync' }).should('not.exist')
- cy.findByRole('button', { name: 'Dropbox' }).should('not.exist')
- cy.findByRole('button', { name: 'Git' }).should('not.exist')
- cy.findByRole('button', { name: 'GitHub' }).should('not.exist')
- // Settings Menu
- cy.findByRole('heading', { name: 'Settings' }).should('not.exist')
- cy.findByLabelText('Compiler').should('not.exist')
- cy.findByLabelText('TeX Live version').should('not.exist')
- cy.findByLabelText('Main document').should('not.exist')
- cy.findByLabelText('Spell check').should('not.exist')
- cy.findByLabelText('Auto-complete').should('not.exist')
- cy.findByLabelText('Auto-close brackets').should('not.exist')
- cy.findByLabelText('Code check').should('not.exist')
- cy.findByLabelText('Editor theme').should('not.exist')
- cy.findByLabelText('Overall theme').should('not.exist')
- cy.findByLabelText('Keybindings').should('not.exist')
- cy.findByLabelText('Font Size').should('not.exist')
- cy.findByLabelText('Font Family').should('not.exist')
- cy.findByLabelText('Line Height').should('not.exist')
- cy.findByLabelText('PDF Viewer').should('not.exist')
- // Help Menu
- cy.findByRole('heading', { name: 'Help' })
- cy.findByRole('button', { name: 'Show Hotkeys' })
- cy.findByRole('button', { name: 'Documentation' }).should('not.exist')
- cy.findByRole('link', { name: 'Contact us' }).should('not.exist')
- })
- })
- })
|