このコミットが含まれているのは:
@@ -400,6 +400,10 @@ describe('Gekanator API writers', () => {
|
||||
type: 'tag',
|
||||
key: 'character:喜多郁代',
|
||||
},
|
||||
questionMode: 'normal',
|
||||
questionPurpose: 'effective_user_suggested',
|
||||
effectiveQuestion: true,
|
||||
learningQuestion: false,
|
||||
answer: 'yes',
|
||||
originalAnswer: 'partial',
|
||||
},
|
||||
@@ -424,6 +428,10 @@ describe('Gekanator API writers', () => {
|
||||
type: 'tag',
|
||||
key: 'character:喜多郁代',
|
||||
},
|
||||
question_mode: 'normal',
|
||||
question_purpose: 'effective_user_suggested',
|
||||
effective_question: true,
|
||||
learning_question: false,
|
||||
answer: 'yes',
|
||||
original_answer: 'partial',
|
||||
},
|
||||
|
||||
@@ -636,6 +636,10 @@ export const saveGekanatorGame = async ({
|
||||
question_id: answer.questionId,
|
||||
question_text: answer.questionText,
|
||||
question_condition: answer.questionCondition ?? null,
|
||||
question_mode: answer.questionMode,
|
||||
question_purpose: answer.questionPurpose,
|
||||
effective_question: answer.effectiveQuestion,
|
||||
learning_question: answer.learningQuestion,
|
||||
answer: answer.answer,
|
||||
original_answer: answer.originalAnswer })) })
|
||||
|
||||
|
||||
@@ -60,6 +60,14 @@ const gekanatorBackdropSource = gekanatorPageSource.slice (
|
||||
gekanatorPageSource.indexOf ('const GekanatorBackdrop'),
|
||||
gekanatorPageSource.indexOf ('const expectedAnswerFor'))
|
||||
|
||||
const gekanatorChooseQuestionSource = gekanatorPageSource.slice (
|
||||
gekanatorPageSource.indexOf ('const chooseQuestion'),
|
||||
gekanatorPageSource.indexOf ('const winningRunPriorityFor'))
|
||||
|
||||
const gekanatorFallbackQuestionSource = gekanatorPageSource.slice (
|
||||
gekanatorPageSource.indexOf ('const chooseFallbackQuestion'),
|
||||
gekanatorPageSource.indexOf ('const shouldEnterGuessPhase'))
|
||||
|
||||
|
||||
describe('GekanatorBackdrop regression structure', () => {
|
||||
it('keeps displayedBackdropMode as the render-time source of truth', () => {
|
||||
@@ -103,6 +111,30 @@ describe('GekanatorBackdrop regression structure', () => {
|
||||
})
|
||||
|
||||
|
||||
describe('Gekanator question selection regression structure', () => {
|
||||
it('prefers normal questions after user_suggested quota has been met', () => {
|
||||
const normalFallbackIndex = gekanatorChooseQuestionSource.indexOf (
|
||||
'else if (normalPool.length > 0)')
|
||||
const effectiveFallbackIndex = gekanatorChooseQuestionSource.indexOf (
|
||||
'else if (effectiveUserSuggestedPool.length > 0)')
|
||||
|
||||
expect(normalFallbackIndex).toBeGreaterThan(0)
|
||||
expect(effectiveFallbackIndex).toBeGreaterThan(0)
|
||||
expect(normalFallbackIndex).toBeLessThan(effectiveFallbackIndex)
|
||||
})
|
||||
|
||||
it('does not let fallback questions bypass user_suggested purpose tracking', () => {
|
||||
expect(gekanatorFallbackQuestionSource).toContain (
|
||||
"question.source !== 'user_suggested'")
|
||||
})
|
||||
|
||||
it('does not show a fixed extra-question count in the extra learning UI', () => {
|
||||
expect(gekanatorPageSource).not.toContain ('追加で 2 問まで答えてください。')
|
||||
expect(gekanatorPageSource).toContain ('追加で質問に答えてください。')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
describe('isQuestionHardFilteredAfterAnswers', () => {
|
||||
it('blocks only contradictory or redundant month questions after a yes answer', () => {
|
||||
const previous: GekanatorQuestionCondition = { type: 'original-month', month: 12 }
|
||||
|
||||
新しい課題から参照
ユーザをブロックする