Merge pull request #32936 from overleaf/mj-ce-themes

[web] Enable changing overall themes in SP/CE

GitOrigin-RevId: a6aa35e40826faec1001b658603b9f1cc8b0a50d
This commit is contained in:
Mathias Jakobsen
2026-04-20 16:07:56 +01:00
committed by Copybot
parent 628e05a278
commit 32255a4e6f
8 changed files with 47 additions and 26 deletions

View File

@@ -295,6 +295,26 @@ describe('editor', function () {
})
})
})
describe('theming', function () {
it('can change overall theme in settings menu', function () {
cy.findByRole('button', { name: 'Settings' }).click()
cy.findByRole('dialog').within(() => {
cy.findByRole('tab', { name: 'Appearance' }).click()
cy.findByLabelText('Overall theme').select('Dark')
})
cy.get('body').should('have.attr', 'data-theme', 'default')
cy.get('body').type('{esc}')
cy.findByRole('button', { name: 'Settings' }).click()
cy.findByRole('dialog').within(() => {
cy.findByRole('tab', { name: 'Appearance' }).click()
cy.findByLabelText('Overall theme').select('Light')
})
cy.get('body').should('have.attr', 'data-theme', 'light')
cy.get('body').type('{esc}')
})
})
})
function createRandomLetterString() {

View File

@@ -113,5 +113,13 @@ describe('Project List', function () {
cy.findByRole('button', { name: `Select tag ${tagName}` }).click()
cy.findByRole('link', { name: nonTaggedProjectName }).should('not.exist')
})
it('can change theme from the account menu', function () {
cy.findByRole('menuitem', { name: 'Account' }).click()
cy.findByLabelText('Dark').click()
cy.get('body').should('have.attr', 'data-theme', 'default')
cy.findByLabelText('Light').click()
cy.get('body').should('have.attr', 'data-theme', 'light')
})
})
})