Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.0 overhaul #1

Merged
merged 88 commits into from
Feb 9, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
d916285
start of filtering tests
Jan 26, 2015
cd135e8
reorganize files
adamgruber Jan 27, 2015
84ba0e3
update paths
adamgruber Jan 27, 2015
dd5c258
Remove functions to be handled by gulp build
adamgruber Jan 27, 2015
629664b
Create gulp tasks for linting and building
adamgruber Jan 27, 2015
5264176
update packages
adamgruber Jan 27, 2015
4e8a5fc
move jquery into packaged script
adamgruber Jan 27, 2015
b159b7f
update template to work with updated bootstrap collapse
adamgruber Jan 27, 2015
6c2c97d
filter using classes instead of jquery hide/show
adamgruber Jan 27, 2015
56c6838
add built files
adamgruber Jan 27, 2015
62f6e29
minify javascript; add templates file
Jan 28, 2015
8fb4933
move tasks to functions that can be called inside tasks
Jan 28, 2015
0e58227
update readme
Jan 28, 2015
214b304
Merge branch 'feature/filtering' into develop
Jan 28, 2015
dff36db
back to gulp.start()
Jan 28, 2015
b0adc64
fix watch detection
Jan 28, 2015
d7e5b6a
hide filtered suites
Jan 28, 2015
e90e45b
simplify nesting of styles
Jan 29, 2015
c2127a7
update styles
Jan 29, 2015
2d4a63b
logic to record skipped tests
Jan 29, 2015
e092675
show skipped in template
Jan 29, 2015
61fd89c
show chart when skipped tests exist
Jan 29, 2015
4973dda
updated test cases
Jan 29, 2015
baa5614
Merge branch 'develop' into feature/filter-enhance
Jan 29, 2015
46620fd
hide suites with no active filters
Jan 29, 2015
2b46d23
spacing tweaks; update footer
Jan 29, 2015
2604a66
Merge branch 'feature/filter-enhance' into develop
Jan 29, 2015
5c58395
Merge pull request #7 from grubera/develop
Jan 29, 2015
1055f53
post-release version bump
Jan 29, 2015
c61081a
require local version of handlebars
Jan 30, 2015
661c1ce
recompile templates
Jan 30, 2015
d0f4649
fix style
Jan 30, 2015
2299dba
version bump
Jan 30, 2015
c6e14f8
fix test sources
Jan 30, 2015
8ae6e1d
move moment into dependencies
Jan 30, 2015
bc91d34
updated readme
Jan 30, 2015
7332697
fix dependency issue
Jan 30, 2015
6e7b600
update package.json
Feb 2, 2015
323a5fb
hide parent suites when child suites are hidden by filters
Feb 3, 2015
e6afb1a
keep chart data at min width
Feb 3, 2015
c60e02e
update fiveby tests to use promises
Feb 3, 2015
14f42ee
update paths for fiveby tests
Feb 3, 2015
bcfead3
update fiveby config
Feb 3, 2015
481dc68
smarter filtering
Feb 3, 2015
5e93d87
update build files
Feb 3, 2015
7ab5413
turn off chart animation when there is a large number of charts
Feb 4, 2015
4b362ba
create Mochawesome object
Feb 4, 2015
de07440
update templates; use data attribute for filter
Feb 4, 2015
f670ff4
add quick summary to main page
Feb 4, 2015
814ffcf
quick summary styles and other tweaks
Feb 5, 2015
ed784e3
add title attribute in quick summary
Feb 5, 2015
3257f38
tests - icons via css not markup
Feb 5, 2015
884c26b
css icons instead of markup
Feb 5, 2015
5080662
filter click and window scroll
Feb 5, 2015
56bb7a7
update styles
Feb 5, 2015
357cfd0
build files
Feb 5, 2015
fa01051
better quick summary styles
Feb 5, 2015
9c2e28f
more style tweaks
Feb 5, 2015
8f4660a
split vendor and client scripts
Feb 5, 2015
7c5c236
update lodash
Feb 5, 2015
7e0cc13
only include parts of bootstrap needed
Feb 5, 2015
d2b2da9
update build files
Feb 5, 2015
3d58f29
Merge branch 'feature/quick-summary' into develop
Feb 6, 2015
f3c7df2
add font-awesome
Feb 6, 2015
e37ad49
style updates for mobile first
Feb 6, 2015
88312f9
updates for mobile
Feb 6, 2015
2be8a1e
add font-awesome fonts source
Feb 7, 2015
1ebbc91
custom font-icons
adamgruber Feb 8, 2015
25c64ba
mobile styles and tweaks
adamgruber Feb 8, 2015
bf3566f
remove media-queries.less
adamgruber Feb 8, 2015
acddaac
more mobile styles
adamgruber Feb 8, 2015
ae33630
mixin for applying font icon
adamgruber Feb 8, 2015
b6567ec
rework suite layout
adamgruber Feb 9, 2015
9b080a5
change colors of quick summary
adamgruber Feb 9, 2015
2755603
update icons/colors
adamgruber Feb 9, 2015
58fb5bb
footer updates
adamgruber Feb 9, 2015
cb2bfa9
localize google fonts
adamgruber Feb 9, 2015
46dd04d
throttle and debounce window events
adamgruber Feb 9, 2015
669890a
larger footer text
adamgruber Feb 9, 2015
a35a5cf
remove font-awesome; add lodash client side
adamgruber Feb 9, 2015
92f0579
update paths; mocha opts; fix watch error
adamgruber Feb 9, 2015
a28a216
clean and update build files
adamgruber Feb 9, 2015
4bcb15e
duration formatting tweaks
adamgruber Feb 9, 2015
dab110c
Merge branch 'feature/design-updates' into develop
adamgruber Feb 9, 2015
43b7a8f
updated docs; package.json
adamgruber Feb 9, 2015
b017417
adding travisci
adamgruber Feb 9, 2015
0ca7d38
fixing node dep
adamgruber Feb 9, 2015
212f513
format package.json
adamgruber Feb 9, 2015
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
Next Next commit
start of filtering tests
  • Loading branch information
