Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
d457306b
Commit
d457306b
authored
May 10, 2016
by
Rafael Ostertag
Browse files
Started working on JS acceptance tests. Reorganized jasmine tests.
parent
a0046754
Changes
10
Hide whitespace changes
Inline
Side-by-side
Gruntfile.js
View file @
d457306b
...
...
@@ -325,7 +325,7 @@ module.exports = function (grunt) {
'
js/jqx-all.js
'
,
'
js/qfq.debug.js
'
],
helpers
:
[
'
tests/jasmine/
unit/
helper/mock-ajax.js
'
],
helpers
:
[
'
tests/jasmine/helper/mock-ajax.js
'
],
template
:
'
tests/jasmine/unit/SpecRunner.tmpl
'
}
}
...
...
tests/jasmine/acceptance/spec/FileUploadSpec.js
0 → 100644
View file @
d457306b
/**
* @author Rafael Ostertag <rafael.ostertag@math.uzh.ch>
*/
/* global describe */
/* global it */
/* global expect */
/* global QfqNS */
/* global beforeAll */
/* global beforeEach */
/* global jasmine */
/* global $ */
describe
(
"
File Upload Acceptance
"
,
function
()
{
'
use strict
'
;
function
prepareForm
(
id
)
{
var
$form
;
var
$template
=
$
(
"
#
"
+
id
);
$form
=
$
(
'
#myForm
'
).
empty
();
$form
.
append
(
$template
.
text
());
}
it
(
"
handles no previous uploaded file present
"
,
function
()
{
prepareForm
(
"
fileupload_new
"
);
jasmine
.
Ajax
.
install
();
var
bla
=
$
(
'
#fileupload
'
)[
0
];
var
qfqForm
=
new
QfqNS
.
QfqForm
(
"
myForm
"
,
""
,
""
,
""
,
""
,
""
);
$
(
'
#fileupload
'
).
trigger
(
"
change
"
);
jasmine
.
Ajax
.
requests
.
mostRecent
().
respondWith
({
"
status
"
:
200
,
"
contentType
"
:
"
application/json
"
,
"
responseText
"
:
"
{
\"
status
\"
:
\"
success
\"
}
"
});
jasmine
.
Ajax
.
uninstall
();
});
});
\ No newline at end of file
tests/jasmine/
unit/
helper/mock-ajax.js
→
tests/jasmine/helper/mock-ajax.js
View file @
d457306b
File moved
tests/jasmine/
unit/
lib/jasmine-2.4.1/boot.js
→
tests/jasmine/lib/jasmine-2.4.1/boot.js
View file @
d457306b
File moved
tests/jasmine/
unit/
lib/jasmine-2.4.1/console.js
→
tests/jasmine/lib/jasmine-2.4.1/console.js
View file @
d457306b
File moved
tests/jasmine/
unit/
lib/jasmine-2.4.1/jasmine-html.js
→
tests/jasmine/lib/jasmine-2.4.1/jasmine-html.js
View file @
d457306b
File moved
tests/jasmine/
unit/
lib/jasmine-2.4.1/jasmine.css
→
tests/jasmine/lib/jasmine-2.4.1/jasmine.css
View file @
d457306b
File moved
tests/jasmine/
unit/
lib/jasmine-2.4.1/jasmine.js
→
tests/jasmine/lib/jasmine-2.4.1/jasmine.js
View file @
d457306b
File moved
tests/jasmine/
unit/
lib/jasmine-2.4.1/jasmine_favicon.png
→
tests/jasmine/lib/jasmine-2.4.1/jasmine_favicon.png
View file @
d457306b
File moved
tests/jasmine/unit/SpecRunner.html
View file @
d457306b
...
...
@@ -4,15 +4,15 @@
<meta
charset=
"utf-8"
>
<title>
Jasmine Spec Runner v2.4.1
</title>
<link
rel=
"shortcut icon"
type=
"image/png"
href=
"lib/jasmine-2.4.1/jasmine_favicon.png"
>
<link
rel=
"stylesheet"
href=
"lib/jasmine-2.4.1/jasmine.css"
>
<link
rel=
"shortcut icon"
type=
"image/png"
href=
"
../
lib/jasmine-2.4.1/jasmine_favicon.png"
>
<link
rel=
"stylesheet"
href=
"
../
lib/jasmine-2.4.1/jasmine.css"
>
<link
rel=
"stylesheet"
href=
"../../../css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"../../../css/bootstrap-theme.min.css"
>
<script
src=
"lib/jasmine-2.4.1/jasmine.js"
></script>
<script
src=
"lib/jasmine-2.4.1/jasmine-html.js"
></script>
<script
src=
"lib/jasmine-2.4.1/boot.js"
></script>
<script
src=
"helper/mock-ajax.js"
></script>
<script
src=
"
../
lib/jasmine-2.4.1/jasmine.js"
></script>
<script
src=
"
../
lib/jasmine-2.4.1/jasmine-html.js"
></script>
<script
src=
"
../
lib/jasmine-2.4.1/boot.js"
></script>
<script
src=
"
../
helper/mock-ajax.js"
></script>
<script
src=
"../../../js/jquery.min.js"
></script>
<script
src=
"../../../js/bootstrap.min.js"
></script>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment