Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
85d2077f
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
85d2077f
编写于
3月 26, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
smoke - quickopen => quickaccess
上级
4cfc630d
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
41 addition
and
41 deletion
+41
-41
test/automation/src/index.ts
test/automation/src/index.ts
+1
-1
test/automation/src/quickaccess.ts
test/automation/src/quickaccess.ts
+5
-5
test/automation/src/settings.ts
test/automation/src/settings.ts
+3
-3
test/automation/src/terminal.ts
test/automation/src/terminal.ts
+3
-3
test/automation/src/workbench.ts
test/automation/src/workbench.ts
+7
-7
test/smoke/src/areas/editor/editor.test.ts
test/smoke/src/areas/editor/editor.test.ts
+3
-3
test/smoke/src/areas/extensions/extensions.test.ts
test/smoke/src/areas/extensions/extensions.test.ts
+1
-1
test/smoke/src/areas/languages/languages.test.ts
test/smoke/src/areas/languages/languages.test.ts
+4
-4
test/smoke/src/areas/multiroot/multiroot.test.ts
test/smoke/src/areas/multiroot/multiroot.test.ts
+1
-1
test/smoke/src/areas/preferences/preferences.test.ts
test/smoke/src/areas/preferences/preferences.test.ts
+1
-1
test/smoke/src/areas/search/search.test.ts
test/smoke/src/areas/search/search.test.ts
+2
-2
test/smoke/src/areas/statusbar/statusbar.test.ts
test/smoke/src/areas/statusbar/statusbar.test.ts
+4
-4
test/smoke/src/areas/workbench/data-loss.test.ts
test/smoke/src/areas/workbench/data-loss.test.ts
+1
-1
test/smoke/src/areas/workbench/data-migration.test.ts
test/smoke/src/areas/workbench/data-migration.test.ts
+5
-5
未找到文件。
test/automation/src/index.ts
浏览文件 @
85d2077f
...
...
@@ -16,7 +16,7 @@ export * from './logger';
export
*
from
'
./peek
'
;
export
*
from
'
./problems
'
;
export
*
from
'
./quickinput
'
;
export
*
from
'
./quick
open
'
;
export
*
from
'
./quick
access
'
;
export
*
from
'
./scm
'
;
export
*
from
'
./search
'
;
export
*
from
'
./settings
'
;
...
...
test/automation/src/quick
open
.ts
→
test/automation/src/quick
access
.ts
浏览文件 @
85d2077f
...
...
@@ -7,14 +7,14 @@ import { Editors } from './editors';
import
{
Code
}
from
'
./code
'
;
import
{
QuickInput
}
from
'
./quickinput
'
;
export
class
Quick
Open
{
export
class
Quick
Access
{
constructor
(
private
code
:
Code
,
private
editors
:
Editors
,
private
quickInput
:
QuickInput
)
{
}
async
openQuick
Open
(
value
:
string
):
Promise
<
void
>
{
async
openQuick
Access
(
value
:
string
):
Promise
<
void
>
{
let
retries
=
0
;
// other parts of code might steal focus away from quick
open
:(
// other parts of code might steal focus away from quick
input
:(
while
(
retries
<
5
)
{
if
(
process
.
platform
===
'
darwin
'
)
{
await
this
.
code
.
dispatchKeybinding
(
'
cmd+p
'
);
...
...
@@ -40,7 +40,7 @@ export class QuickOpen {
}
async
openFile
(
fileName
:
string
):
Promise
<
void
>
{
await
this
.
openQuick
Open
(
fileName
);
await
this
.
openQuick
Access
(
fileName
);
await
this
.
quickInput
.
waitForQuickInputElements
(
names
=>
names
[
0
]
===
fileName
);
await
this
.
code
.
dispatchKeybinding
(
'
enter
'
);
...
...
@@ -49,7 +49,7 @@ export class QuickOpen {
}
async
runCommand
(
commandId
:
string
):
Promise
<
void
>
{
await
this
.
openQuick
Open
(
`>
${
commandId
}
`
);
await
this
.
openQuick
Access
(
`>
${
commandId
}
`
);
// wait for best choice to be focused
await
this
.
code
.
waitForTextContent
(
QuickInput
.
QUICK_INPUT_FOCUSED_ELEMENT
);
...
...
test/automation/src/settings.ts
浏览文件 @
85d2077f
...
...
@@ -8,11 +8,11 @@ import * as path from 'path';
import
{
Editor
}
from
'
./editor
'
;
import
{
Editors
}
from
'
./editors
'
;
import
{
Code
}
from
'
./code
'
;
import
{
Quick
Open
}
from
'
./quickopen
'
;
import
{
Quick
Access
}
from
'
./quickaccess
'
;
export
class
SettingsEditor
{
constructor
(
private
code
:
Code
,
private
userDataPath
:
string
,
private
editors
:
Editors
,
private
editor
:
Editor
,
private
quick
open
:
QuickOpen
)
{
}
constructor
(
private
code
:
Code
,
private
userDataPath
:
string
,
private
editors
:
Editors
,
private
editor
:
Editor
,
private
quick
access
:
QuickAccess
)
{
}
async
addUserSetting
(
setting
:
string
,
value
:
string
):
Promise
<
void
>
{
await
this
.
openSettings
();
...
...
@@ -32,6 +32,6 @@ export class SettingsEditor {
}
private
async
openSettings
():
Promise
<
void
>
{
await
this
.
quick
open
.
runCommand
(
'
workbench.action.openSettingsJson
'
);
await
this
.
quick
access
.
runCommand
(
'
workbench.action.openSettingsJson
'
);
}
}
test/automation/src/terminal.ts
浏览文件 @
85d2077f
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
Code
}
from
'
./code
'
;
import
{
Quick
Open
}
from
'
./quickopen
'
;
import
{
Quick
Access
}
from
'
./quickaccess
'
;
const
PANEL_SELECTOR
=
'
div[id="workbench.panel.terminal"]
'
;
const
XTERM_SELECTOR
=
`
${
PANEL_SELECTOR
}
.terminal-wrapper`
;
...
...
@@ -12,10 +12,10 @@ const XTERM_TEXTAREA = `${XTERM_SELECTOR} textarea.xterm-helper-textarea`;
export
class
Terminal
{
constructor
(
private
code
:
Code
,
private
quick
open
:
QuickOpen
)
{
}
constructor
(
private
code
:
Code
,
private
quick
access
:
QuickAccess
)
{
}
async
showTerminal
():
Promise
<
void
>
{
await
this
.
quick
open
.
runCommand
(
'
workbench.action.terminal.toggleTerminal
'
);
await
this
.
quick
access
.
runCommand
(
'
workbench.action.terminal.toggleTerminal
'
);
await
this
.
code
.
waitForActiveElement
(
XTERM_TEXTAREA
);
await
this
.
code
.
waitForTerminalBuffer
(
XTERM_SELECTOR
,
lines
=>
lines
.
some
(
line
=>
line
.
length
>
0
));
}
...
...
test/automation/src/workbench.ts
浏览文件 @
85d2077f
...
...
@@ -5,7 +5,7 @@
import
{
Explorer
}
from
'
./explorer
'
;
import
{
ActivityBar
}
from
'
./activityBar
'
;
import
{
Quick
Open
}
from
'
./quickopen
'
;
import
{
Quick
Access
}
from
'
./quickaccess
'
;
import
{
QuickInput
}
from
'
./quickinput
'
;
import
{
Extensions
}
from
'
./extensions
'
;
import
{
Search
}
from
'
./search
'
;
...
...
@@ -26,7 +26,7 @@ export interface Commands {
export
class
Workbench
{
readonly
quick
open
:
QuickOpen
;
readonly
quick
access
:
QuickAccess
;
readonly
quickinput
:
QuickInput
;
readonly
editors
:
Editors
;
readonly
explorer
:
Explorer
;
...
...
@@ -45,18 +45,18 @@ export class Workbench {
constructor
(
code
:
Code
,
userDataPath
:
string
)
{
this
.
editors
=
new
Editors
(
code
);
this
.
quickinput
=
new
QuickInput
(
code
);
this
.
quick
open
=
new
QuickOpen
(
code
,
this
.
editors
,
this
.
quickinput
);
this
.
quick
access
=
new
QuickAccess
(
code
,
this
.
editors
,
this
.
quickinput
);
this
.
explorer
=
new
Explorer
(
code
,
this
.
editors
);
this
.
activitybar
=
new
ActivityBar
(
code
);
this
.
search
=
new
Search
(
code
);
this
.
extensions
=
new
Extensions
(
code
);
this
.
editor
=
new
Editor
(
code
,
this
.
quick
open
);
this
.
editor
=
new
Editor
(
code
,
this
.
quick
access
);
this
.
scm
=
new
SCM
(
code
);
this
.
debug
=
new
Debug
(
code
,
this
.
quick
open
,
this
.
editors
,
this
.
editor
);
this
.
debug
=
new
Debug
(
code
,
this
.
quick
access
,
this
.
editors
,
this
.
editor
);
this
.
statusbar
=
new
StatusBar
(
code
);
this
.
problems
=
new
Problems
(
code
);
this
.
settingsEditor
=
new
SettingsEditor
(
code
,
userDataPath
,
this
.
editors
,
this
.
editor
,
this
.
quick
open
);
this
.
settingsEditor
=
new
SettingsEditor
(
code
,
userDataPath
,
this
.
editors
,
this
.
editor
,
this
.
quick
access
);
this
.
keybindingsEditor
=
new
KeybindingsEditor
(
code
);
this
.
terminal
=
new
Terminal
(
code
,
this
.
quick
open
);
this
.
terminal
=
new
Terminal
(
code
,
this
.
quick
access
);
}
}
test/smoke/src/areas/editor/editor.test.ts
浏览文件 @
85d2077f
...
...
@@ -9,14 +9,14 @@ export function setup() {
describe
(
'
Editor
'
,
()
=>
{
it
(
'
shows correct quick outline
'
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
quick
open
.
openFile
(
'
www
'
);
await
app
.
workbench
.
quick
access
.
openFile
(
'
www
'
);
await
app
.
workbench
.
quick
open
.
openQuickOutline
();
await
app
.
workbench
.
quick
access
.
openQuickOutline
();
await
app
.
workbench
.
quickinput
.
waitForQuickInputElements
(
names
=>
names
.
length
>=
6
);
});
// it('folds/unfolds the code correctly', async function () {
// await app.workbench.quick
open
.openFile('www');
// await app.workbench.quick
access
.openFile('www');
// // Fold
// await app.workbench.editor.foldAtLine(3);
...
...
test/smoke/src/areas/extensions/extensions.test.ts
浏览文件 @
85d2077f
...
...
@@ -24,7 +24,7 @@ export function setup() {
if
(
app
.
remote
)
{
await
app
.
reload
();
}
await
app
.
workbench
.
quick
open
.
runCommand
(
'
Smoke Test Check
'
);
await
app
.
workbench
.
quick
access
.
runCommand
(
'
Smoke Test Check
'
);
await
app
.
workbench
.
statusbar
.
waitForStatusbarText
(
'
smoke test
'
,
'
VS Code Smoke Test Check
'
);
});
});
...
...
test/smoke/src/areas/languages/languages.test.ts
浏览文件 @
85d2077f
...
...
@@ -9,15 +9,15 @@ export function setup() {
describe
(
'
Language Features
'
,
()
=>
{
it
(
'
verifies quick outline
'
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
quick
open
.
openFile
(
'
style.css
'
);
await
app
.
workbench
.
quick
access
.
openFile
(
'
style.css
'
);
await
app
.
workbench
.
quick
open
.
openQuickOutline
();
await
app
.
workbench
.
quick
access
.
openQuickOutline
();
await
app
.
workbench
.
quickinput
.
waitForQuickInputElements
(
names
=>
names
.
length
===
2
);
});
it
(
'
verifies problems view
'
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
quick
open
.
openFile
(
'
style.css
'
);
await
app
.
workbench
.
quick
access
.
openFile
(
'
style.css
'
);
await
app
.
workbench
.
editor
.
waitForTypeInEditor
(
'
style.css
'
,
'
.foo{}
'
);
await
app
.
code
.
waitForElement
(
Problems
.
getSelectorInEditor
(
ProblemSeverity
.
WARNING
));
...
...
@@ -30,7 +30,7 @@ export function setup() {
it
(
'
verifies settings
'
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
settingsEditor
.
addUserSetting
(
'
css.lint.emptyRules
'
,
'
"error"
'
);
await
app
.
workbench
.
quick
open
.
openFile
(
'
style.css
'
);
await
app
.
workbench
.
quick
access
.
openFile
(
'
style.css
'
);
await
app
.
code
.
waitForElement
(
Problems
.
getSelectorInEditor
(
ProblemSeverity
.
ERROR
));
...
...
test/smoke/src/areas/multiroot/multiroot.test.ts
浏览文件 @
85d2077f
...
...
@@ -45,7 +45,7 @@ export function setup() {
it
(
'
shows results from all folders
'
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
quick
open
.
openQuickOpen
(
'
*.*
'
);
await
app
.
workbench
.
quick
access
.
openQuickAccess
(
'
*.*
'
);
await
app
.
workbench
.
quickinput
.
waitForQuickInputElements
(
names
=>
names
.
length
===
6
);
await
app
.
workbench
.
quickinput
.
closeQuickInput
();
...
...
test/smoke/src/areas/preferences/preferences.test.ts
浏览文件 @
85d2077f
...
...
@@ -10,7 +10,7 @@ export function setup() {
it
(
'
turns off editor line numbers and verifies the live change
'
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
quick
open
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
quick
access
.
openFile
(
'
app.js
'
);
await
app
.
code
.
waitForElements
(
'
.line-numbers
'
,
false
,
elements
=>
!!
elements
.
length
);
await
app
.
workbench
.
settingsEditor
.
addUserSetting
(
'
editor.lineNumbers
'
,
'
"off"
'
);
...
...
test/smoke/src/areas/search/search.test.ts
浏览文件 @
85d2077f
...
...
@@ -70,7 +70,7 @@ export function setup() {
'
jsconfig.json
'
];
await
app
.
workbench
.
quick
open
.
openQuickOpen
(
'
.js
'
);
await
app
.
workbench
.
quick
access
.
openQuickAccess
(
'
.js
'
);
await
app
.
workbench
.
quickinput
.
waitForQuickInputElements
(
names
=>
expectedNames
.
every
(
n
=>
names
.
some
(
m
=>
n
===
m
)));
await
app
.
code
.
dispatchKeybinding
(
'
escape
'
);
});
...
...
@@ -83,7 +83,7 @@ export function setup() {
'
package.json
'
];
await
app
.
workbench
.
quick
open
.
openQuickOpen
(
'
a.s
'
);
await
app
.
workbench
.
quick
access
.
openQuickAccess
(
'
a.s
'
);
await
app
.
workbench
.
quickinput
.
waitForQuickInputElements
(
names
=>
expectedNames
.
every
(
n
=>
names
.
some
(
m
=>
n
===
m
)));
await
app
.
code
.
dispatchKeybinding
(
'
escape
'
);
});
...
...
test/smoke/src/areas/statusbar/statusbar.test.ts
浏览文件 @
85d2077f
...
...
@@ -17,7 +17,7 @@ export function setup(isWeb) {
await
app
.
workbench
.
statusbar
.
waitForStatusbarElement
(
StatusBarElement
.
SYNC_STATUS
);
await
app
.
workbench
.
statusbar
.
waitForStatusbarElement
(
StatusBarElement
.
PROBLEMS_STATUS
);
await
app
.
workbench
.
quick
open
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
quick
access
.
openFile
(
'
app.js
'
);
if
(
!
isWeb
)
{
// Encoding picker currently hidden in web (only UTF-8 supported)
await
app
.
workbench
.
statusbar
.
waitForStatusbarElement
(
StatusBarElement
.
ENCODING_STATUS
);
...
...
@@ -35,7 +35,7 @@ export function setup(isWeb) {
await
app
.
workbench
.
quickinput
.
waitForQuickInputOpened
();
await
app
.
workbench
.
quickinput
.
closeQuickInput
();
await
app
.
workbench
.
quick
open
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
quick
access
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
statusbar
.
clickOn
(
StatusBarElement
.
INDENTATION_STATUS
);
await
app
.
workbench
.
quickinput
.
waitForQuickInputOpened
();
await
app
.
workbench
.
quickinput
.
closeQuickInput
();
...
...
@@ -74,7 +74,7 @@ export function setup(isWeb) {
it
(
`checks if 'Go to Line' works if called from the status bar`
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
quick
open
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
quick
access
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
statusbar
.
clickOn
(
StatusBarElement
.
SELECTION_STATUS
);
await
app
.
workbench
.
quickinput
.
waitForQuickInputOpened
();
...
...
@@ -86,7 +86,7 @@ export function setup(isWeb) {
it
(
`verifies if changing EOL is reflected in the status bar`
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
quick
open
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
quick
access
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
statusbar
.
clickOn
(
StatusBarElement
.
EOL_STATUS
);
await
app
.
workbench
.
quickinput
.
waitForQuickInputOpened
();
...
...
test/smoke/src/areas/workbench/data-loss.test.ts
浏览文件 @
85d2077f
...
...
@@ -17,7 +17,7 @@ export function setup() {
const
readmeMd
=
'
readme.md
'
;
const
textToType
=
'
Hello, Code
'
;
await
app
.
workbench
.
quick
open
.
openFile
(
readmeMd
);
await
app
.
workbench
.
quick
access
.
openFile
(
readmeMd
);
await
app
.
workbench
.
editor
.
waitForTypeInEditor
(
readmeMd
,
textToType
);
await
app
.
reload
();
...
...
test/smoke/src/areas/workbench/data-migration.test.ts
浏览文件 @
85d2077f
...
...
@@ -24,11 +24,11 @@ export function setup(stableCodePath: string, testDataPath: string) {
await
stableApp
!
.
start
();
// Open 3 editors and pin 2 of them
await
stableApp
.
workbench
.
quick
open
.
openFile
(
'
www
'
);
await
stableApp
.
workbench
.
quick
open
.
runCommand
(
'
View: Keep Editor
'
);
await
stableApp
.
workbench
.
quick
access
.
openFile
(
'
www
'
);
await
stableApp
.
workbench
.
quick
access
.
runCommand
(
'
View: Keep Editor
'
);
await
stableApp
.
workbench
.
quick
open
.
openFile
(
'
app.js
'
);
await
stableApp
.
workbench
.
quick
open
.
runCommand
(
'
View: Keep Editor
'
);
await
stableApp
.
workbench
.
quick
access
.
openFile
(
'
app.js
'
);
await
stableApp
.
workbench
.
quick
access
.
runCommand
(
'
View: Keep Editor
'
);
await
stableApp
.
workbench
.
editors
.
newUntitledFile
();
...
...
@@ -70,7 +70,7 @@ export function setup(stableCodePath: string, testDataPath: string) {
const
readmeMd
=
'
readme.md
'
;
const
textToType
=
'
Hello, Code
'
;
await
stableApp
.
workbench
.
quick
open
.
openFile
(
readmeMd
);
await
stableApp
.
workbench
.
quick
access
.
openFile
(
readmeMd
);
await
stableApp
.
workbench
.
editor
.
waitForTypeInEditor
(
readmeMd
,
textToType
);
await
stableApp
.
stop
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录