Adam Gruber committed Jan 26, 2015
commit d9162857bb7a68f47a306a8b1f9d48b3b1516505
3 changes: 2 additions & 1 deletion lib/reportGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ function parseLess (callback) {
function minifyJs (callback) {
var jsReqs = [
path.join(config.nodeModulesDir, 'chart.js', 'Chart.js'),
path.join(config.nodeModulesDir, 'bootstrap', 'dist', 'js', 'bootstrap.js')
path.join(config.nodeModulesDir, 'bootstrap', 'dist', 'js', 'bootstrap.js'),
path.join(config.templatesDir, 'js', 'client.js')
];
callback(null, uglify.minify(jsReqs));
}
Expand Down
6 changes: 3 additions & 3 deletions templates/_summary.mu
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
</div>
<div class="summary-col summary-passes">
<h1 class="summary-count">{{passes}}</h1>
<h4 class="summary-label">Passed</h4>
<h4 class="summary-label summary-filter">Passed</h4>
</div>
<div class="summary-col summary-failures">
<h1 class="summary-count">{{failures}}</h1>
<h4 class="summary-label">Failed</h4>
<h4 class="summary-label summary-filter">Failed</h4>
</div>
<div class="summary-col summary-pending">
<h1 class="summary-count">{{pending}}</h1>
<h4 class="summary-label">Pending</h4>
<h4 class="summary-label summary-filter">Pending</h4>
</div>
<div class="summary-col summary-duration">
<h1 class="summary-count">{{formatSummaryDuration duration}}</h1>
Expand Down
77 changes: 77 additions & 0 deletions templates/js/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
$(function() {
var filters = {
'summary-passes': '.passed',
'summary-failures': '.failed',
'summary-pending': '.pending'
};
var activeFilters = [];
addEventHandlers();
makeSuiteCharts();

function makeSuiteCharts() {
var chartOpts = {
percentageInnerCutout : 70,
animationEasing: 'easeOutQuint',
showTooltips: false
};
var suiteCharts = document.getElementsByClassName("suite-chart");
for (var i=0; i<suiteCharts.length; i++) {
var ctx = suiteCharts[i].getContext('2d');
var data = [{
value: suiteCharts[i].getAttribute('data-total-passes')*10,
color:"#5cb85c",
highlight: "#FF5A5E",
label: "Passed"
},
{
value: suiteCharts[i].getAttribute('data-total-failures')*10,
color: "#d9534f",
highlight: "#FFC870",
label: "Failed"
},
{
value: suiteCharts[i].getAttribute('data-total-pending')*10,
color: "#999999",
highlight: "#FFC870",
label: "Pending"
}]
new Chart(ctx).Doughnut(data, chartOpts);
};
}

function addEventHandlers() {
$('.summary-filter').on('click', function (e) {
var $el = $(this),
$parent = $el.parent('.summary-col'),
filter = $parent[0].className.split(' ')[1];

if ($parent.hasClass('selected')) {
$parent.removeClass('selected');
activeFilters.splice(activeFilters.indexOf(filter), 1);
} else {
$parent.addClass('selected');
activeFilters.push(filter);
}

updateFilteredTests();
});
}

function updateFilteredTests() {
if (activeFilters.length) {
var testsToShow = [];
for (var i=0; i < activeFilters.length; i++) {
testsToShow.push(filters[activeFilters[i]]);
}
$('.test').hide().filter(testsToShow.toString()).show();
} else {
$('.test').show();
}

// TODO:
// if a suite no longer has tests showing, hide it
// then check any parent suites and if it no longer has suites showing, hide it
// work up the chain to the main suite
}

});
8 changes: 4 additions & 4 deletions templates/mochawesome.mu
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
<!-- Scripts -->
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="js/mochawesome.js"></script>
<script>
<!--<script>
window.onload = onLoadFunction;
function onLoadFunction() {
makeSuiteCharts();
}
function makeSuiteCharts(){
function makeSuiteCharts() {
var chartOpts = {
percentageInnerCutout : 70,
animationEasing: 'easeOutQuint',
Expand All @@ -80,9 +80,9 @@
highlight: "#FFC870",
label: "Pending"
}]
var chart = new Chart(ctx).Doughnut(data, chartOpts);
new Chart(ctx).Doughnut(data, chartOpts);
};
}
</script>
</script>-->
</body>
</html>
28 changes: 28 additions & 0 deletions templates/styles/_summary.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@
.summary-count {
color: @color2;
}
&.selected {
.summary-label {
background: #fff;
color: @color;
.box-shadow(inset 0px 1px 2px #ccc);
}
}
}

.summaryHover(@color) {
@color-dark: darken(@color, 11%);
.summary-label {
.linkTransition();
.user-select(none);
cursor: pointer;
&:hover {
background: @color-dark;
}
}
&.selected {
.summary-label:hover {
background: #fff;
color: @color-dark;
}
}
}

// Base Summary Styles / Layou
Expand Down Expand Up @@ -66,11 +91,14 @@
}
&.summary-passes {
.summaryColor(@brand-success);
.summaryHover(@brand-success);
}
&.summary-failures {
.summaryColor(@brand-danger);
.summaryHover(@brand-danger);
}
&.summary-pending {
.summaryColor(#999);
.summaryHover(#999);
}
}