mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #14786 from overleaf/td-git-bridge-modal-paywall
Show paywall in Git bridge dialog when appropriate GitOrigin-RevId: c6056c2a24fe5f2026448cd6cef2449057803cea
This commit is contained in:
parent
96ba8a92f4
commit
f4ebe98d91
4 changed files with 38 additions and 0 deletions
|
@ -26,6 +26,7 @@ export const projectShape = {
|
|||
mendeley: PropTypes.bool,
|
||||
zotero: PropTypes.bool,
|
||||
versioning: PropTypes.bool,
|
||||
gitBridge: PropTypes.bool,
|
||||
}),
|
||||
publicAccessLevel: PropTypes.string,
|
||||
owner: PropTypes.shape({
|
||||
|
|
|
@ -23,6 +23,7 @@ UserContext.Provider.propTypes = {
|
|||
zotero: PropTypes.boolean,
|
||||
references: PropTypes.boolean,
|
||||
compileTimeout: PropTypes.number,
|
||||
gitBridge: PropTypes.boolean,
|
||||
}),
|
||||
refProviders: PropTypes.shape({
|
||||
mendeley: PropTypes.boolean,
|
||||
|
|
|
@ -244,6 +244,14 @@ describe('<EditorLeftMenu />', function () {
|
|||
ui: {
|
||||
leftMenuShown: true,
|
||||
},
|
||||
project: {
|
||||
owner: {
|
||||
_id: '123',
|
||||
},
|
||||
features: {
|
||||
gitBridge: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
cy.mount(
|
||||
|
@ -257,6 +265,31 @@ describe('<EditorLeftMenu />', function () {
|
|||
cy.findByText(/your project using the link displayed below/)
|
||||
})
|
||||
|
||||
it('shows git modal paywall correctly', function () {
|
||||
const scope = mockScope({
|
||||
ui: {
|
||||
leftMenuShown: true,
|
||||
},
|
||||
project: {
|
||||
owner: {
|
||||
_id: '123',
|
||||
},
|
||||
features: {
|
||||
gitBridge: false,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
cy.mount(
|
||||
<EditorProviders scope={scope}>
|
||||
<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,
|
||||
|
|
|
@ -23,6 +23,9 @@ type Scope = {
|
|||
owner: {
|
||||
_id: string
|
||||
}
|
||||
features?: {
|
||||
gitBridge?: boolean
|
||||
}
|
||||
}
|
||||
user?: {
|
||||
features?: {
|
||||
|
|
Loading…
Reference in a new issue