Skip to content

Commit 0a6f749

Browse files
author
guomingliang
committed
fix:update 4.4.0
1 parent 0ffc4be commit 0a6f749

File tree

14 files changed

+89
-9
lines changed

14 files changed

+89
-9
lines changed

other/hbuilderx-autotest/core/autoTestHandler/autoTestDef.d.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,21 @@ interface AutoTestSameWordCase extends AutoTestCase<SameWordExpect> {
136136
programData: string;
137137
programPlugin: string;
138138
}
139+
interface ExpandSelectionExpect {
140+
begin: string;
141+
end: string;
142+
line?: string;
143+
}
144+
interface AutoTestExpandSelectionCase extends AutoTestCase<ExpandSelectionExpect> {
145+
kind: 'expandSelection';
146+
frequency: number;
147+
range: Range;
148+
docOffsetAt: number;
149+
project: string;
150+
lsDir: string;
151+
programData: string;
152+
programPlugin: string;
153+
}
139154
interface CommandExpect {
140155
lines: string[] | RegExp[];
141156
cursor?: Position;
@@ -216,4 +231,4 @@ interface AutoTestPerformanceCase extends AutoTestCase<PerformanceExpect> {
216231
timer: number;
217232
range: Range;
218233
}
219-
export { AutoEditExpect, AutoTestAutoEditCase, AutoTestCase, AutoTestCheckEditorCase, AutoTestCompletionCase, AutoTestDbClickCase, AutoTestDefinitionCase, AutoTestFoldCase, AutoTestFormatCase, AutoTestHoverCase, AutoTestKeybindCase, AutoTestOpenFileCase, AutoTestOutlineCase, AutoTestPerformanceCase, AutoTestReferencesCase, AutoTestRetriggerCase, AutoTestSameWordCase, AutoTestCommandCase, CommandExpect, CompletionExpect, DbClickExpect, DefinitionExpect, ErrorExpect, FoldExpect, FormatExpect, HoverExpect, KeybindingExpect, OpenFileExpect, OutlineExpect, PerformanceExpect, ReferencesExpect, SameWordExpect, };
234+
export { AutoEditExpect, AutoTestAutoEditCase, AutoTestCase, AutoTestCheckEditorCase, AutoTestCommandCase, AutoTestCompletionCase, AutoTestDbClickCase, AutoTestDefinitionCase, AutoTestExpandSelectionCase, AutoTestFoldCase, AutoTestFormatCase, AutoTestHoverCase, AutoTestKeybindCase, AutoTestOpenFileCase, AutoTestOutlineCase, AutoTestPerformanceCase, AutoTestReferencesCase, AutoTestRetriggerCase, AutoTestSameWordCase, CommandExpect, CompletionExpect, DbClickExpect, DefinitionExpect, ErrorExpect, FoldExpect, FormatExpect, HoverExpect, KeybindingExpect, OpenFileExpect, OutlineExpect, PerformanceExpect, ReferencesExpect, SameWordExpect };
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { ParseData } from '../utils';
2+
declare function parseExpandSelectionHandler(parseData: ParseData): import("../autoTestDef").AutoTestCase<any>;
3+
export { parseExpandSelectionHandler };

other/hbuilderx-autotest/core/caseHandler.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AutoTestAutoEditCase, AutoTestCheckEditorCase, AutoTestCommandCase, AutoTestCompletionCase, AutoTestDbClickCase, AutoTestDefinitionCase, AutoTestFoldCase, AutoTestFormatCase, AutoTestHoverCase, AutoTestKeybindCase, AutoTestOpenFileCase, AutoTestOutlineCase, AutoTestPerformanceCase, AutoTestReferencesCase, AutoTestRetriggerCase, AutoTestSameWordCase } from './autoTestHandler/autoTestDef';
1+
import { AutoTestAutoEditCase, AutoTestCheckEditorCase, AutoTestCommandCase, AutoTestCompletionCase, AutoTestDbClickCase, AutoTestDefinitionCase, AutoTestExpandSelectionCase, AutoTestFoldCase, AutoTestFormatCase, AutoTestHoverCase, AutoTestKeybindCase, AutoTestOpenFileCase, AutoTestOutlineCase, AutoTestPerformanceCase, AutoTestReferencesCase, AutoTestRetriggerCase, AutoTestSameWordCase } from './autoTestHandler/autoTestDef';
22
import { Editor } from './editor';
33
declare function runDbClickCase(test: AutoTestDbClickCase, editor: Editor): Promise<({
44
casename: string;
@@ -60,4 +60,5 @@ declare function runOpenFileCase(test: AutoTestOpenFileCase, config?: any): Prom
6060
message?: undefined;
6161
})[]>;
6262
declare function runCommandCase(test: AutoTestCommandCase, editor: Editor): Promise<any[]>;
63-
export { runAutoEditCase, runCheckEditor, runCommandCase, runCompletionCase, runDbClickCase, runDefinitionCase, runErrorCase, runFoldCase, runFormatCase, runHoverCase, runKeybindCase, runNoErrorCase, runOpenFileCase, runOutlineCase, runPerformanceCase, runReferencesCase, runRetriggerCase, runSameWordCase, runTypeAheadCase, };
63+
declare function runExpandSelectionCase(test: AutoTestExpandSelectionCase, editor: Editor): Promise<any[]>;
64+
export { runAutoEditCase, runCheckEditor, runCommandCase, runCompletionCase, runDbClickCase, runDefinitionCase, runErrorCase, runFoldCase, runFormatCase, runHoverCase, runKeybindCase, runNoErrorCase, runOpenFileCase, runOutlineCase, runPerformanceCase, runReferencesCase, runRetriggerCase, runSameWordCase, runTypeAheadCase, runExpandSelectionCase, };
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { AutoTestExpandSelectionCase } from '../autoTestHandler/autoTestDef';
2+
import { Editor } from '../editor';
3+
declare class ExpandSelectionHandler {
4+
private getTargetInfo;
5+
private getMainInfo;
6+
private isSameRange;
7+
private getSortPosition;
8+
/**
9+
* 对比结果
10+
*/
11+
private comparativeData;
12+
private getSimplifiedTargetInfo;
13+
/**
14+
* 执行扩大选区测试用例
15+
* @param test
16+
* @param editor
17+
* @returns
18+
*/
19+
runExpandSelectionCase(test: AutoTestExpandSelectionCase, editor: Editor): Promise<any[]>;
20+
}
21+
export { ExpandSelectionHandler };

