mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
[CE/SP] Fix default footer (#28947)
* [CE/SP] Fix default footer Fixes the default `right_footer`. Only 'text' should be defined when it contains HTML code. * Remove font-awesome github icon * Added acceptance test GitOrigin-RevId: 1a1ba04673f35affcec4bb17bc7cd860d589b13f
This commit is contained in:
@@ -2,25 +2,39 @@ import { isExcludedBySharding, startWith } from './helpers/config'
|
|||||||
|
|
||||||
describe('Customization', () => {
|
describe('Customization', () => {
|
||||||
if (isExcludedBySharding('CE_CUSTOM_1')) return
|
if (isExcludedBySharding('CE_CUSTOM_1')) return
|
||||||
startWith({
|
|
||||||
vars: {
|
describe('default settings', () => {
|
||||||
OVERLEAF_APP_NAME: 'CUSTOM APP NAME',
|
startWith({})
|
||||||
OVERLEAF_LEFT_FOOTER: JSON.stringify([{ text: 'CUSTOM LEFT FOOTER' }]),
|
|
||||||
OVERLEAF_RIGHT_FOOTER: JSON.stringify([{ text: 'CUSTOM RIGHT FOOTER' }]),
|
it('should display the default right footer', () => {
|
||||||
},
|
cy.visit('/')
|
||||||
|
cy.get('footer').findByRole('link', { name: 'Fork on GitHub!' })
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should display custom name', () => {
|
describe('custom settings', () => {
|
||||||
cy.visit('/')
|
startWith({
|
||||||
cy.get('nav').findByText('CUSTOM APP NAME')
|
vars: {
|
||||||
})
|
OVERLEAF_APP_NAME: 'CUSTOM APP NAME',
|
||||||
|
OVERLEAF_LEFT_FOOTER: JSON.stringify([{ text: 'CUSTOM LEFT FOOTER' }]),
|
||||||
|
OVERLEAF_RIGHT_FOOTER: JSON.stringify([
|
||||||
|
{ text: 'CUSTOM RIGHT FOOTER' },
|
||||||
|
]),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
it('should display custom left footer', () => {
|
it('should display custom name', () => {
|
||||||
cy.visit('/')
|
cy.visit('/')
|
||||||
cy.get('footer').findByText('CUSTOM LEFT FOOTER')
|
cy.get('nav').findByText('CUSTOM APP NAME')
|
||||||
})
|
})
|
||||||
it('should display custom right footer', () => {
|
|
||||||
cy.visit('/')
|
it('should display custom left footer', () => {
|
||||||
cy.get('footer').findByText('CUSTOM RIGHT FOOTER')
|
cy.visit('/')
|
||||||
|
cy.get('footer').findByText('CUSTOM LEFT FOOTER')
|
||||||
|
})
|
||||||
|
it('should display custom right footer', () => {
|
||||||
|
cy.visit('/')
|
||||||
|
cy.get('footer').findByText('CUSTOM RIGHT FOOTER')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -778,8 +778,7 @@ module.exports = {
|
|||||||
|
|
||||||
right_footer: [
|
right_footer: [
|
||||||
{
|
{
|
||||||
text: "<i class='fa fa-github-square'></i> Fork on GitHub!",
|
text: '<a href="https://github.com/overleaf/overleaf">Fork on GitHub!</a>',
|
||||||
url: 'https://github.com/overleaf/overleaf',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user