2021-01-21 07:22:28 -05:00
|
|
|
import sinon from 'sinon'
|
|
|
|
|
|
|
|
export function setupContext() {
|
|
|
|
window.project_id = '1234'
|
2021-02-17 05:05:33 -05:00
|
|
|
window.user = {
|
|
|
|
id: 'fake_user'
|
|
|
|
}
|
2021-01-21 07:22:28 -05:00
|
|
|
let $scope = {}
|
|
|
|
if (window._ide) {
|
2021-03-04 09:22:58 -05:00
|
|
|
$scope = {
|
|
|
|
...window._ide.$scope,
|
|
|
|
project: {},
|
|
|
|
$watch: () => {},
|
|
|
|
ui: {
|
|
|
|
chatOpen: true
|
|
|
|
}
|
|
|
|
}
|
2021-01-21 07:22:28 -05:00
|
|
|
}
|
|
|
|
window._ide = {
|
|
|
|
...window._ide,
|
|
|
|
$scope,
|
|
|
|
socket: {
|
|
|
|
on: sinon.stub(),
|
|
|
|
removeListener: sinon.stub()
|
|
|
|
}
|
|
|
|
}
|
2021-03-31 05:58:33 -04:00
|
|
|
window.ExposedSettings = window.ExposedSettings || {}
|
|
|
|
window.ExposedSettings.gitBridgePublicBaseUrl = 'https://git.stories.com'
|
2021-01-21 07:22:28 -05:00
|
|
|
}
|