Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Revert "Bug 957932 - Add coverage checkbox for test-agent web interface"
Browse files Browse the repository at this point in the history
This reverts commit 9270745.
  • Loading branch information
yurenju committed Jan 28, 2014
1 parent 1f727f9 commit 287db7a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 98 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -27,4 +27,7 @@ matrix:
- env: CI_ACTION=unit-tests-in-b2g
notifications:
email: false

irc:
on_success: change
channels:
- irc.mozilla.org#gaia
81 changes: 17 additions & 64 deletions test_apps/test-agent/common/vendor/test-agent/test-agent.css
Expand Up @@ -37,9 +37,10 @@ body > iframe {
padding: none;
border: none;
clear: both;
margin-top: 50px;
overflow: hidden;
margin: 4.5rem 0 0 0;
padding: 0 0 1rem 0;
margin: 0;
padding: 0 0 1em 0;

-webkit-column-width: 350px;
-moz-column-width: 350px;
Expand All @@ -53,25 +54,25 @@ body > iframe {
position: relative;

list-style: none;
padding: 0 0 0 1.5rem;
padding: 0 0 0 2em;
margin: 0;

cursor: pointer;
}

#test-agent-ui .active,
#test-agent-ui li:not(.test-agent-list-head):hover {
color: #00d;
#test-agent-ui li:hover,
#test-agent-ui .active {
text-decoration: underline;
color: #00d;
}

#test-agent-ui .active:before {
content: '*';
position: absolute;
display: block;
left: .7rem;
top: .2rem;
width: 1rem;
left: 1em;
top: .3em;
width: 1em;
}

#test-agent-ui .working {
Expand All @@ -84,51 +85,12 @@ body > iframe {

#test-agent-ui button {
clear: both;
font-size: 1.4rem;
font-size: 14px;
width: 100%;
padding: .5rem;
height: 3rem;
padding: 5px;
height: 30px;
border: 1px solid #E2E2E2;
}

#test-agent-ui .test-agent-list-head {
position: relative;

width: 100%;
margin: 1rem 0;

font-weight: bolder;
font-size: 1.2rem;
background: #CCC;
}

#test-agent-ui .test-agent-list-head-info {
position: absolute;
right: .5rem;

font-style: italic;
font-weight: normal;
}

#test-agent-ui .test-agent-list-head:hover {
text-decoration: none;
}

#test-agent-panel {
position: fixed;
top: 0;
left: 0;
padding-top: 1rem;
padding-left: 5rem;
background-color: rgba(250,250,250,0.7);
width: 100%;
height: 4.5rem;
z-index: 4;
}

#test-agent-panel .options {
margin-top: 0.2rem;
margin-left: -0.3rem;
background-color: #FAFAFA;
}

@media only screen and (max-width: 480px) {
Expand All @@ -137,22 +99,13 @@ body > iframe {
}

#test-agent-ui li {
width: 100%;
padding: .5rem 1rem .5rem 2rem;
min-height: 3em;
border-bottom: 1px solid #aaa;
padding: .5em 1em .5em 2em;
}

#test-agent-ui .active:before {
top: .8rem;
}

#test-agent-panel {
padding: 1rem;
border-bottom: 1px solid #aaa;
}

#test-agent-ui .test-agent-list-head {
margin: 0;
top: .8em;
}
}

Expand Down
23 changes: 2 additions & 21 deletions test_apps/test-agent/common/vendor/test-agent/test-agent.js
Expand Up @@ -3250,11 +3250,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WORKING: 'working',
EXECUTE: 'execute',

tasks: {
test: 'run tests',
coverage: 'run tests with coverage',
},

templates: {
testList: '<ul class="test-list"></ul>',
testItem: '<li data-url="%s">%s</li>',
Expand All @@ -3270,23 +3265,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
},

get execButton() {
if (!this._execButton) {
if(!this._execButton){
this._execButton = this.element.querySelector('button');
}
return this._execButton;
},

get command() {
var covCheckbox = document.querySelector('#test-agent-coverage-checkbox'),
covFlag = covCheckbox ? covCheckbox.checked : false;

if (covFlag) {
return this.tasks.coverage;
} else {
return this.tasks.test;
}
},

enhance: function enhance(worker) {
this.worker = worker;
this.worker.on('config', this.onConfig.bind(this));
Expand Down Expand Up @@ -3366,8 +3350,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
this.element.appendChild(fragment(templates.testRun));

this.initDomEvents();

window.dispatchEvent(new CustomEvent('test-agent-list-done'));
},

initDomEvents: function initDomEvents() {
Expand Down Expand Up @@ -3405,11 +3387,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
}
}

self.worker.emit(self.command, {tests: tests});
self.worker.emit('run tests', {tests: tests});
});
}

};

}(this));

16 changes: 5 additions & 11 deletions test_apps/test-agent/index.html
Expand Up @@ -15,17 +15,11 @@
</head>
<body>

<div id="test-agent-panel">
<form>
<input type="text" name="search" id="test-agent-search-input" />
<button type="button" id="test-agent-search-submit">Search</button>
<div class="options">
<label>
<input type="checkbox" id="test-agent-coverage-checkbox" />
Enable Coverage
</label>
</div>
</form>
<div id="test-agent-search">
<form>
<input type="text" name="search" id="test-agent-search-input" />
<button type="button" id="test-agent-search-submit">Search</button>
</form>
</div>

<!-- Test Agent UI will be loaded in here -->
Expand Down
2 changes: 1 addition & 1 deletion tools/test-agent/package.json
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"test-agent": "0.16.0",
"test-agent": "0.15.0",
"marionette-client": "0.5.4",
"b2g-scripts": "0.3.0",
"chai": "0.5.3",
Expand Down

0 comments on commit 287db7a

Please sign in to comment.