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
f724f490
Commit
f724f490
authored
Jan 29, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to run tests for transpiled code
parent
e5006b00
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
152 additions
and
10 deletions
+152
-10
css/converse.css
css/converse.css
+2
-2
css/inverse.css
css/inverse.css
+2
-2
index.html
index.html
+2
-2
sass/_controlbox.scss
sass/_controlbox.scss
+1
-1
src/converse-controlbox.js
src/converse-controlbox.js
+3
-0
src/converse-dragresize.js
src/converse-dragresize.js
+8
-3
tests/runner-transpiled.js
tests/runner-transpiled.js
+100
-0
transpiled_tests.html
transpiled_tests.html
+34
-0
No files found.
css/converse.css
View file @
f724f490
...
...
@@ -1002,7 +1002,7 @@
/* rgba supported */
border
:
1px
solid
#999
;
/*IE 6/7/8*/
border
:
none
transparent
;
border
:
none
rgba
(
0
,
0
,
0
,
0
)
;
/*IE9 + everything else*/
background-color
:
#E6E6E6
;
text-decoration
:
none
;
...
...
@@ -2282,7 +2282,7 @@
float
:
right
;
}
#conversejs
#controlbox
.controlbox-panes
{
height
:
100%
;
overflow-y
:
scroll
;
}
overflow-y
:
auto
;
}
#conversejs
#controlbox
.controlbox-pane
{
padding
:
1em
;
background-color
:
white
;
...
...
css/inverse.css
View file @
f724f490
...
...
@@ -1002,7 +1002,7 @@
/* rgba supported */
border
:
1px
solid
#999
;
/*IE 6/7/8*/
border
:
none
transparent
;
border
:
none
rgba
(
0
,
0
,
0
,
0
)
;
/*IE9 + everything else*/
background-color
:
#E6E6E6
;
text-decoration
:
none
;
...
...
@@ -2368,7 +2368,7 @@ body {
float
:
right
;
}
#conversejs
#controlbox
.controlbox-panes
{
height
:
100%
;
overflow-y
:
scroll
;
}
overflow-y
:
auto
;
}
#conversejs
#controlbox
.controlbox-pane
{
padding
:
1.2em
;
background-color
:
white
;
...
...
index.html
View file @
f724f490
...
...
@@ -16,8 +16,8 @@
<noscript><p><img
src=
"//stats.opkode.com/piwik.php?idsite=1"
style=
"border:0;"
alt=
""
/></p></noscript>
<script
src=
"src/website.js"
></script>
<
![
if
gte
IE
11
]
>
<link
type=
"text/css"
rel=
"stylesheet"
media=
"screen"
href=
"
https://cdn.conversejs.org/3.3.1/css/converse.min
.css"
/>
<script
src=
"
https://cdn.conversejs.org/3.3.1/dist/converse.min
.js"
></script>
<link
type=
"text/css"
rel=
"stylesheet"
media=
"screen"
href=
"
css/converse
.css"
/>
<script
src=
"
dist/converse
.js"
></script>
<
![
endif
]
>
</head>
...
...
sass/_controlbox.scss
View file @
f724f490
...
...
@@ -454,7 +454,7 @@
.controlbox-panes
{
height
:
100%
;
overflow-y
:
scroll
;
overflow-y
:
auto
;
}
.controlbox-pane
{
...
...
src/converse-controlbox.js
View file @
f724f490
...
...
@@ -597,6 +597,9 @@
renderTab
()
{
const
controlbox
=
_converse
.
chatboxes
.
get
(
'
controlbox
'
);
if
(
_
.
isNil
(
controlbox
))
{
return
;
}
const
chats
=
fp
.
filter
(
_
.
partial
(
u
.
isOfType
,
CHATBOX_TYPE
),
_converse
.
chatboxes
.
models
);
this
.
tab_el
.
innerHTML
=
tpl_contacts_tab
({
'
label_contacts
'
:
LABEL_CONTACTS
,
...
...
src/converse-dragresize.js
View file @
f724f490
...
...
@@ -175,7 +175,10 @@
}
else
{
height
=
""
;
}
this
.
el
.
querySelector
(
'
.box-flyout
'
).
style
.
height
=
height
;
const
flyout_el
=
this
.
el
.
querySelector
(
'
.box-flyout
'
);
if
(
!
_
.
isNull
(
flyout_el
))
{
flyout_el
.
style
.
height
=
height
;
}
},
setChatBoxWidth
(
width
)
{
...
...
@@ -186,10 +189,12 @@
width
=
""
;
}
this
.
el
.
style
.
width
=
width
;
this
.
el
.
querySelector
(
'
.box-flyout
'
).
style
.
width
=
width
;
const
flyout_el
=
this
.
el
.
querySelector
(
'
.box-flyout
'
);
if
(
!
_
.
isNull
(
flyout_el
))
{
flyout_el
.
style
.
width
=
width
;
}
},
adjustToViewport
()
{
/* Event handler called when viewport gets resized. We remove
* custom width/height from chat boxes.
...
...
tests/runner-transpiled.js
0 → 100644
View file @
f724f490
/*global config */
// Extra test dependencies
config
.
paths
.
jquery
=
"
node_modules/jquery/dist/jquery
"
;
config
.
paths
.
mock
=
"
tests/mock
"
;
config
.
paths
[
'
wait-until-promise
'
]
=
"
node_modules/wait-until-promise/index
"
;
config
.
paths
[
'
test-utils
'
]
=
"
tests/utils
"
;
config
.
paths
.
sinon
=
"
node_modules/sinon/pkg/sinon
"
;
config
.
paths
.
transcripts
=
"
converse-logs/converse-logs
"
;
config
.
paths
[
"
jasmine-core
"
]
=
"
node_modules/jasmine-core/lib/jasmine-core/jasmine
"
;
config
.
paths
.
jasmine
=
"
node_modules/jasmine-core/lib/jasmine-core/boot
"
;
config
.
paths
[
"
jasmine-console
"
]
=
"
node_modules/jasmine-core/lib/console/console
"
;
config
.
paths
[
"
console-reporter
"
]
=
"
tests/console-reporter
"
;
config
.
paths
[
"
jasmine-html
"
]
=
"
node_modules/jasmine-core/lib/jasmine-core/jasmine-html
"
;
config
.
paths
.
converse
=
"
builds/converse
"
;
config
.
paths
.
utils
=
"
builds/utils
"
;
config
.
paths
[
"
converse-bookmarks
"
]
=
"
builds/converse-bookmarks
"
;
config
.
paths
[
"
converse-chatboxes
"
]
=
"
builds/converse-chatboxes
"
;
config
.
paths
[
"
converse-chatview
"
]
=
"
builds/converse-chatview
"
;
config
.
paths
[
"
converse-controlbox
"
]
=
"
builds/converse-controlbox
"
;
config
.
paths
[
"
converse-core
"
]
=
"
builds/converse-core
"
;
config
.
paths
[
"
converse-disco
"
]
=
"
builds/converse-disco
"
;
config
.
paths
[
"
converse-dragresize
"
]
=
"
builds/converse-dragresize
"
;
config
.
paths
[
"
converse-headline
"
]
=
"
builds/converse-headline
"
;
config
.
paths
[
"
converse-fullscreen
"
]
=
"
builds/converse-fullscreen
"
;
config
.
paths
[
"
converse-mam
"
]
=
"
builds/converse-mam
"
;
config
.
paths
[
"
converse-minimize
"
]
=
"
builds/converse-minimize
"
;
config
.
paths
[
"
converse-muc
"
]
=
"
builds/converse-muc
"
;
config
.
paths
[
"
converse-muc-embedded
"
]
=
"
builds/converse-muc-embedded
"
;
config
.
paths
[
"
converse-notification
"
]
=
"
builds/converse-notification
"
;
config
.
paths
[
"
converse-otr
"
]
=
"
builds/converse-otr
"
;
config
.
paths
[
"
converse-ping
"
]
=
"
builds/converse-ping
"
;
config
.
paths
[
"
converse-profile
"
]
=
"
builds/converse-profile
"
;
config
.
paths
[
"
converse-register
"
]
=
"
builds/converse-register
"
;
config
.
paths
[
"
converse-roomslist
"
]
=
"
builds/converse-roomslist
"
;
config
.
paths
[
"
converse-rosterview
"
]
=
"
builds/converse-rosterview
"
;
config
.
paths
[
"
converse-singleton
"
]
=
"
builds/converse-singleton
"
;
config
.
paths
[
"
converse-vcard
"
]
=
"
builds/converse-vcard
"
;
config
.
shim
.
jasmine
=
{
exports
:
'
window.jasmineRequire
'
};
config
.
shim
[
'
jasmine-html
'
]
=
{
deps
:
[
'
jasmine-core
'
],
exports
:
'
window.jasmineRequire
'
};
config
.
shim
[
'
jasmine-console
'
]
=
{
deps
:
[
'
jasmine-core
'
],
exports
:
'
window.jasmineRequire
'
};
config
.
shim
.
jasmine
=
{
deps
:
[
'
jasmine-core
'
,
'
jasmine-html
'
,
'
jasmine-console
'
],
exports
:
'
window.jasmine
'
};
require
.
config
(
config
);
var
specs
=
[
"
jasmine
"
,
//"spec/transcripts",
"
spec/profiling
"
,
"
spec/utils
"
,
"
spec/converse
"
,
"
spec/bookmarks
"
,
"
spec/roomslist
"
,
"
spec/headline
"
,
"
spec/disco
"
,
"
spec/protocol
"
,
"
spec/presence
"
,
"
spec/eventemitter
"
,
"
spec/ping
"
,
"
spec/xmppstatus
"
,
"
spec/mam
"
,
"
spec/otr
"
,
"
spec/controlbox
"
,
"
spec/roster
"
,
"
spec/chatbox
"
,
"
spec/chatroom
"
,
"
spec/minchats
"
,
"
spec/notification
"
,
"
spec/register
"
];
require
([
'
console-reporter
'
,
'
mock
'
,
'
sinon
'
,
'
wait-until-promise
'
,
'
pluggable
'
],
function
(
ConsoleReporter
,
mock
,
sinon
,
waitUntilPromise
,
pluggable
)
{
window
.
sinon
=
sinon
;
waitUntilPromise
.
setPromiseImplementation
(
window
.
Promise
);
window
.
waitUntilPromise
=
waitUntilPromise
.
default
;
window
.
localStorage
.
clear
();
window
.
sessionStorage
.
clear
();
// Load the specs
require
(
specs
,
function
(
jasmine
)
{
var
jasmineEnv
=
jasmine
.
getEnv
();
jasmineEnv
.
addReporter
(
new
ConsoleReporter
());
window
.
onload
();
});
});
transpiled_tests.html
0 → 100644
View file @
f724f490
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Converse.js Tests
</title>
<meta
name=
"description"
content=
"Converse.js: A chat client for your website"
/>
<link
rel=
"shortcut icon"
type=
"image/png"
href=
"node_modules/jasmine-core/images/jasmine_favicon.png"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"node_modules/jasmine-core/lib/jasmine-core/jasmine.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"css/jasmine.css"
>
<link
type=
"text/css"
rel=
"stylesheet"
media=
"screen"
href=
"css/theme.css"
/>
<link
type=
"text/css"
rel=
"stylesheet"
media=
"screen"
href=
"css/converse.css"
/>
<script
src=
"src/config.js"
></script>
<script
data-main=
"tests/runner-transpiled"
src=
"node_modules/requirejs/require.js"
></script>
<style>
.tests-brand-heading
{
margin-top
:
1em
;
font-size
:
200%
;
}
</style>
</head>
<body>
<div
id=
"header_wrap"
class=
"outer"
>
<header
class=
"inner"
>
<h1
class=
"brand-heading tests-brand-heading"
>
<i
class=
"icon-conversejs"
></i>
Converse.js
</h1>
<h2
id=
"project_tagline"
>
Tests
</h2>
</header>
</div>
</body>
</html>
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