Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
892
Issues
892
List
Boards
Labels
Service Desk
Milestones
Merge Requests
49
Merge Requests
49
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
88f598c2
Commit
88f598c2
authored
8 minutes ago
by
Brian Hatchet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing some more brittle tests
parent
1c38865e
feat/closed-channels-602
1 merge request
!499
Feat/closed channels 602
Pipeline
#80040305
running with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
38 deletions
+47
-38
channel.spec.js
cypress/integration/channel/channel.spec.js
+8
-0
discovery.spec.js
cypress/integration/discovery.spec.js
+34
-29
notification.spec.js
cypress/integration/notification.spec.js
+3
-8
wire.spec.js
cypress/integration/wire.spec.js
+2
-1
No files found.
cypress/integration/channel/channel.spec.js
View file @
88f598c2
...
...
@@ -13,6 +13,14 @@ context('Channel', () => {
cy
.
preserveCookies
();
});
after
(()
=>
{
cy
.
get
(
'
.m-channel-mode-selector--dropdown
'
)
.
click
()
.
find
(
"
.m-dropdown--list--item:contains('Public')
"
)
.
should
(
'
be.visible
'
)
.
click
();
});
it
(
'
should change channel mode to public
'
,
()
=>
{
cy
.
get
(
'
.m-channel-mode-selector--dropdown
'
)
.
click
()
...
...
This diff is collapsed.
Click to expand it.
cypress/integration/discovery.spec.js
View file @
88f598c2
...
...
@@ -18,85 +18,87 @@ context('Discovery', () => {
});
it
(
'
should be able to filter by hot
'
,
()
=>
{
cy
.
get
(
'
.m-sort-selector--algorithm-dropdown ul > li:nth-child(1)
'
)
cy
.
get
(
"
.m-sort-selector--algorithm-dropdown ul > li:contains('Hot')
"
)
.
click
()
.
should
(
'
have.c
ss
'
,
'
color
'
,
'
rgb(70, 144, 223)
'
);
// selected color
.
should
(
'
have.c
lass
'
,
'
m-dropdown--list--item--selected
'
);
// selected class
cy
.
url
().
should
(
'
include
'
,
'
/hot
'
);
});
it
(
'
should be able to filter by top
'
,
()
=>
{
cy
.
get
(
'
.m-sort-selector--algorithm-dropdown ul > li:nth-child(2)
'
)
cy
.
get
(
"
.m-sort-selector--algorithm-dropdown ul > li:contains('Top')
"
)
.
click
()
.
should
(
'
have.c
ss
'
,
'
color
'
,
'
rgb(70, 144, 223)
'
);
// selected color
.
should
(
'
have.c
lass
'
,
'
m-dropdown--list--item--selected
'
);
// selected class
cy
.
url
().
should
(
'
include
'
,
'
/top
'
);
});
it
(
'
should be able to filter by time in the top feed
'
,
()
=>
{
cy
.
get
(
'
.m-sort-selector--period-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--period-dropdown ul > li:nth-child(5)
'
).
click
();
cy
.
url
().
should
(
'
include
'
,
'
=1y
'
);
cy
.
get
(
'
.m-sort-selector--period-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--period-dropdown ul > li:nth-child(4)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--period-dropdown ul > li:contains('30d')
"
).
click
();
cy
.
url
().
should
(
'
include
'
,
'
=30d
'
);
cy
.
get
(
'
.m-sort-selector--period-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--period-dropdown ul > li:nth-child(3)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--period-dropdown ul > li:contains('7d')
"
).
click
();
cy
.
url
().
should
(
'
include
'
,
'
=7d
'
);
cy
.
get
(
'
.m-sort-selector--period-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--period-dropdown ul > li:nth-child(2)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--period-dropdown ul > li:contains('24h')
"
).
click
();
cy
.
url
().
should
(
'
include
'
,
'
=24h
'
);
cy
.
get
(
'
.m-sort-selector--period-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--period-dropdown ul > li:nth-child(1)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--period-dropdown ul > li:contains('12h')
"
).
click
();
cy
.
url
().
should
(
'
include
'
,
'
=12h
'
);
});
it
(
'
should filter by latest
'
,
()
=>
{
cy
.
get
(
'
.m-sort-selector--algorithm-dropdown ul > li:nth-child(3)
'
)
cy
.
get
(
"
.m-sort-selector--algorithm-dropdown ul > li:contains('Latest')
"
)
.
click
()
.
should
(
'
have.c
ss
'
,
'
color
'
,
'
rgb(70, 144, 223)
'
);
// selected color
.
should
(
'
have.c
lass
'
,
'
m-dropdown--list--item--selected
'
);
// selected class
cy
.
url
().
should
(
'
include
'
,
'
/latest
'
);
});
it
(
'
should filter by image
'
,
()
=>
{
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown ul > li:nth-child(2)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--custom-type-dropdown ul > li:contains('photo')
"
)
.
click
();
cy
.
url
().
should
(
'
include
'
,
'
=images
'
);
});
it
(
'
should filter by video
'
,
()
=>
{
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown ul > li:nth-child(3)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--custom-type-dropdown ul > li:contains('videocam')
"
)
.
click
();
cy
.
url
().
should
(
'
include
'
,
'
=videos
'
);
});
it
(
'
should filter by blog
'
,
()
=>
{
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown ul > li:nth-child(4)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--custom-type-dropdown ul > li:contains('subject')
"
)
.
click
();
cy
.
url
().
should
(
'
include
'
,
'
=blog
'
);
});
it
(
'
should filter by channels
'
,
()
=>
{
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown ul > li:nth-child(5)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--custom-type-dropdown ul > li:contains('people')
"
)
.
click
();
cy
.
url
().
should
(
'
include
'
,
'
=channels
'
);
});
it
(
'
should filter by groups
'
,
()
=>
{
cy
.
visit
(
'
/newsfeed/global/hot
'
);
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown ul > li:nth-child(6)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--custom-type-dropdown ul > li:contains('group_work')
"
)
.
click
();
cy
.
url
().
should
(
'
include
'
,
'
=groups
'
);
});
it
(
'
should filter by all
'
,
()
=>
{
cy
.
visit
(
'
/newsfeed/global/top?type=images
'
);
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown
'
).
click
();
cy
.
get
(
'
.m-sort-selector--custom-type-dropdown ul > li:nth-child(1)
'
).
click
();
cy
.
get
(
"
.m-sort-selector--custom-type-dropdown ul > li:contains('all_inclusive')
"
)
.
click
();
cy
.
url
().
should
(
'
not.include
'
,
'
=images
'
);
});
...
...
@@ -104,23 +106,26 @@ context('Discovery', () => {
cy
.
visit
(
'
/newsfeed/global/top?type=images
'
);
cy
.
get
(
'
m-topbar--navigation--options
'
).
click
();
cy
.
get
(
'
m-topbar--navigation--options label > span
'
).
click
();
cy
.
get
(
'
m-topbar--navigation--options ul > m-nsfw-selector ul > li:nth-child(1)
'
).
click
();
cy
.
get
(
'
m-topbar--navigation--options ul > m-nsfw-selector ul > li:nth-child(2)
'
).
click
();
cy
.
get
(
'
m-topbar--navigation--options ul > m-nsfw-selector ul > li:nth-child(3)
'
).
click
();
cy
.
get
(
'
m-topbar--navigation--options ul > m-nsfw-selector ul > li:nth-child(4)
'
).
click
();
cy
.
get
(
'
m-topbar--navigation--options ul > m-nsfw-selector ul > li:nth-child(5)
'
).
click
();
cy
.
get
(
'
m-topbar--navigation--options ul > m-nsfw-selector ul > li:nth-child(6)
'
).
click
();
cy
.
get
(
"
m-topbar--navigation--options ul > m-nsfw-selector ul > li:contains('Nudity')
"
).
click
();
cy
.
get
(
"
m-topbar--navigation--options ul > m-nsfw-selector ul > li:contains('Pornography')
"
).
click
();
cy
.
get
(
"
m-topbar--navigation--options ul > m-nsfw-selector ul > li:contains('Profanity')
"
).
click
();
cy
.
get
(
"
m-topbar--navigation--options ul > m-nsfw-selector ul > li:contains('Violence and Gore')
"
).
click
();
cy
.
get
(
"
m-topbar--navigation--options ul > m-nsfw-selector ul > li:contains('Race and Religion')
"
).
click
();
cy
.
get
(
"
m-topbar--navigation--options ul > m-nsfw-selector ul > li:contains('Other')
"
).
click
();
});
it
(
'
should allow the user to filter by a single hashtag
'
,
()
=>
{
cy
.
visit
(
'
/newsfeed/global/top
'
);
cy
.
get
(
'
.m-hashtagsSidebarSelector__list > ul > li:nth-child(1) .m-hashtagsSidebarSelectorList__visibility > i
'
)
.
click
();
// Will fail on non-configured users
cy
.
get
(
'
m-hashtagssidebarselector__item
'
)
.
first
()
.
click
();
});
it
(
'
should allow the user to turn off single hashtag filter and view all posts
'
,
()
=>
{
cy
.
visit
(
'
/newsfeed/global/top
'
);
cy
.
get
(
'
.m-hashtagsSidebarSelector__list > ul > li:nth-child(1) .m-hashtagsSidebarSelectorList__visibility > i
'
)
cy
.
get
(
'
m-hashtagssidebarselector__item
'
)
.
first
()
.
find
(
'
.m-hashtagsSidebarSelectorList__visibility > i
'
)
.
click
();
})
})
This diff is collapsed.
Click to expand it.
cypress/integration/notification.spec.js
View file @
88f598c2
...
...
@@ -31,13 +31,14 @@ context('Notification', () => {
cy
.
login
();
cy
.
post
(
postText
);
cy
.
logout
();
cy
.
clearCookies
();
});
/**
* After all log into new user and delete user.
*/
after
(()
=>
{
cy
.
clearCookies
();
cy
.
login
(
true
,
username
,
password
);
cy
.
deleteUser
(
username
,
password
);
});
...
...
@@ -48,6 +49,7 @@ context('Notification', () => {
* then switch users and check for the notification.
*/
beforeEach
(()
=>
{
cy
.
clearCookies
();
cy
.
login
(
false
,
username
,
password
);
cy
.
location
(
'
pathname
'
)
...
...
@@ -56,13 +58,6 @@ context('Notification', () => {
cy
.
visit
(
`/
${
Cypress
.
env
().
username
}
`
);
});
/**
* After each logout to refresh state.
*/
afterEach
(()
=>
{
cy
.
logout
();
//force to get out of notif modal
})
it
(
'
should alert the user that a post has been commented on
'
,
()
=>
{
// Comment on generated 2nd users post.
cy
.
get
(
commentButton
).
first
().
click
();
...
...
This diff is collapsed.
Click to expand it.
cypress/integration/wire.spec.js
View file @
88f598c2
...
...
@@ -23,7 +23,8 @@ context('Wire', () => {
cy
.
preserveCookies
();
});
it
(
'
should allow a user to send a wire to another user
'
,
()
=>
{
//TODO: Remove me when we get user to user wires working on the review environment
it
.
skip
(
'
should allow a user to send a wire to another user
'
,
()
=>
{
// Visit users page.
cy
.
visit
(
'
/minds
'
);
...
...
This diff is collapsed.
Click to expand it.
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