mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-23 05:00:07 +02:00

* Remove hacks that conditionally hid `ds-nav` survey * Remove `getAssignment` of `sidebar-navigation-ui-update` * Remove `hasDsNav`: make it true everywhere * Remove dead code * Update Footer so thin footer is shown in SP/CE * Run `web$ make cleanup_unused_locales` & `bin/run web npm run extract-translations` * [server-pro] fix learn wiki tests following DS navigation changes * [server-pro] tests: remove logout action before switching session * [server-pro] tests: fix logout test * [server-pro] tests: use new css class for sidebar on project dashboard * Revert "should add a documentation entry to the nav bar" test change --------- Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com> GitOrigin-RevId: 93eb7a1b03bb4e54ad1770150d83778b8f7f6727
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import { createMongoUser, ensureUserExists, login } from './helpers/login'
|
|
import { isExcludedBySharding, startWith } from './helpers/config'
|
|
|
|
describe('Accounts', function () {
|
|
if (isExcludedBySharding('CE_DEFAULT')) return
|
|
startWith({})
|
|
ensureUserExists({ email: 'user@example.com' })
|
|
|
|
it('can log in and out', function () {
|
|
login('user@example.com')
|
|
cy.visit('/project')
|
|
cy.findByRole('menuitem', { name: 'Account' }).click()
|
|
cy.findByText('Log Out').click()
|
|
cy.url().should('include', '/login')
|
|
cy.visit('/project')
|
|
cy.url().should('include', '/login')
|
|
})
|
|
|
|
it('should render the email on the user activate screen', () => {
|
|
const email = 'not-activated-user@example.com'
|
|
cy.then(async () => {
|
|
const { url } = await createMongoUser({ email })
|
|
return url
|
|
}).as('url')
|
|
cy.get('@url').then(url => {
|
|
cy.visit(`${url}`)
|
|
cy.url().should('contain', '/user/activate')
|
|
cy.findByText('Please set a password')
|
|
cy.get('input[autocomplete="username"]').should(
|
|
'have.attr',
|
|
'value',
|
|
email
|
|
)
|
|
cy.get('input[name="password"]')
|
|
cy.findByRole('button', { name: 'Activate' })
|
|
})
|
|
})
|
|
})
|