Skip to content
This repository was archived by the owner on Sep 20, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/client/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function Controller() {
this._sections = new SectionList(this);
this._runButton = byId('run');
this._runFailedButton = byId('runFailed');
this._showBrowser = byId('showBrowser');

this.state = RunStates.PENDING;

Expand Down Expand Up @@ -66,6 +67,12 @@ Controller.prototype = {
byId('collapseAll').addEventListener('click', sections.collapseAll.bind(sections));
byId('expandErrors').addEventListener('click', sections.expandErrors.bind(sections));

this._showBrowser.addEventLestener('change', function(e) {
var value = e.target.value;
byId('stylesToHideBrowsers').innerText = !value ? '' :
'.section[data-browser-id]:not([data-browser-id="' + value + '"]){display:none}';
});

this._runButton.addEventListener('click', function() {
_this._run();
});
Expand Down
1 change: 1 addition & 0 deletions lib/views/main.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<button id="collapseAll" class="button">Collapse all</button>
<button id="expandErrors" class="button">Expand errors</button>
<button id="runFailed" class="button button_togglable" disabled>Retry failed tests</button>
{{> show-browser }}
{{#each suites}}
{{> suite}}
{{/each}}
Expand Down
11 changes: 11 additions & 0 deletions lib/views/partials/show-browser.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<select id="showBrowser" class="select button" name="browser">
<option value="">Show Browser</option>
{{! TODO: get browsers list }}
<option value="ie11">ie11</option>
<option value="ie9">ie9</option>
<option value="ie8">ie8</option>
<option value="chrome-latest">chrome-latest</option>
<option value="opera-v12.16">opera-v12.16</option>
<option value="firefox-latest">firefox-latest</option>
</select>
<style id="stylesToHideBrowsers"></style>