Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
f7b6474a
Commit
f7b6474a
authored
8 years ago
by
Gabriel Engel
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #5798 from RocketChat/increase-tests-stability
Make tests more stable
parents
7b4307fc
0285c322
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/end-to-end/ui/13-permissions.js
+2
-8
2 additions, 8 deletions
tests/end-to-end/ui/13-permissions.js
tests/pageobjects/main-content.page.js
+11
-0
11 additions, 0 deletions
tests/pageobjects/main-content.page.js
tests/pageobjects/side-nav.page.js
+5
-5
5 additions, 5 deletions
tests/pageobjects/side-nav.page.js
with
18 additions
and
13 deletions
tests/end-to-end/ui/13-permissions.js
+
2
−
8
View file @
f7b6474a
...
@@ -14,7 +14,7 @@ import {username, email, password, adminUsername, adminEmail, adminPassword} fro
...
@@ -14,7 +14,7 @@ import {username, email, password, adminUsername, adminEmail, adminPassword} fro
describe
(
'
Admin settings
'
,
()
=>
{
describe
(
'
Admin settings
'
,
()
=>
{
before
(()
=>
{
before
(()
=>
{
checkIfUserIsAdmin
(
adminUsername
,
adminEmail
,
adminPassword
);
checkIfUserIsAdmin
(
adminUsername
,
adminEmail
,
adminPassword
);
sideNav
.
getChannelFromList
(
'
general
'
).
waitFor
Exist
(
5000
);
sideNav
.
getChannelFromList
(
'
general
'
).
waitFor
Visible
(
5000
);
sideNav
.
openChannel
(
'
general
'
);
sideNav
.
openChannel
(
'
general
'
);
sideNav
.
accountBoxUserName
.
waitForVisible
(
5000
);
sideNav
.
accountBoxUserName
.
waitForVisible
(
5000
);
sideNav
.
accountBoxUserName
.
click
();
sideNav
.
accountBoxUserName
.
click
();
...
@@ -192,13 +192,7 @@ describe('Admin settings', () => {
...
@@ -192,13 +192,7 @@ describe('Admin settings', () => {
});
});
it
(
'
try to use @all and should be warned by rocket.cat
'
,
()
=>
{
it
(
'
try to use @all and should be warned by rocket.cat
'
,
()
=>
{
mainContent
.
addTextToInput
(
'
@all
'
);
mainContent
.
tryToMentionAll
();
mainContent
.
mentionAllPopUp
.
waitForVisible
(
5000
);
mainContent
.
mentionAllPopUp
.
click
();
mainContent
.
mentionAllPopUp
.
waitForVisible
(
5000
,
true
);
mainContent
.
sendBtn
.
click
();
mainContent
.
waitForLastMessageEqualsText
(
'
Notify all in this room is not allowed
'
);
mainContent
.
lastMessage
.
getText
().
should
.
equal
(
'
Notify all in this room is not allowed
'
);
});
});
it
.
skip
(
'
should not be able to delete own message
'
,
()
=>
{
it
.
skip
(
'
should not be able to delete own message
'
,
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
tests/pageobjects/main-content.page.js
+
11
−
0
View file @
f7b6474a
...
@@ -114,6 +114,17 @@ class MainContent extends Page {
...
@@ -114,6 +114,17 @@ class MainContent extends Page {
},
2000
);
},
2000
);
}
}
tryToMentionAll
()
{
this
.
addTextToInput
(
'
@all
'
);
this
.
mentionAllPopUp
.
waitForVisible
(
5000
);
browser
.
pause
(
100
);
this
.
mentionAllPopUp
.
click
();
this
.
mentionAllPopUp
.
waitForVisible
(
5000
,
true
);
this
.
sendBtn
.
click
();
this
.
waitForLastMessageEqualsText
(
'
Notify all in this room is not allowed
'
);
this
.
lastMessage
.
getText
().
should
.
equal
(
'
Notify all in this room is not allowed
'
);
}
//do one of the message actions, based on the "action" parameter inserted.
//do one of the message actions, based on the "action" parameter inserted.
selectAction
(
action
)
{
selectAction
(
action
)
{
switch
(
action
)
{
switch
(
action
)
{
...
...
This diff is collapsed.
Click to expand it.
tests/pageobjects/side-nav.page.js
+
5
−
5
View file @
f7b6474a
...
@@ -6,7 +6,7 @@ class SideNav extends Page {
...
@@ -6,7 +6,7 @@ class SideNav extends Page {
get
channelType
()
{
return
browser
.
element
(
'
label[for="channel-type"]
'
);
}
get
channelType
()
{
return
browser
.
element
(
'
label[for="channel-type"]
'
);
}
get
channelReadOnly
()
{
return
browser
.
element
(
'
label[for="channel-ro"]
'
);
}
get
channelReadOnly
()
{
return
browser
.
element
(
'
label[for="channel-ro"]
'
);
}
get
channelName
()
{
return
browser
.
element
(
'
#channel-name
'
);
}
get
channelName
()
{
return
browser
.
element
(
'
input
#channel-name
'
);
}
get
saveChannelBtn
()
{
return
browser
.
element
(
'
.save-channel
'
);
}
get
saveChannelBtn
()
{
return
browser
.
element
(
'
.save-channel
'
);
}
get
messageInput
()
{
return
browser
.
element
(
'
.input-message
'
);
}
get
messageInput
()
{
return
browser
.
element
(
'
.input-message
'
);
}
...
@@ -56,8 +56,9 @@ class SideNav extends Page {
...
@@ -56,8 +56,9 @@ class SideNav extends Page {
this
.
newChannelBtn
.
waitForVisible
(
10000
);
this
.
newChannelBtn
.
waitForVisible
(
10000
);
this
.
newChannelBtn
.
click
();
this
.
newChannelBtn
.
click
();
this
.
channelName
.
waitForVisible
(
10000
);
this
.
channelName
.
waitForVisible
(
10000
);
this
.
channelName
.
setValue
(
''
);
//workaround for incomplete setvalue bug
this
.
channelName
.
addValue
(
channelName
);
this
.
channelName
.
setValue
(
channelName
);
this
.
channelName
.
setValue
(
channelName
);
browser
.
pause
(
1000
);
browser
.
pause
(
1000
);
this
.
channelType
.
waitForVisible
(
10000
);
this
.
channelType
.
waitForVisible
(
10000
);
if
(
isPrivate
)
{
if
(
isPrivate
)
{
...
@@ -93,9 +94,8 @@ class SideNav extends Page {
...
@@ -93,9 +94,8 @@ class SideNav extends Page {
this
.
newDirectMessageBtn
.
click
();
this
.
newDirectMessageBtn
.
click
();
this
.
directMessageTarget
.
waitForVisible
(
3000
);
this
.
directMessageTarget
.
waitForVisible
(
3000
);
this
.
directMessageTarget
.
setValue
(
user
);
this
.
directMessageTarget
.
setValue
(
user
);
browser
.
waitForVisible
(
'
.-autocomplete-item
'
,
3
000
);
browser
.
waitForVisible
(
'
.-autocomplete-item
'
,
5
000
);
browser
.
click
(
'
.-autocomplete-item
'
);
browser
.
click
(
'
.-autocomplete-item
'
);
browser
.
pause
(
200
);
this
.
saveDirectMessageBtn
.
click
();
this
.
saveDirectMessageBtn
.
click
();
browser
.
waitForExist
(
'
[title="
'
+
user
+
'
"]
'
,
5000
);
browser
.
waitForExist
(
'
[title="
'
+
user
+
'
"]
'
,
5000
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment