overleaf/services/web/test/acceptance/config/settings.test.defaults.js
Jakob Ackermann 63520c7076 Merge pull request #16859 from overleaf/jpa-sharelatex-cleanup
[misc] ShareLaTeX cleanup - high impact

GitOrigin-RevId: 6dcce9b0f15e30f7afcf6d69c3df36a369f38120
2024-02-09 09:04:11 +00:00

274 lines
5.3 KiB
JavaScript

const { merge } = require('@overleaf/settings/merge')
let features
const httpAuthUser = 'overleaf'
const httpAuthPass = 'password'
const httpAuthUsers = {}
httpAuthUsers[httpAuthUser] = httpAuthPass
module.exports = {
catchErrors: false,
clsiCookie: undefined,
cacheStaticAssets: true,
httpAuthUsers,
secureCookie: false,
security: {
sessionSecret: 'static-secret-for-tests',
},
adminDomains: process.env.ADMIN_DOMAINS
? JSON.parse(process.env.ADMIN_DOMAINS)
: ['example.com'],
statusPageUrl: 'status.example.com',
cdn: {
web: {
host: 'cdn.example.com',
},
},
mongo: {
options: {
family: 4,
},
},
apis: {
linkedUrlProxy: {
url: process.env.LINKED_URL_PROXY,
},
web: {
url: 'http://localhost:23000',
user: httpAuthUser,
pass: httpAuthPass,
},
haveIBeenPwned: {
enabled: false,
url: 'http://localhost:1337',
},
documentupdater: {
url: 'http://localhost:23003',
},
spelling: {
url: 'http://localhost:23005',
host: 'localhost',
},
docstore: {
url: 'http://localhost:23016',
pubUrl: 'http://localhost:23016',
},
chat: {
internal_url: 'http://localhost:23010',
},
filestore: {
url: 'http://localhost:23009',
},
clsi: {
url: 'http://localhost:23013',
},
realTime: {
url: 'http://localhost:23026',
},
contacts: {
url: 'http://localhost:23036',
},
notifications: {
url: 'http://localhost:23042',
},
project_history: {
sendProjectStructureOps: true,
url: `http://localhost:23054`,
},
v1_history: {
url: `http://localhost:23100/api`,
user: 'overleaf',
pass: 'password',
},
webpack: {
url: 'http://localhost:23808',
},
gitBridge: {
url: 'http://localhost:28000',
},
},
features: (features = {
v1_free: {
collaborators: 1,
dropbox: false,
versioning: false,
github: true,
gitBridge: true,
templates: false,
references: false,
referencesSearch: false,
mendeley: true,
zotero: true,
compileTimeout: 60,
compileGroup: 'standard',
trackChanges: false,
symbolPalette: false,
},
personal: {
collaborators: 1,
dropbox: false,
versioning: false,
github: false,
gitBridge: false,
templates: false,
references: false,
referencesSearch: false,
mendeley: false,
zotero: false,
compileTimeout: 60,
compileGroup: 'standard',
trackChanges: false,
symbolPalette: false,
},
collaborator: {
collaborators: 10,
dropbox: true,
versioning: true,
github: true,
gitBridge: true,
templates: true,
references: true,
referencesSearch: true,
mendeley: true,
zotero: true,
compileTimeout: 180,
compileGroup: 'priority',
trackChanges: true,
symbolPalette: true,
},
professional: {
collaborators: -1,
dropbox: true,
versioning: true,
github: true,
gitBridge: true,
templates: true,
references: true,
referencesSearch: true,
mendeley: true,
zotero: true,
compileTimeout: 180,
compileGroup: 'priority',
trackChanges: true,
symbolPalette: true,
},
}),
defaultFeatures: features.personal,
defaultPlanCode: 'personal',
institutionPlanCode: 'professional',
plans: [
{
planCode: 'v1_free',
name: 'V1 Free',
price_in_cents: 0,
features: features.v1_free,
},
{
planCode: 'personal',
name: 'Personal',
price_in_cents: 0,
features: features.personal,
},
{
planCode: 'collaborator',
name: 'Collaborator',
price_in_cents: 1500,
features: features.collaborator,
},
{
planCode: 'professional',
name: 'Professional',
price_in_cents: 3000,
features: features.professional,
},
],
bonus_features: {
1: {
collaborators: 2,
dropbox: false,
versioning: false,
},
3: {
collaborators: 4,
dropbox: false,
versioning: false,
},
6: {
collaborators: 4,
dropbox: true,
versioning: true,
},
9: {
collaborators: -1,
dropbox: true,
versioning: true,
},
},
redirects: {
'/redirect/one': '/destination/one',
'/redirect/get_and_post': {
methods: ['get', 'post'],
url: '/destination/get_and_post',
},
'/redirect/base_url': {
baseUrl: 'https://example.com',
url: '/destination/base_url',
},
'/redirect/params/:id': {
url(params) {
return `/destination/${params.id}/params`
},
},
'/redirect/qs': '/destination/qs',
'/docs_v1': {
url: '/docs',
},
},
reconfirmNotificationDays: 14,
unsupportedBrowsers: {
ie: '<=11',
},
recaptcha: {
siteKey: 'siteKey',
disabled: {
invite: true,
login: false,
passwordReset: true,
register: true,
addEmail: true,
},
},
// No email in tests
email: undefined,
test: {
counterInit: 0,
},
splitTest: {
devToolbar: {
enabled: false,
},
},
}
module.exports.mergeWith = function (overrides) {
return merge(overrides, module.exports)
}