Skip to content

Commit a89c919

Browse files
committed
fix: some comments and vitest config
1 parent 90f2534 commit a89c919

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

apps/site/docs/en/docs/usage/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ When considering the time required for the AI service, `.aiWaitFor` may not be v
108108

109109
## Debug Config (Optional)
110110

111-
### Print AI profile
111+
### Print the AI profiling
112112

113113
By setting `MIDSCENE_DEBUG_AI_PROFILE`, you can take a look at the time and token consumption of AI calls.
114114

packages/web-integration/tests/unit-test/fixtures/extractor/index.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,30 +111,24 @@ <h3>Form</h3>
111111
</div>
112112
</div>
113113

114-
<!-- from ebay -->
114+
<!-- a bad case from ebay -->
115115
<div id="gh-ac-box2" _midscene_retrieve_task_id="7de6fc64a5">
116116
<label for="gh-ac" class="gh-ar-hdn">输入搜索关键词</label>
117117
<input
118118
type="text" class="gh-tb ui-autocomplete-input" aria-autocomplete="list" aria-expanded="false" size="50"
119119
maxlength="300" aria-label="搜索任何物品" placeholder="搜索任何物品" id="gh-ac" name="_nkw" autocapitalize="off"
120-
autocorrect="off" spellcheck="false" autocomplete="off" aria-haspopup="true" role="combobox" aria-owns="ui-id-1"
121-
_midscene_retrieve_task_id="36bc72f23a">
120+
autocorrect="off" spellcheck="false" autocomplete="off" aria-haspopup="true" role="combobox" aria-owns="ui-id-1">
122121
<span role="status" aria-live="polite"
123122
class="ui-helper-hidden-accessible">
124123
</span>
125124
<input style="display:none">
126-
127-
<script>
128-
if (document.getElementById('gh-ac').value.length !== 0) {
129-
document.getElementById('gh-ac-box').classList.add('gh-ac-box-focus');
130-
document.getElementById('gh').classList.add('gh-sch-focus');
131-
}
132-
</script>
125+
133126
<svg aria-hidden="true" class="icon icon--search gh-search__icon" focusable="false" height="16" width="16">
134127
<use xlink:href="#gh-icon-search-evo">
135128
</use>
136129
</svg>
137130
</div>
131+
138132
<!-- form -->
139133
<form action="/submit-form" method="post">
140134
<label for="options">Choose an option:</label>
@@ -148,6 +142,7 @@ <h3>Form</h3>
148142
class="life-core-input-inner__wrapper life-core-input-inner__wrapper-border life-core-input-inner__wrapper-size-md life-core-input-inner__wrapper-add-suffix">
149143
<input placeholder="验证码" tabindex="0" type="text" class="life-core-input life-core-input-size-md" value="">
150144
</label>
145+
151146
<!-- a checkbox drawn by div -->
152147
<style>
153148
.life-core-check-wrapper {

packages/web-integration/vitest.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ dotenv.config({
1212
});
1313

1414
const enableAiTest = Boolean(process.env.AITEST);
15-
const baseTests = ['tests/unit-test/*.test.ts'];
15+
const unitTests = ['tests/unit-test/*.test.ts'];
16+
const aiTests = ['tests/ai/**/*.test.ts'];
1617

1718
export default defineConfig({
1819
resolve: {
@@ -21,6 +22,6 @@ export default defineConfig({
2122
},
2223
},
2324
test: {
24-
include: enableAiTest ? ['tests/ai/**/*.test.ts', ...baseTests] : baseTests,
25+
include: enableAiTest ? [...aiTests, ...unitTests] : unitTests,
2526
},
2627
});

0 commit comments

Comments
 (0)