other/hbuilderx-autotest/core/editor.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export declare class Editor {
6262
* @returns
6363
*/
6464
findSameWord(range: Range): Promise<Range[]>;
65+
findExpandSelection(range: Range, frequency: number): Promise<Range[]>;
6566
focusProjectManager(): Promise<void>;
6667
runCommand(command: string): Promise<boolean>;
6768
close(): Promise<void>;

other/hbuilderx-autotest/core/hxdriver.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ export declare class HBuilderX {
115115
x: number;
116116
y: number;
117117
}, tryCount?: number): Promise<void>;
118+
/**
119+
* 等待点击(点击)操作完成,不等待点击的后续任务是否执行,xy不传,默认是选中控件的中心
120+
*/
121+
waitAndClickWithKeyModifier(selector: string, keyModifier: string, xy?: {
122+
x: number;
123+
y: number;
124+
}, tryCount?: number): Promise<void>;
118125
/**
119126
* 等待点击(双击)操作完成,不等待点击的后续任务是否执行,xy不传,默认是选中控件的中心
120127
*/

other/hbuilderx-autotest/core/keybinding.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ interface KeyBindings {
2929
focusProjectManager: string;
3030
}
3131
declare let keyBindings: KeyBindings;
32-
export { keyBindings };
32+
declare function parseAndMatchKeys(hotkeyString: string): string;
33+
export { keyBindings, parseAndMatchKeys };

other/hbuilderx-autotest/core/utils.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export declare function fileCase(project: string, openfile: string, workbench: a
4949
}>;
5050
export declare function traverseDirectory(dir: string, includes?: string[], needSort?: boolean): string[];
5151
export declare function moveItemToFront(arr: string[], key: string): string[];
52+
export declare function moveItemToEnd(arr: string[], key: string): string[];
5253
export declare const directoryList: (dirPath: string) => string[];
5354
/**
5455
* 解析测试用例的期望路径

other/hbuilderx-autotest/core/workbench.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ export declare class Workbench {
9090
delLine: string;
9191
selectAll: string;
9292
clipBoardHistory: string;
93-
newUnTitledEditor: string;
94-
'editor.action.triggerSuggest': string;
95-
enter: string; /**
96-
* 导入一个本地的项目到项目管理器,通过HBuilderX.exe project的形式
93+
newUnTitledEditor: string; /**
94+
* 测试框架hx实例
9795
*/
96+
'editor.action.triggerSuggest': string;
97+
enter: string;
9898
down: string;
9999
esc: string;
100100
openAndCloseOutline: string;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* 运行单个测试用例
3+
*/
4+
declare function runSingleCase(params: any, output: any): Promise<void>;
5+
/**
6+
* 运行某个文件夹的测试用例(确定不为项目根文件夹)
7+
* @param params
8+
* @param output
9+
*/
10+
declare function runFolderCase(params: any, output: any): Promise<void>;
11+
declare function runProjectCase(params: any, output: any): Promise<void>;
12+
declare function openFileToRange(baseUri: any, output: any): Promise<void>;
13+
export { runProjectCase, runFolderCase, runSingleCase, openFileToRange };

0 commit comments

Comments
 (0)