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
f2c14557
Commit
f2c14557
authored
Oct 22, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump waiting time for room opened via modal in test utils
Convert more promise-based tests to async/await
parent
0d3e94c6
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
153 additions
and
162 deletions
+153
-162
spec/chatroom.js
spec/chatroom.js
+143
-147
tests/utils.js
tests/utils.js
+10
-15
No files found.
spec/chatroom.js
View file @
f2c14557
This diff is collapsed.
Click to expand it.
tests/utils.js
View file @
f2c14557
...
...
@@ -101,22 +101,17 @@
return
utils
.
waitUntil
(()
=>
_converse
.
chatboxviews
.
get
(
jid
),
1000
);
};
utils
.
openChatRoomViaModal
=
function
(
_converse
,
jid
,
nick
=
''
)
{
utils
.
openChatRoomViaModal
=
async
function
(
_converse
,
jid
,
nick
=
''
)
{
// Opens a new chatroom
return
new
Promise
(
function
(
resolve
,
reject
)
{
utils
.
openControlBox
(
_converse
);
const
roomspanel
=
_converse
.
chatboxviews
.
get
(
'
controlbox
'
).
roomspanel
;
roomspanel
.
el
.
querySelector
(
'
.show-add-muc-modal
'
).
click
();
utils
.
closeControlBox
(
_converse
);
const
modal
=
roomspanel
.
add_room_modal
;
utils
.
waitUntil
(()
=>
u
.
isVisible
(
modal
.
el
),
1000
)
.
then
(()
=>
{
await
utils
.
waitUntil
(()
=>
u
.
isVisible
(
modal
.
el
),
1500
)
modal
.
el
.
querySelector
(
'
input[name="chatroom"]
'
).
value
=
jid
;
modal
.
el
.
querySelector
(
'
input[name="nickname"]
'
).
value
=
nick
;
modal
.
el
.
querySelector
(
'
form input[type="submit"]
'
).
click
();
resolve
();
});
}).
catch
(
_
.
partial
(
console
.
error
,
_
));
};
utils
.
openChatRoom
=
function
(
_converse
,
room
,
server
,
nick
)
{
...
...
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