Skip to content

Commit

Permalink
还原对原有步骤描述的修改,仅新增 drag、motionEvent功能
Browse files Browse the repository at this point in the history
  • Loading branch information
YeungHoiChiu committed Jun 20, 2024
1 parent f05a1da commit e980050
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 124 deletions.
4 changes: 2 additions & 2 deletions src/components/StepShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ const getNotes = (text, type) => {
<span v-if="step.stepType === 'swipe'">
<el-tag type="info" size="small">{{ step.elements[0]['eleName'] }}</el-tag>
<el-tag size="small" style="margin-left: 10px; margin-right: 10px">{{
$t('stepDetail.swipeTo')
$t('stepDetail.dragTo')
}}</el-tag>
<el-tag type="info" size="small">{{ step.elements[1]['eleName'] }}</el-tag>
</span>
Expand Down Expand Up @@ -544,7 +544,7 @@ const getNotes = (text, type) => {
<span v-if="step.stepType === 'swipe2' || step.stepType === 'pocoSwipe'">
<el-tag type="info" size="small">{{ step.elements[0]['eleName'] }}</el-tag>
<el-tag size="small" style="margin-left: 10px; margin-right: 10px">{{
$t('stepDetail.swipeTo')
$t('stepDetail.dragTo')
}}</el-tag>
<el-tag type="info" size="small">{{ step.elements[1]['eleName'] }}</el-tag>
</span>
Expand Down
104 changes: 19 additions & 85 deletions src/components/StepUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1587,32 +1587,7 @@ onMounted(() => {
</el-form-item>
</div>

<div v-if="step.stepType === 'swipe'">
<element-select
:label="$t('stepDetail.fromControl')"
:place="
$t('stepDetail.msg.select') +
$t('stepDetail.label.androidOptions.element.coordinate.self')
"
:index="0"
:project-id="projectId"
type="point"
:step="step"
/>
<element-select
:label="$t('stepDetail.swipeTo')"
:place="
$t('stepDetail.msg.select') +
$t('stepDetail.label.androidOptions.element.coordinate.self')
"
:index="1"
:project-id="projectId"
type="point"
:step="step"
/>
</div>

<div v-if="step.stepType === 'drag'">
<div v-if="step.stepType === 'swipe' || step.stepType === 'drag'">
<element-select
:label="$t('stepDetail.fromControl')"
:place="
Expand Down Expand Up @@ -1871,9 +1846,7 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
/>
<el-form-item
prop="text"
Expand All @@ -1897,9 +1870,7 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
/>
<el-form-item
prop="text"
Expand All @@ -1923,9 +1894,7 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
/>
<el-form-item
:label="$t('stepDetail.installation')"
Expand Down Expand Up @@ -1989,9 +1958,7 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
/>
<el-form-item
prop="text"
Expand Down Expand Up @@ -2026,9 +1993,7 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
/>
<el-form-item
prop="text"
Expand Down Expand Up @@ -2361,11 +2326,7 @@ onMounted(() => {
{{ $t('stepDetail.msgTips.focus') }}
</div>
<div>
{{
`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`
}}
{{`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`}}
</div>
</template>
</el-alert>
Expand Down Expand Up @@ -2398,9 +2359,7 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.sysKey')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.sysKey')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
/>
<el-form-item :label="$t('stepDetail.inputValue')">
<el-input
Expand All @@ -2410,30 +2369,7 @@ onMounted(() => {
</el-form-item>
</div>

<div v-if="step.stepType === 'swipe2'">
<element-select
:label="$t('stepDetail.fromControl')"
:place="
$t('stepDetail.msg.select') + $t('stepDetail.control.element')
"
:index="0"
:project-id="projectId"
type="normal"
:step="step"
/>
<element-select
:label="$t('stepDetail.swipeTo')"
:place="
$t('stepDetail.msg.select') + $t('stepDetail.control.element')
"
:index="1"
:project-id="projectId"
type="normal"
:step="step"
/>
</div>

<div v-if="step.stepType === 'drag2'">
<div v-if="step.stepType === 'swipe2' || step.stepType === 'drag2'">
<element-select
:label="$t('stepDetail.fromControl')"
:place="
Expand All @@ -2455,6 +2391,8 @@ onMounted(() => {
:step="step"
/>
</div>


<div v-if="step.stepType === 'motionEvent'">
<element-select
:label="$t('stepDetail.control.element')"
Expand Down Expand Up @@ -2845,9 +2783,7 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125;`"
:title="`${$t('stepDetail.msgTips.variable')}&#123;&#123;${$t('stepDetail.variableName')}&#125;&#125;`"
/>
<global-params-select
:label="$t('stepDetail.verify.expectedValue')"
Expand Down Expand Up @@ -3179,9 +3115,7 @@ onMounted(() => {
style="margin-bottom: 10px"
close-text="Get!"
type="info"
:title="`${$t('stepDetail.use')} &#123;&#123;${$t(
'stepDetail.variableName'
)}&#125;&#125; ${$t('stepDetail.msgTips.verify')}`"
:title="`${$t('stepDetail.use')} &#123;&#123;${$t('stepDetail.variableName')}&#125;&#125; ${$t('stepDetail.msgTips.verify')}`"
/>
<el-form-item :label="$t('stepDetail.verify.actualValue')">
<el-input
Expand Down Expand Up @@ -3479,9 +3413,9 @@ onMounted(() => {
</el-table-column>
</el-table>
<div style="text-align: center; margin-top: 10px">
<el-button size="mini" @click="add()"
>{{ $t('stepDetail.new') }}
</el-button>
<el-button size="mini" @click="add()">{{
$t('stepDetail.new')
}}</el-button>
</div>
</el-tab-pane>
</el-tabs>
Expand Down Expand Up @@ -3668,8 +3602,8 @@ onMounted(() => {
</el-form>

<div style="text-align: center; margin-top: 20px">
<el-button size="small" type="primary" @click="summitStep"
>{{ $t('stepDetail.submit') }}
</el-button>
<el-button size="small" type="primary" @click="summitStep">{{
$t('stepDetail.submit')
}}</el-button>
</div>
</template>
2 changes: 1 addition & 1 deletion src/http/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { router } from '../router/index.js';

let baseURL = '';
if (process.env.NODE_ENV === 'development') {
baseURL = 'http://localhost:3000/server/api';
baseURL = 'http://172.16.2.144:3000/server/api';
}
if (process.env.NODE_ENV === 'production') {
baseURL = 'http://SONIC_SERVER_HOST:SONIC_SERVER_PORT/server/api';
Expand Down
9 changes: 4 additions & 5 deletions src/locales/lang/en_US.js
Original file line number Diff line number Diff line change
Expand Up @@ -1263,10 +1263,10 @@ const stepDetail = {
click: 'Click the Control Element',
sendKeys: 'Enter Text',
sendKeysByActions: 'Enter Text(Actions)',
swipe2: 'Swipe Control Element',
drag2: 'Drag Control Element',
swipe2: 'Drag Control Element',
drag2: 'Drag And Drop Control Element',
motion: 'Motion Event',
scrollToEle: 'Scroll to Control Element',
scrollToEle: 'Drag to Control Element',
longPress: 'Long Press Control Element',
clear: 'Clear InputBox',
obtainElementAttr: 'Get Element Attribute',
Expand Down Expand Up @@ -1352,7 +1352,7 @@ const stepDetail = {
self: 'Runtime Settings',
stepHold: 'Step Interval setting',
switchTouchMode: 'Touch Mode Setting',
},
},
},
iOSOptions: {
system: {
Expand Down Expand Up @@ -1602,7 +1602,6 @@ const stepDetail = {
touchMode: 'Set Touch Mode',
},
swipe: 'Swipe',
swipeTo: 'Swipe To',
switch: {
handler: 'Switch Handler',
webview: 'Switch Webview',
Expand Down
25 changes: 11 additions & 14 deletions src/locales/lang/ja_JP.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ const common = {
copy: '复制',
inuse: '使用済み',
inidle: 'アイドル状態',

};
// 路由
const routes = {
Expand Down Expand Up @@ -466,7 +467,7 @@ const jobsTS = {
},
addCron: '添加定时任务',
whatCron: '什么是Cron表达式?',
cronNoNext: 'N/A',
cronNoNext: "N/A",
cronInfo: {
one: '* 第一位,表示秒,取值 0-59',
two: '* 第二位,表示分,取值 0-59',
Expand Down Expand Up @@ -1063,18 +1064,16 @@ const stepDetail = {
swipeEvent: '随机两个坐标滑动',
systemEvent: 'Home、返回键等等',
navEvent: '安卓:随机开关WIFI;iOS:后台运行当前应用',
isOpenPackageListener:
'检测当前应用是否为被测应用,为否时将重新拉起被测应用',
isOpenPackageListener: '检测当前应用是否为被测应用,为否时将重新拉起被测应用',
isOpenH5Listener: '检测是否长时间停留在H5页面 (Android Only)',
isOpenActivityListener: '检测当前Activity是否在黑名单内 (Android Only)',
isOpenNetworkListener:
'检测设备是否处于飞行模式和WIFI网络 (Android Only)',
isOpenNetworkListener: '检测设备是否处于飞行模式和WIFI网络 (Android Only)',
},
},
detailConfigure: '详细配置',
delete: '删除',
detect: '检测',
dragTo: '拖拽至',
dragTo: '滑动拖拽至',
display: '显示',
downwards: '向下',
exception: {
Expand Down Expand Up @@ -1181,8 +1180,8 @@ const stepDetail = {
click: '点击控件元素',
sendKeys: '输入文本',
sendKeysByActions: '输入文本(Actions)',
swipe2: '滑动控件元素',
drag2: '拖拽控件元素',
swipe2: '拖拽控件元素',
drag2: '(长按)控件元素拖拽移动',
motion: '触控动作事件(MotionEvent)',
scrollToEle: '滚动到控件元素',
longPress: '长按控件元素',
Expand All @@ -1198,8 +1197,8 @@ const stepDetail = {
self: '坐标控件',
tap: '点击坐标',
longPressPoint: '长按坐标',
swipe: '直线滑动',
drag: '拖拽滑动',
swipe: '滑动拖拽',
drag: '(长按)坐标拖拽滑动',
motion: '触控动作事件(MotionEvent)',
},
webView: {
Expand Down Expand Up @@ -1479,8 +1478,7 @@ const stepDetail = {
port: '端口',
randomEventsTest: '随机事件测试',
refreshPage: '刷新页面',
reminderDisplay:
'三个指令前端显示上保留,用于兼容老版本升级上来之后,依然能正常的显示和运行',
reminderDisplay: '三个指令前端显示上保留,用于兼容老版本升级上来之后,依然能正常的显示和运行',
reminderVersion: '大于2.5.0版本,增强的文本断言能力',
retries: '重试次数',
retriesInterval: '重试间隔',
Expand Down Expand Up @@ -1508,9 +1506,8 @@ const stepDetail = {
textToClipboard: '设置文本至剪切板',
stepsInterval: '步骤间隔设置',
touchMode: '触控模式设置',
},
},
swipe: '滑动',
swipeTo: '滑动至',
switch: {
handler: '切换句柄',
webview: '切换webview',
Expand Down
15 changes: 7 additions & 8 deletions src/locales/lang/zh_CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ const stepDetail = {
detailConfigure: '详细配置',
delete: '删除',
detect: '检测',
dragTo: '拖拽至',
dragTo: '滑动拖拽至',
display: '显示',
downwards: '向下',
exception: {
Expand Down Expand Up @@ -1240,8 +1240,8 @@ const stepDetail = {
click: '点击控件元素',
sendKeys: '输入文本',
sendKeysByActions: '输入文本(Actions)',
swipe2: '滑动控件元素',
drag2: '拖拽控件元素',
swipe2: '拖拽控件元素',
drag2: '(长按)控件元素拖拽移动',
motion: '触控动作事件(MotionEvent)',
scrollToEle: '滚动到控件元素',
longPress: '长按控件元素',
Expand All @@ -1257,8 +1257,8 @@ const stepDetail = {
self: '坐标控件',
tap: '点击坐标',
longPressPoint: '长按坐标',
swipe: '直线滑动',
drag: '拖拽滑动',
swipe: '滑动拖拽',
drag: '(长按)坐标拖拽滑动',
motion: '触控动作事件(MotionEvent)',
},
webView: {
Expand Down Expand Up @@ -1504,7 +1504,7 @@ const stepDetail = {
'TIPS: 传递Android应用的App包名,该步骤可实现自动授权目标App所需要的所有权限',
focus: 'TIPS: 在文本框需要先获取焦点,才能进行输入时,使用此方式。',
sysKey:
'TIPS: 本功能需要先唤醒系统键盘。需要临时变量或全局变量时,可以添加',
'TIPS: 本功能需要先唤醒系统键盘。需要临时变量或全局变量时,可以添加',
table: 'TIPS: 长列表的场景下,可通过该方法连续滚动,尝试让目标元素可见',
text: 'TIPS: 可以将获取的文本放入临时变量中',
controlAttribute: 'TIPS: 可以将获取的控件属性放入临时变量中',
Expand Down Expand Up @@ -1566,9 +1566,8 @@ const stepDetail = {
textToClipboard: '设置文本至剪切板',
stepsInterval: '步骤间隔设置',
touchMode: '触控模式设置',
},
},
swipe: '滑动',
swipeTo: '滑动至',
switch: {
handler: '切换句柄',
webview: '切换webview',
Expand Down
Loading

0 comments on commit e980050

Please sign in to comment.