|
|
@@ -27,12 +27,19 @@ describe('QuestionnaireCronService', () => {
|
|
|
// saved in db、not finished (user types is updated from the time it was saved)
|
|
|
{
|
|
|
_id: '63a8354837e7aa378e16f0b1',
|
|
|
+ title: {
|
|
|
+ ja_JP: 'GROWI に関するアンケート',
|
|
|
+ en_US: 'Questions about GROWI',
|
|
|
+ },
|
|
|
showFrom: '2022-12-11',
|
|
|
showUntil: '2100-12-12',
|
|
|
questions: [
|
|
|
{
|
|
|
type: 'points',
|
|
|
- text: 'Is Growi easy to use?',
|
|
|
+ text: {
|
|
|
+ ja_JP: 'GROWI は使いやすいですか?',
|
|
|
+ en_US: 'Is GROWI easy to use?',
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
condition: {
|
|
|
@@ -51,12 +58,19 @@ describe('QuestionnaireCronService', () => {
|
|
|
// not saved, not finished
|
|
|
{
|
|
|
_id: '63a8354837e7aa378e16f0b2',
|
|
|
+ title: {
|
|
|
+ ja_JP: 'GROWI に関するアンケート',
|
|
|
+ en_US: 'Questions about GROWI',
|
|
|
+ },
|
|
|
showFrom: '2021-12-11',
|
|
|
showUntil: '2100-12-12',
|
|
|
questions: [
|
|
|
{
|
|
|
type: 'points',
|
|
|
- text: 'Is this questionnaire functioning properly?',
|
|
|
+ text: {
|
|
|
+ ja_JP: 'アンケート機能は正常動作していますか?',
|
|
|
+ en_US: 'Is this questionnaire functioning properly?',
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
condition: {
|
|
|
@@ -75,12 +89,19 @@ describe('QuestionnaireCronService', () => {
|
|
|
// not saved, finished
|
|
|
{
|
|
|
_id: '63a8354837e7aa378e16f0b3',
|
|
|
+ title: {
|
|
|
+ ja_JP: 'GROWI に関するアンケート',
|
|
|
+ en_US: 'Questions about GROWI',
|
|
|
+ },
|
|
|
showFrom: '2021-12-11',
|
|
|
showUntil: '2021-12-12',
|
|
|
questions: [
|
|
|
{
|
|
|
type: 'points',
|
|
|
- text: 'Is this a good question?',
|
|
|
+ text: {
|
|
|
+ ja_JP: 'これはいい質問ですか?',
|
|
|
+ en_US: 'Is this a good question?',
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
condition: {
|
|
|
@@ -114,12 +135,19 @@ describe('QuestionnaireCronService', () => {
|
|
|
await QuestionnaireOrder.insertMany([
|
|
|
{
|
|
|
_id: '63a8354837e7aa378e16f0b1',
|
|
|
+ title: {
|
|
|
+ ja_JP: 'GROWI に関するアンケート',
|
|
|
+ en_US: 'Questions about GROWI',
|
|
|
+ },
|
|
|
showFrom: '2022-12-11',
|
|
|
showUntil: '2100-12-12',
|
|
|
questions: [
|
|
|
{
|
|
|
type: 'points',
|
|
|
- text: 'Is Growi easy to use?',
|
|
|
+ text: {
|
|
|
+ ja_JP: 'GROWI は使いやすいですか?',
|
|
|
+ en_US: 'Is GROWI easy to use?',
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
condition: {
|
|
|
@@ -135,12 +163,19 @@ describe('QuestionnaireCronService', () => {
|
|
|
// finished
|
|
|
{
|
|
|
_id: '63a8354837e7aa378e16f0b4',
|
|
|
+ title: {
|
|
|
+ ja_JP: 'GROWI に関するアンケート',
|
|
|
+ en_US: 'Questions about GROWI',
|
|
|
+ },
|
|
|
showFrom: '2020-12-11',
|
|
|
showUntil: '2021-12-12',
|
|
|
questions: [
|
|
|
{
|
|
|
type: 'points',
|
|
|
- text: 'Is ver 2.0 better than 1.0?',
|
|
|
+ text: {
|
|
|
+ ja_JP: 'ver 2.0 は 1.0 より良いですか?',
|
|
|
+ en_US: 'Is ver 2.0 better than 1.0?',
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
condition: {
|
|
|
@@ -156,12 +191,19 @@ describe('QuestionnaireCronService', () => {
|
|
|
// questionnaire that doesn't exist in questionnaire server
|
|
|
{
|
|
|
_id: '63a8354837e7aa378e16f0b5',
|
|
|
+ title: {
|
|
|
+ ja_JP: 'GROWI に関するアンケート',
|
|
|
+ en_US: 'Questions about GROWI',
|
|
|
+ },
|
|
|
showFrom: '2020-12-11',
|
|
|
showUntil: '2100-12-12',
|
|
|
questions: [
|
|
|
{
|
|
|
type: 'points',
|
|
|
- text: 'How would you rate the latest design?',
|
|
|
+ text: {
|
|
|
+ ja_JP: '新しいデザインは良いですか?',
|
|
|
+ en_US: 'How would you rate the latest design?',
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
condition: {
|
|
|
@@ -210,12 +252,19 @@ describe('QuestionnaireCronService', () => {
|
|
|
expect(JSON.parse(JSON.stringify(savedOrders))).toEqual([
|
|
|
{
|
|
|
_id: '63a8354837e7aa378e16f0b1',
|
|
|
+ title: {
|
|
|
+ ja_JP: 'GROWI に関するアンケート',
|
|
|
+ en_US: 'Questions about GROWI',
|
|
|
+ },
|
|
|
showFrom: '2022-12-11T00:00:00.000Z',
|
|
|
showUntil: '2100-12-12T00:00:00.000Z',
|
|
|
questions: [
|
|
|
{
|
|
|
type: 'points',
|
|
|
- text: 'Is Growi easy to use?',
|
|
|
+ text: {
|
|
|
+ ja_JP: 'GROWI は使いやすいですか?',
|
|
|
+ en_US: 'Is GROWI easy to use?',
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
condition: {
|
|
|
@@ -233,12 +282,19 @@ describe('QuestionnaireCronService', () => {
|
|
|
},
|
|
|
{
|
|
|
_id: '63a8354837e7aa378e16f0b2',
|
|
|
+ title: {
|
|
|
+ ja_JP: 'GROWI に関するアンケート',
|
|
|
+ en_US: 'Questions about GROWI',
|
|
|
+ },
|
|
|
showFrom: '2021-12-11T00:00:00.000Z',
|
|
|
showUntil: '2100-12-12T00:00:00.000Z',
|
|
|
questions: [
|
|
|
{
|
|
|
type: 'points',
|
|
|
- text: 'Is this questionnaire functioning properly?',
|
|
|
+ text: {
|
|
|
+ ja_JP: 'アンケート機能は正常動作していますか?',
|
|
|
+ en_US: 'Is this questionnaire functioning properly?',
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
condition: {
|