(rp: RemotePage, opts: CommonWorkOptions)
| 980 | } |
| 981 | |
| 982 | function doReading(rp: RemotePage, opts: CommonWorkOptions) { |
| 983 | const is_multiple = !!$el('.multipleChoice'); |
| 984 | return handleCommonUnitTest(rp, opts, { |
| 985 | type: is_multiple ? 'multiple' : 'single', |
| 986 | test_type: 'reading-choice', |
| 987 | root: '.question-common-abs-choice', |
| 988 | elements: { |
| 989 | // 将题目和选项一起搜索 |
| 990 | title: '.ques-title,.option-wrap', |
| 991 | options: '.option-wrap .option .content' |
| 992 | }, |
| 993 | questionTitleTransform(ques) { |
| 994 | // 指导内容,比如说:选择最佳匹配的选项... |
| 995 | const direction = $el('.question-wrap .abs-direction')?.innerText.trim() || ''; |
| 996 | // 阅读理解主要内容 |
| 997 | const ctx = $el('.question-wrap .question-common-abs-material')?.innerText.trim() || ''; |
| 998 | // ques 就是小标题 |
| 999 | return [direction, '-'.repeat(10), ctx, '-'.repeat(10), ques].filter(Boolean).join('\n'); |
| 1000 | } |
| 1001 | }); |
| 1002 | } |
| 1003 | |
| 1004 | function doUnderstandingText(rp: RemotePage, opts: CommonWorkOptions) { |
| 1005 | return handleCommonUnitTest(rp, opts, { |
no test coverage detected