Skip to content

Commit

Permalink
Add: show common spec lists in start page
Browse files Browse the repository at this point in the history
  • Loading branch information
itestauipi committed Nov 23, 2016
1 parent e981369 commit 8acafc0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
UI Recorder change log
====================

## ver 2.1.13 (2016-11-23)
## ver 2.1.14 (2016-11-23)

1. Add: add simulate input event when insert var in recording
2. Add: show common spec lists in start page

## ver 2.1.11 (2016-11-18)

Expand Down
8 changes: 7 additions & 1 deletion chrome-extension/js/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
var frmStart = document.getElementById('formStart');
var txtUrl = document.getElementById('url');
var btnStart = document.getElementById('btnStart');
var lstCommons = document.getElementById('commons');

// i18n
var i18n = {};
Expand All @@ -24,9 +25,14 @@
}, function(config){
i18n = config.i18n;
testVars = config.testVars;
console.log(config)
txtUrl.setAttribute('placeholder', __('start_placeholder'));
btnStart.textContent = __('start_button');
var specLists = config.specLists;
var arrHtmls = [];
for(var i in specLists){
arrHtmls.push('<option>'+specLists[i]+'</option>');
}
lstCommons.innerHTML = arrHtmls.join('');
});
txtUrl.focus();
frmStart.onsubmit = function(){
Expand Down
3 changes: 2 additions & 1 deletion chrome-extension/start.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@

<section class="webdesigntuts-workshop">
<form action="" method="get" id="formStart">
<input type="search" placeholder="" id="url">
<input type="search" placeholder="" id="url" list="commons">
<datalist id="commons"></datalist>
<button id="btnStart"></button>
</form>
<div id="copy">© alibaba.com</div>
Expand Down
2 changes: 1 addition & 1 deletion lib/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ function startRecorder(options){
break;
// 插入用例
case 'module':
var moduleName = /^[\/\\]/.test(data) ? data : commonSpecRelPath + data;
var moduleName = /[\/\\]/.test(data) ? data : commonSpecRelPath + data;
co(function*(){
console.log((' -------------- start load '+moduleName+' --------------').gray);
sendWsMessage('moduleStart', {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uirecorder",
"version": "2.1.13",
"version": "2.1.14",
"description": "A tool for record ui test case",
"main": "./index",
"bin": {
Expand Down
Binary file modified tool/uirecorder.crx
Binary file not shown.

0 comments on commit 8acafc0

Please sign in to comment.