mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
[web] Check adminPrivilegeAvailable to show "Project URL lookup" (#29020)
* Check `adminPrivilegeAvailable` to show "Project URL lookup"
This is the correct check as it's what used to decide if the AdminPanelRouter should be included:
ffa200d595/services/web/modules/admin-panel/index.mjs (L14-L15)
* Add "it displays expected admin menu items" to e2e tests
* Don't expect "Project URL lookup" in CE
* Revert "Don't expect "Project URL lookup" in CE"
This reverts commit 467cccbf6c0d538c386d459403c521e3f62cfee2.
* Make "Project URL Lookup" capitalization consistent
GitOrigin-RevId: ed5c219e9b5912a4c324cf9dce58061b58d911b0
This commit is contained in:
@@ -135,6 +135,24 @@ describe('admin panel', function () {
|
||||
)
|
||||
})
|
||||
|
||||
describe('admin menu items', () => {
|
||||
beforeEach(() => {
|
||||
login(admin)
|
||||
cy.visit('/project')
|
||||
})
|
||||
|
||||
it('displays expected admin menu items', () => {
|
||||
const menuitems = ['Manage Site', 'Manage Users', 'Project URL Lookup']
|
||||
menuitems.forEach(name => {
|
||||
cy.findByRole('menuitem', { name: 'Admin' }).click()
|
||||
cy.get('ul[role="menu"]')
|
||||
.findAllByRole('menuitem')
|
||||
.should('have.length', menuitems.length)
|
||||
cy.get('ul[role="menu"]').findByRole('menuitem', { name }).click()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('manage site', () => {
|
||||
beforeEach(() => {
|
||||
login(admin)
|
||||
|
||||
Reference in New Issue
Block a user