Merge pull request #3654 from overleaf/tm-remove-v1-connection-error-message
Remove V1 connection error warning from projects dashboard GitOrigin-RevId: 0820adfe385362f2854381bce94db8e953251573
This commit is contained in:
@@ -3,7 +3,6 @@ const path = require('path')
|
||||
const sinon = require('sinon')
|
||||
const { expect } = require('chai')
|
||||
const { ObjectId } = require('mongodb')
|
||||
const Errors = require('../../../../app/src/Features/Errors/Errors')
|
||||
|
||||
const MODULE_PATH = path.join(
|
||||
__dirname,
|
||||
@@ -490,39 +489,6 @@ describe('ProjectController', function() {
|
||||
this.ProjectController.projectListPage(this.req, this.res)
|
||||
})
|
||||
|
||||
describe('when there is a v1 connection error', function() {
|
||||
beforeEach(function() {
|
||||
this.Features.hasFeature = sinon
|
||||
.stub()
|
||||
.withArgs('overleaf-integration')
|
||||
.returns(true)
|
||||
this.connectionWarning =
|
||||
'Error accessing Overleaf V1. Some of your projects or features may be missing.'
|
||||
})
|
||||
|
||||
it('should show a warning when there is an error getting subscriptions from v1', function(done) {
|
||||
this.LimitationsManager.hasPaidSubscription.yields(
|
||||
new Errors.V1ConnectionError('error')
|
||||
)
|
||||
this.res.render = (pageName, opts) => {
|
||||
expect(opts.warnings).to.contain(this.connectionWarning)
|
||||
done()
|
||||
}
|
||||
this.ProjectController.projectListPage(this.req, this.res)
|
||||
})
|
||||
|
||||
it('should show a warning when there is an error getting full emails due to v1', function(done) {
|
||||
this.UserGetter.getUserFullEmails.yields(
|
||||
new Errors.V1ConnectionError('error')
|
||||
)
|
||||
this.res.render = (pageName, opts) => {
|
||||
expect(opts.warnings).to.contain(this.connectionWarning)
|
||||
done()
|
||||
}
|
||||
this.ProjectController.projectListPage(this.req, this.res)
|
||||
})
|
||||
})
|
||||
|
||||
describe('front widget', function(done) {
|
||||
beforeEach(function() {
|
||||
this.settings.overleaf = {
|
||||
|
||||
Reference in New Issue
Block a user