mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-23 02:55:13 -04:00
835c60071d
* git-bridge-modal react component and stories * added react git-bridge-modal to angular tree GitOrigin-RevId: cf883b776a9ddc7975977534dc453ece4b3ec431
29 lines
577 B
JavaScript
29 lines
577 B
JavaScript
import sinon from 'sinon'
|
|
|
|
export function setupContext() {
|
|
window.project_id = '1234'
|
|
window.user = {
|
|
id: 'fake_user'
|
|
}
|
|
let $scope = {}
|
|
if (window._ide) {
|
|
$scope = {
|
|
...window._ide.$scope,
|
|
project: {},
|
|
$watch: () => {},
|
|
ui: {
|
|
chatOpen: true
|
|
}
|
|
}
|
|
}
|
|
window._ide = {
|
|
...window._ide,
|
|
$scope,
|
|
socket: {
|
|
on: sinon.stub(),
|
|
removeListener: sinon.stub()
|
|
}
|
|
}
|
|
window.ExposedSettings = window.ExposedSettings || {}
|
|
window.ExposedSettings.gitBridgePublicBaseUrl = 'https://git.stories.com'
|
|
}
|