Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
7da5ff4a
Commit
7da5ff4a
authored
Jul 30, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a page for testing the minified JS and CSS
parent
7ee9b56d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
116 additions
and
2 deletions
+116
-2
test_minified.html
test_minified.html
+115
-0
tests_main.js
tests_main.js
+1
-2
No files found.
test_minified.html
0 → 100644
View file @
7da5ff4a
<!doctype html public "-//w3c//dtd html 4.01 transitional//en"
"http://www.w3.org/tr/html4/loose.dtd">
<html>
<head>
<title>
converse.js tests for minified files
</title>
<meta
name=
"description"
content=
"converse.js: open source browser-based instant messaging"
/>
<link
rel=
"shortcut icon"
type=
"image/png"
href=
"components/jasmine/images/jasmine_favicon.png"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"components/jasmine/src/html/jasmine.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"stylesheets/stylesheet.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"converse-0.5.0.min.css"
>
<script
src=
"converse-0.5.0.min.js"
></script>
<script
src=
"components/jasmine/lib/jasmine-core/jasmine.js"
></script>
<script
src=
"components/jasmine/lib/jasmine-core/jasmine-html.js"
></script>
<script
src=
"node_modules/jasmine-reporters/src/jasmine.console_reporter.js"
></script>
<script
src=
"node_modules/jasmine-reporters/src/jasmine.junit_reporter.js"
></script>
</head>
<body>
<div
id=
"header_wrap"
class=
"outer"
>
<header
class=
"inner"
>
<h1
id=
"project_title"
><a
href=
"http://conversejs.org"
>
converse.js
</a></h1>
<h2
id=
"project_tagline"
>
tests
</h2>
</header>
</div>
<div
id=
"chatpanel"
>
<div
id=
"collective-xmpp-chat-data"
></div>
<div
id=
"toggle-controlbox"
>
<a
href=
"#"
class=
"chat toggle-online-users"
>
<span
class=
"conn-feedback"
>
click here to chat
</span>
<strong
style=
"display: none"
id=
"online-count"
>
(0)
</strong>
</a>
</div>
</div>
<script>
require
([
'
converse
'
,
"
spec/MainSpec
"
,
"
spec/ChatRoomSpec
"
],
function
(
converse
)
{
var
mock_connection
=
{
'
muc
'
:
{
'
listRooms
'
:
function
()
{},
'
join
'
:
function
()
{},
'
leave
'
:
function
()
{},
'
removeRoom
'
:
function
()
{},
'
rooms
'
:
{}
},
'
jid
'
:
'
dummy@localhost
'
,
'
addHandler
'
:
function
(
handler
,
ns
,
name
,
type
,
id
,
from
,
options
)
{
return
function
()
{};
},
'
send
'
:
function
()
{},
'
roster
'
:
{
'
add
'
:
function
()
{},
'
authorize
'
:
function
()
{},
'
unauthorize
'
:
function
()
{},
'
get
'
:
function
()
{},
'
subscribe
'
:
function
()
{},
'
registerCallback
'
:
function
()
{}
},
'
vcard
'
:
{
'
get
'
:
function
(
callback
,
jid
)
{
var
firstname
,
lastname
;
if
(
!
jid
)
{
jid
=
'
dummy@localhost
'
;
firstname
=
'
Max
'
;
lastname
=
'
Mustermann
'
;
}
else
{
var
name
=
jid
.
split
(
'
@
'
)[
0
].
replace
(
'
.
'
,
'
'
).
split
(
'
'
);
firstname
=
name
[
0
].
charAt
(
0
).
toUpperCase
()
+
name
[
0
].
slice
(
1
);
lastname
=
name
[
1
].
charAt
(
0
).
toUpperCase
()
+
name
[
1
].
slice
(
1
);
}
var
fullname
=
firstname
+
'
'
+
lastname
;
var
vcard
=
$iq
().
c
(
'
vCard
'
).
c
(
'
FN
'
).
t
(
fullname
);
callback
(
vcard
.
tree
());
}
},
'
disco
'
:
{
'
info
'
:
function
()
{},
'
items
'
:
function
()
{}
}
};
// Set up converse.js
window
.
localStorage
.
clear
();
converse
.
initialize
({
prebind
:
false
,
xhr_user_search
:
false
,
auto_subscribe
:
false
,
animate
:
false
});
converse
.
onConnected
(
mock_connection
);
// Jasmine stuff
var
jasmineEnv
=
jasmine
.
getEnv
();
if
(
/PhantomJS/
.
test
(
navigator
.
userAgent
))
{
jasmineEnv
.
addReporter
(
new
jasmine
.
TrivialReporter
());
jasmineEnv
.
addReporter
(
new
jasmine
.
JUnitXmlReporter
(
'
./test-reports/
'
));
jasmineEnv
.
addReporter
(
new
jasmine
.
ConsoleReporter
());
jasmineEnv
.
updateInterval
=
0
;
}
else
{
var
htmlReporter
=
new
jasmine
.
HtmlReporter
();
jasmineEnv
.
addReporter
(
htmlReporter
);
jasmineEnv
.
addReporter
(
new
jasmine
.
ConsoleReporter
());
jasmineEnv
.
specFilter
=
function
(
spec
)
{
return
htmlReporter
.
specFilter
(
spec
);
};
jasmineEnv
.
updateInterval
=
200
;
}
jasmineEnv
.
execute
();
});
</script>
</body>
</html>
tests_main.js
View file @
7da5ff4a
...
@@ -80,7 +80,6 @@ require([
...
@@ -80,7 +80,6 @@ require([
// Jasmine stuff
// Jasmine stuff
var
jasmineEnv
=
jasmine
.
getEnv
();
var
jasmineEnv
=
jasmine
.
getEnv
();
if
(
/PhantomJS/
.
test
(
navigator
.
userAgent
))
{
if
(
/PhantomJS/
.
test
(
navigator
.
userAgent
))
{
console
.
log
(
'
ehllo
'
);
jasmineEnv
.
addReporter
(
new
jasmine
.
TrivialReporter
());
jasmineEnv
.
addReporter
(
new
jasmine
.
TrivialReporter
());
jasmineEnv
.
addReporter
(
new
jasmine
.
JUnitXmlReporter
(
'
./test-reports/
'
));
jasmineEnv
.
addReporter
(
new
jasmine
.
JUnitXmlReporter
(
'
./test-reports/
'
));
jasmineEnv
.
addReporter
(
new
jasmine
.
ConsoleReporter
());
jasmineEnv
.
addReporter
(
new
jasmine
.
ConsoleReporter
());
...
@@ -92,7 +91,7 @@ require([
...
@@ -92,7 +91,7 @@ require([
jasmineEnv
.
specFilter
=
function
(
spec
)
{
jasmineEnv
.
specFilter
=
function
(
spec
)
{
return
htmlReporter
.
specFilter
(
spec
);
return
htmlReporter
.
specFilter
(
spec
);
};
};
jasmineEnv
.
updateInterval
=
0
;
jasmineEnv
.
updateInterval
=
20
0
;
}
}
jasmineEnv
.
execute
();
jasmineEnv
.
execute
();
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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