Commit 4344c226 authored by Rafael Ostertag's avatar Rafael Ostertag
Browse files

Jasmine Tests can now be run from grunt.

parent aafbc7ae
......@@ -208,6 +208,21 @@ module.exports = function (grunt) {
}
}
},
jasmine: {
frontend: {
src: ['tests/jasmine/spec/*Spec.js'],
options: {
vendor: [
'js/jquery.min.js',
'js/bootstrap.min.js',
'js/jqx-all.js',
'js/qfq-jqw.debug.js'
],
helpers: ['tests/jasmine/helper/mock-ajax.js'],
template: 'tests/jasmine/SpecRunner.tmpl'
}
}
},
watch: {
scripts: {
files: [
......@@ -231,8 +246,11 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-jasmine');
// Default task(s).
grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'copy', 'less']);
grunt.registerTask('run-jasmine', ['jshint', 'concat', 'jasmine']);
};
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner</title>
<link rel="shortcut icon" type="image/png" href="<%= temp %>/jasmine_favicon.png">
<% css.forEach(function(style){ %>
<link rel="stylesheet" type="text/css" href="<%= style %>">
<% }) %>
</head>
<body>
<section class="container-fluid">
<header class="page-header">
<h1>Keep Track of Navigation State</h1>
</header>
<nav>
<ul id="qfqTabs" class="nav nav-pills" role="tablist">
<li role="presentation" class="active"><a href="#tab1" data-toggle="tab">Tab 1</a>
</li>
<li role="presentation"><a href="#tab2" data-toggle="tab">Tab 2</a>
</li>
<li role="presentation"><a href="#tab3" data-toggle="tab">Tab 3</a>
</li>
<li role="presentation" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button">
more <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="#tab4" data-toggle="tab">Tab 4 Dropdown</a></li>
<li><a href="#tab5" data-toggle="tab">Tab 5 Dropdown</a></li>
</ul>
</li>
</ul>
</nav>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="tab1">
<div class="row">
<h1 class="col-sm-12">
Tab Pane 1
</h1>
</div>
<div class="row">
<p class="col-sm-8 col-sm-offset-2">
Tab 1 Content
</p>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="tab2">
<div class="row">
<h1 class="col-sm-12">
Tab Pane 2
</h1>
</div>
<div class="row">
<p class="col-sm-8 col-sm-offset-2">
Tab 2 Content
</p>
<div class="row">
<p class="col-sm-8 col-sm-offset-2">
<input type="text" name="input1">
</p>
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="tab3">
<div class="row">
<h1 class="col-sm-12">
Tab Pane 3
</h1>
</div>
<div class="row">
<p class="col-sm-8 col-sm-offset-2">
Tab 3 Content
</p>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="tab4">
<div class="row">
<h1 class="col-sm-12">
Tab Pane 4
</h1>
</div>
<div class="row">
<p class="col-sm-8 col-sm-offset-2">
Tab 4 Content
</p>
</div>
<div class="row">
<p class="col-sm-8 col-sm-offset-2">
<input type="text" name="input2">
</p>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="tab5">
<div class="row">
<h1 class="col-sm-12">
Tab Pane 5
</h1>
</div>
<div class="row">
<p class="col-sm-8 col-sm-offset-2">
Tab 5 Content
</p>
</div>
</div>
</div>
<header>
<h1>Form</h1>
</header>
<form id="myForm" class="form-horizontal">
<div class="form-group">
<div class="col-md-2">
<label for="id" class="control-label">id</label>
</div>
<div class="col-md-6 ">
<p id="id" class="form-control-static">12345678</p>
</div>
</div>
<div class="form-group">
<div class="col-md-2">
<label for="name" class="control-label">Name</label>
</div>
<div class="col-md-6">
<input id="name" type="text" class="form-control">
</div>
</div>
<div class="form-group">
<div class="col-md-2">
<label for="firstname" class="control-label">Vorname</label>
</div>
<div class="col-md-6">
<input id="firstname" type="text" class="form-control">
</div>
</div>
<div class="form-group">
<div class="col-md-2">
<label for="nameShort" class="control-label">Vorname Kurz</label>
</div>
<div class="col-md-6">
<input id="nameShort" type="text" class="form-control">
</div>
<div class="col-md-4">
<p class="help-block ">Abgekürzter Vorname. Für "Christian" z.B. "Ch."</p>
</div>
</div>
<div class="form-group">
<div class="col-md-2">
<label for="personHandle" class="control-label">Kurzform</label>
</div>
<div class="col-md-6">
<input id="personHandle" type="text" class="form-control">
</div>
<div class="col-md-4">
<p class="help-block">Z.B. MC fuer Michel Chipot. Nur nach Absprache mit IT. Achtung: Check
emaillisten (AG...).</p>
</div>
</div>
<div class="form-group">
<div class="col-md-2">
<label for="personTitle" class="control-label">Titel</label>
</div>
<div class="col-md-6">
<select id="personTitle" class="form-control">
<option></option>
<option>Dr.</option>
<option>Prof. Dr.</option>
</select>
</div>
</div>
</form>
</section>
<% with (scripts) { %>
<% [].concat(polyfills, jasmine, boot, vendor, helpers, src, specs,reporters).forEach(function(script){ %>
<script src="<%= script %>"></script>
<% }) %>
<% }; %>
</body>
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment