[web] Add new admin tool for surveys (#8356)

* Setup survey module and admin page skeleton

* Replace survey staff access permission with admin-only

* Manage survey config with admin tool

* Display configurable survey in project list + add preview in admin

* Fix linting errors and unit tests

* Add acceptance tests for survey module

* Move survey-form to survey components

* Add configuration option for Recurly group subscription users on surveys

* Change survey pre-link text to a lighter gray for accessibility

* Cleanup survey options implementation after review

GitOrigin-RevId: 8f621951efeae458d1ab081fe98b8d0d539cca1a
This commit is contained in:
Alexandre Bourdin
2022-06-22 11:34:25 +02:00
committed by Copybot
parent 29cd233c29
commit f50fe3be14
14 changed files with 259 additions and 0 deletions

View File

@@ -140,6 +140,9 @@ describe('ProjectController', function () {
this.SubscriptionViewModelBuilder = {
getBestSubscription: sinon.stub().yields(null, { type: 'free' }),
}
this.SurveyHandler = {
getSurvey: sinon.stub().yields(null, {}),
}
this.ProjectController = SandboxedModule.require(MODULE_PATH, {
requires: {
@@ -185,6 +188,7 @@ describe('ProjectController', function () {
getUserDictionary: sinon.stub().yields(null, []),
},
'../Institutions/InstitutionsFeatures': this.InstitutionsFeatures,
'../Survey/SurveyHandler': this.SurveyHandler,
},
})