(rp: RemotePage, opts: CommonWorkOptions)
| 1002 | } |
| 1003 | |
| 1004 | function doUnderstandingText(rp: RemotePage, opts: CommonWorkOptions) { |
| 1005 | return handleCommonUnitTest(rp, opts, { |
| 1006 | type: 'completion', |
| 1007 | test_type: 'reading-replay', |
| 1008 | root: '.question-common-abs-reply', |
| 1009 | elements: { |
| 1010 | // 将题目和选项一起搜索 |
| 1011 | title: '.question-inputbox-header', |
| 1012 | options: 'textarea' |
| 1013 | }, |
| 1014 | questionTitleTransform(ques) { |
| 1015 | // 指导内容,比如说:选择最佳匹配的选项... |
| 1016 | const direction = $el('.question-wrap .abs-direction')?.innerText.trim() || ''; |
| 1017 | // 阅读理解主要内容 |
| 1018 | const ctx = $el('.question-wrap .question-common-abs-material')?.innerText.trim() || ''; |
| 1019 | // ques 就是小标题 |
| 1020 | return [direction, '-'.repeat(10), ctx, '-'.repeat(10), ques].filter(Boolean).join('\n'); |
| 1021 | } |
| 1022 | }); |
| 1023 | } |
| 1024 | |
| 1025 | function doCompletion(rp: RemotePage, opts: CommonWorkOptions) { |
| 1026 | return handleCommonUnitTest(rp, opts, { |
no test coverage detected