Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
273ef1df
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
273ef1df
编写于
6月 08, 2018
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "smoketest: use commands instead of actions in git"
This reverts commit
1651eb2e
.
上级
57aabf1c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
18 deletion
+26
-18
test/smoke/src/areas/git/git.test.ts
test/smoke/src/areas/git/git.test.ts
+5
-12
test/smoke/src/areas/git/scm.ts
test/smoke/src/areas/git/scm.ts
+15
-0
test/smoke/src/areas/search/search.test.ts
test/smoke/src/areas/search/search.test.ts
+6
-6
未找到文件。
test/smoke/src/areas/git/git.test.ts
浏览文件 @
273ef1df
...
...
@@ -47,27 +47,24 @@ export function setup() {
it
(
'
stages correctly
'
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
quickopen
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
scm
.
openSCMViewlet
();
await
app
.
workbench
.
scm
.
waitForChange
(
'
app.js
'
,
'
Modified
'
);
await
app
.
workbench
.
scm
.
stage
(
'
app.js
'
);
await
app
.
workbench
.
quickopen
.
runCommand
(
'
Git: Stage Changes
'
);
await
app
.
workbench
.
scm
.
waitForChange
(
'
app.js
'
,
'
Index Modified
'
);
await
app
.
workbench
.
scm
.
unstage
(
'
app.js
'
);
await
app
.
workbench
.
quickopen
.
runCommand
(
'
Git: Unstage Changes
'
);
await
app
.
workbench
.
scm
.
waitForChange
(
'
app.js
'
,
'
Modified
'
);
});
it
(
`stages, commits changes and verifies outgoing change`
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
quickopen
.
openFile
(
'
app.js
'
);
await
app
.
workbench
.
scm
.
openSCMViewlet
();
await
app
.
workbench
.
scm
.
waitForChange
(
'
app.js
'
,
'
Modified
'
);
await
app
.
workbench
.
quickopen
.
runCommand
(
'
Git: Stage Changes
'
);
await
app
.
workbench
.
scm
.
waitForChange
(
'
app.js
'
,
'
Modified
'
);
await
app
.
workbench
.
scm
.
stage
(
'
app.js
'
);
await
app
.
workbench
.
scm
.
waitForChange
(
'
app.js
'
,
'
Index Modified
'
);
await
app
.
workbench
.
scm
.
commit
(
'
first commit
'
);
...
...
@@ -78,11 +75,7 @@ export function setup() {
await
app
.
workbench
.
scm
.
commit
(
'
second commit
'
);
await
app
.
code
.
waitForTextContent
(
SYNC_STATUSBAR
,
'
0↓ 2↑
'
);
});
after
(
function
()
{
const
app
=
this
.
app
as
Application
;
cp
.
execSync
(
'
git checkout .
'
,
{
cwd
:
app
.
workspacePath
});
cp
.
execSync
(
'
git reset --hard origin/master
'
,
{
cwd
:
app
.
workspacePath
});
});
});
...
...
test/smoke/src/areas/git/scm.ts
浏览文件 @
273ef1df
...
...
@@ -10,9 +10,12 @@ import { findElement, findElements, Code } from '../../vscode/code';
const
VIEWLET
=
'
div[id="workbench.view.scm"]
'
;
const
SCM_INPUT
=
`
${
VIEWLET
}
.scm-editor textarea`
;
const
SCM_RESOURCE
=
`
${
VIEWLET
}
.monaco-list-row > .resource`
;
const
SCM_RESOURCE_GROUP
=
`
${
VIEWLET
}
.monaco-list-row > .resource-group`
;
const
REFRESH_COMMAND
=
`div[id="workbench.parts.sidebar"] .actions-container a.action-label[title="Refresh"]`
;
const
COMMIT_COMMAND
=
`div[id="workbench.parts.sidebar"] .actions-container a.action-label[title="Commit"]`
;
const
SCM_RESOURCE_CLICK
=
(
name
:
string
)
=>
`
${
SCM_RESOURCE
}
.monaco-icon-label[title*="
${
name
}
"] .label-name`
;
const
SCM_RESOURCE_ACTION_CLICK
=
(
name
:
string
,
actionName
:
string
)
=>
`
${
SCM_RESOURCE
}
.monaco-icon-label[title*="
${
name
}
"] .actions .action-label[title="
${
actionName
}
"]`
;
const
SCM_RESOURCE_GROUP_COMMAND_CLICK
=
(
name
:
string
)
=>
`
${
SCM_RESOURCE_GROUP
}
.actions .action-label[title="
${
name
}
"]`
;
interface
Change
{
name
:
string
;
...
...
@@ -59,6 +62,18 @@ export class SCM extends Viewlet {
await
this
.
code
.
waitAndClick
(
SCM_RESOURCE_CLICK
(
name
));
}
async
stage
(
name
:
string
):
Promise
<
void
>
{
await
this
.
code
.
waitAndClick
(
SCM_RESOURCE_ACTION_CLICK
(
name
,
'
Stage Changes
'
));
}
async
stageAll
():
Promise
<
void
>
{
await
this
.
code
.
waitAndClick
(
SCM_RESOURCE_GROUP_COMMAND_CLICK
(
'
Stage All Changes
'
));
}
async
unstage
(
name
:
string
):
Promise
<
void
>
{
await
this
.
code
.
waitAndClick
(
SCM_RESOURCE_ACTION_CLICK
(
name
,
'
Unstage Changes
'
));
}
async
commit
(
message
:
string
):
Promise
<
void
>
{
await
this
.
code
.
waitAndClick
(
SCM_INPUT
);
await
this
.
code
.
waitForActiveElement
(
SCM_INPUT
);
...
...
test/smoke/src/areas/search/search.test.ts
浏览文件 @
273ef1df
...
...
@@ -8,6 +8,12 @@ import { Application } from '../../application';
export
function
setup
()
{
describe
(
'
Search
'
,
()
=>
{
after
(
function
()
{
const
app
=
this
.
app
as
Application
;
cp
.
execSync
(
'
git checkout .
'
,
{
cwd
:
app
.
workspacePath
});
cp
.
execSync
(
'
git reset --hard origin/master
'
,
{
cwd
:
app
.
workspacePath
});
});
it
(
'
searches for body & checks for correct result number
'
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
await
app
.
workbench
.
search
.
openSearchViewlet
();
...
...
@@ -49,11 +55,5 @@ export function setup() {
await
app
.
workbench
.
search
.
replaceFileMatch
(
'
app.js
'
);
await
app
.
workbench
.
search
.
waitForNoResultText
();
});
after
(
function
()
{
const
app
=
this
.
app
as
Application
;
cp
.
execSync
(
'
git checkout .
'
,
{
cwd
:
app
.
workspacePath
});
cp
.
execSync
(
'
git reset --hard origin/master
'
,
{
cwd
:
app
.
workspacePath
});
});
});
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录