Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
352
Merge Requests
55
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
cc24c0a2
Commit
cc24c0a2
authored
1 hour ago
by
Marcelo Rivera
Browse files
Options
Download
(fix): several styling fixes
(fix): e2e tests
parent
0df9c772
feat/onboarding
1 merge request
!674
Onboarding
Pipeline
#106893063
running with stages
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
116 additions
and
113 deletions
+116
-113
cypress/integration/login.spec.js
View file @
cc24c0a2
...
...
@@ -5,36 +5,36 @@ context('Login', () => {
})
it
(
'
should login
'
,
()
=>
{
cy
.
get
(
'
.m-v2-topbar__Container__LoginWrapper > a
'
).
click
();
cy
.
get
(
'
.m-v2-topbar__Container__LoginWrapper > a
'
).
c
ontains
(
'
Login
'
).
c
lick
();
cy
.
location
(
'
pathname
'
).
should
(
'
eq
'
,
'
/login
'
);
// it should have a login form
cy
.
get
(
'
.m-login
'
).
should
(
'
be.visible
'
);
cy
.
get
(
'
.m-login
__wrapper
'
).
should
(
'
be.visible
'
);
cy
.
get
(
'
minds-form-login .m-login-box .mdl-cell:first-child input
'
).
type
(
Cypress
.
env
().
username
);
cy
.
get
(
'
minds-form-login .m-login-box .mdl-cell:last-child input
'
).
type
(
Cypress
.
env
().
password
);
cy
.
get
(
'
minds-form-login .m
-btn--login
'
).
click
();
cy
.
get
(
'
minds-form-login .m
f-button--alt
'
).
click
();
cy
.
location
(
'
pathname
'
)
.
should
(
'
eq
'
,
'
/newsfeed/subscriptions
'
);
})
it
(
'
should fail to login because of incorrect password
'
,
()
=>
{
cy
.
get
(
'
.m-v2-topbar__Container__LoginWrapper > a
'
).
click
();
cy
.
get
(
'
.m-v2-topbar__Container__LoginWrapper > a
'
).
c
ontains
(
'
Login
'
).
c
lick
();
cy
.
location
(
'
pathname
'
).
should
(
'
eq
'
,
'
/login
'
);
// it should have a login form
cy
.
get
(
'
.m-login
'
).
should
(
'
be.visible
'
);
cy
.
get
(
'
.m-login
__wrapper
'
).
should
(
'
be.visible
'
);
cy
.
get
(
'
minds-form-login .m-login-box .mdl-cell:first-child input
'
).
type
(
Cypress
.
env
().
username
);
cy
.
get
(
'
minds-form-login .m-login-box .mdl-cell:last-child input
'
).
type
(
Cypress
.
env
().
password
+
'
1
'
);
cy
.
get
(
'
minds-form-login .m
-btn--login
'
).
click
();
cy
.
get
(
'
minds-form-login .m
f-button--alt
'
).
click
();
cy
.
wait
(
500
);
...
...
This diff is collapsed.
cypress/integration/onboarding/onboarding.spec.js
View file @
cc24c0a2
...
...
@@ -20,8 +20,8 @@ context('Onboarding', () => {
it
(
'
should go through the process of onboarding
'
,
()
=>
{
// notice should appear
cy
.
get
(
'
.m-onboarding__form > h1
'
).
contains
(
'
Welcome to the Minds Community
'
);
cy
.
get
(
'
.m-onboarding__form > h2
'
).
contains
(
`@
${
Cypress
.
env
().
username
}
`
);
cy
.
get
(
'
h1.m-onboarding__noticeTitle
'
).
contains
(
'
Welcome to the Minds Community
'
);
cy
.
get
(
'
h2.m-onboarding__noticeTitle
'
).
contains
(
`@
${
Cypress
.
env
().
username
}
`
);
// should redirect to /hashtags
cy
.
get
(
'
.m-onboarding__form button.mf-button
'
).
contains
(
"
Let's Get Setup
"
).
click
();
...
...
@@ -44,11 +44,11 @@ context('Onboarding', () => {
// should have a list of selectable hashtags
cy
.
get
(
'
.m-hashtags__list li.m-hashtagsList__item
'
).
contains
(
'
Art
'
).
click
();
cy
.
get
(
'
.m-hashtags__list li.m-hashtagsList__item
'
).
contains
(
'
Art
'
).
should
(
'
have.class
'
,
'
selected
'
);
cy
.
get
(
'
.m-hashtags__list li.m-hashtagsList__item
.m-hashtagsList__item--selected
'
).
contains
(
'
Art
'
);
cy
.
get
(
'
.m-hashtags__list li.m-hashtagsList__item
'
).
contains
(
'
Journalism
'
).
click
();
cy
.
get
(
'
.m-hashtags__list li.m-hashtagsList__item
'
).
contains
(
'
Journalism
'
).
should
(
'
have.class
'
,
'
selected
'
);
cy
.
get
(
'
.m-hashtags__list li.m-hashtagsList__item
.m-hashtagsList__item--
selected
'
);
cy
.
get
(
'
.m-hashtags__list li.m-hashtagsList__item
'
).
contains
(
'
Music
'
).
click
();
cy
.
get
(
'
.m-hashtags__list li.m-hashtagsList__item
'
).
contains
(
'
Music
'
).
should
(
'
have.class
'
,
'
selected
'
);
cy
.
get
(
'
.m-hashtags__list li.m-hashtagsList__item
.m-hashtagsList__item--
selected
'
);
// should have a continue and a skip button
cy
.
get
(
'
button.mf-button--hollow
'
).
contains
(
'
Skip
'
);
...
...
@@ -95,7 +95,7 @@ context('Onboarding', () => {
// should be in the Groups step
// should have a groups list
cy
.
get
(
'
.m-groupList__list
'
).
should
(
'
exist
'
);
//
cy.get('.m-groupList__list').should('exist');
// clicking on a group join button should join the group
// cy.get('.m-groupList__list .m-groupList__item:first-child .m-join__subscribe').contains('add').click();
...
...
This diff is collapsed.
cypress/integration/registration.spec.js
View file @
cc24c0a2
...
...
@@ -5,11 +5,6 @@ context('Registration', () => {
const
username
=
generateRandomId
();
const
password
=
`
${
generateRandomId
()}
0oA!`
;
const
email
=
'
test@minds.com
'
;
const
noSymbolPass
=
'
Passw0rd
'
;
const
welcomeText
=
"
Welcome to Minds!
"
;
const
passwordDontMatch
=
"
Passwords must match.
"
;
const
passwordInvalid
=
"
Password must have more than 8 characters. Including uppercase, numbers, special characters (ie. !,#,@), and cannot have spaces.
"
;
const
usernameField
=
'
minds-form-register #username
'
;
const
emailField
=
'
minds-form-register #email
'
;
...
...
@@ -64,53 +59,11 @@ context('Registration', () => {
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
//onboarding modal shown
cy
.
contains
(
welcomeText
);
});
it
(
'
should display an error if password is invalid
'
,
()
=>
{
cy
.
get
(
usernameField
)
.
focus
()
.
type
(
generateRandomId
());
cy
.
get
(
emailField
)
.
focus
()
.
type
(
email
);
cy
.
get
(
passwordField
)
.
focus
()
.
type
(
noSymbolPass
);
cy
.
wait
(
500
);
cy
.
get
(
password2Field
)
.
focus
()
.
type
(
noSymbolPass
);
cy
.
get
(
checkbox
)
.
click
({
force
:
true
});
//submit
cy
.
get
(
submitButton
)
.
click
()
.
wait
(
'
@register
'
).
then
((
xhr
)
=>
{
expect
(
xhr
.
status
).
to
.
equal
(
200
);
});
cy
.
scrollTo
(
'
top
'
);
cy
.
contains
(
passwordInvalid
);
cy
.
location
(
'
pathname
'
).
should
(
'
eq
'
,
'
/newsfeed/subscriptions
'
);
});
it
(
'
should display an error if passwords do not match
'
,
()
=>
{
cy
.
get
(
usernameField
)
.
focus
()
.
type
(
generateRandomId
());
cy
.
get
(
emailField
)
.
focus
()
.
type
(
email
);
cy
.
get
(
'
minds-form-register #password
'
)
.
focus
()
.
type
(
password
);
...
...
@@ -121,14 +74,7 @@ context('Registration', () => {
.
focus
()
.
type
(
password
+
'
!
'
);
cy
.
get
(
checkbox
)
.
click
({
force
:
true
});
//submit
cy
.
get
(
submitButton
).
click
();
cy
.
scrollTo
(
'
top
'
);
cy
.
contains
(
passwordDontMatch
);
cy
.
get
(
'
.m-register__error
'
).
contains
(
'
Passwords must match
'
);
});
})
This diff is collapsed.
src/app/modules/auth/login.component.html
View file @
cc24c0a2
<div
class=
"m-grid"
*mIfFeature=
"'register_pages-december-2019'; else oldLogin"
>
<div
class=
"m-grid__column-
6 m-grid__column__skip-4 m-grid__column-8--tablet m-grid__column__skip-3--tablet m-grid__column-10--mobile m-grid__column__skip-2
--mobile"
class=
"m-grid__column-
7 m-grid__column__skip-4 m-grid__column-10--tablet m-grid__column__skip-2--tablet m-grid__column-12--mobile m-grid__column__skip-1
--mobile"
>
<div
class=
"m-login__wrapper"
>
<minds-form-login
...
...
This diff is collapsed.
src/app/modules/auth/login.component.scss
View file @
cc24c0a2
...
...
@@ -68,6 +68,10 @@ m-login {
.m-grid
{
height
:
100%
;
padding
:
20vh
0
;
@media
screen
and
(
max-width
:
$m-grid-max-mobile
)
{
padding
:
5vh
0
;
}
}
.m-login__wrapper
{
...
...
@@ -76,9 +80,6 @@ m-login {
}
minds-form-login
{
@media
screen
and
(
max-width
:
$m-grid-max-mobile
)
{
padding
:
48px
25px
;
}
display
:
block
;
background-color
:
#fcfcfc
;
...
...
@@ -86,6 +87,23 @@ m-login {
clip-path
:
polygon
(
0
2%
,
100%
0
,
100%
97%
,
0
95%
);
@media
screen
and
(
max-width
:
$m-grid-max-mobile
)
{
padding
:
55px
26px
47px
;
h3
,
.m-register__alreadyAUser
{
text-align
:
center
;
}
.mdl-card__actions
{
margin-top
:
35px
;
label
.mdl-checkbox
{
margin-bottom
:
50px
;
}
}
}
h3
{
font-size
:
36px
;
line-height
:
48px
;
...
...
This diff is collapsed.
src/app/modules/auth/register.component.html
View file @
cc24c0a2
...
...
@@ -3,7 +3,7 @@
*mIfFeature=
"'register_pages-december-2019'; else registerBlock"
>
<div
class=
"m-grid__column-
6 m-grid__column__skip-4 m-grid__column-8--tablet m-grid__column__skip-3
--tablet m-grid__column-12--mobile m-grid__column__skip-1--mobile"
class=
"m-grid__column-
7 m-grid__column__skip-4 m-grid__column-10--tablet m-grid__column__skip-2
--tablet m-grid__column-12--mobile m-grid__column__skip-1--mobile"
>
<div
class=
"m-register__wrapper"
>
<minds-form-register
...
...
This diff is collapsed.
src/app/modules/auth/register.component.scss
View file @
cc24c0a2
...
...
@@ -43,6 +43,10 @@ m-register {
.m-grid
{
height
:
100%
;
padding
:
20vh
0
;
@media
screen
and
(
max-width
:
$m-grid-max-mobile
)
{
padding
:
5vh
0
;
}
}
.m-register__wrapper
{
...
...
@@ -56,8 +60,20 @@ m-register {
background-color
:
#fcfcfc
;
@media
screen
and
(
max-width
:
$m-grid-max-mobile
)
{
padding-left
:
25px
;
padding-right
:
25px
;
padding
:
55px
26px
47px
;
h3
,
.m-register__alreadyAUser
{
text-align
:
center
;
}
.mdl-card__actions
{
margin-top
:
35px
;
label
.mdl-checkbox
{
margin-bottom
:
50px
;
}
}
}
clip-path
:
polygon
(
0
2%
,
100%
0
,
100%
97%
,
0
95%
);
...
...
@@ -74,10 +90,10 @@ m-register {
}
.m-register__alreadyAUser
{
display
:
inline-
block
;
display
:
block
;
font-size
:
14px
;
line-height
:
19px
;
margin-bottom
:
19
px
;
margin-bottom
:
30
px
;
font-weight
:
400
;
color
:
#9b9b9b
;
...
...
This diff is collapsed.
src/app/modules/forms/login/login.scss
View file @
cc24c0a2
...
...
@@ -12,6 +12,16 @@ m-login {
color
:
themed
(
$m-blue
);
}
}
@media
screen
and
(
max-width
:
$m-grid-max-mobile
)
{
flex-direction
:
column
;
margin-right
:
0
;
margin-bottom
:
24px
;
h3
{
margin-bottom
:
0
;
}
}
}
.m-login__error
,
...
...
This diff is collapsed.
src/app/modules/onboarding-v2/page/onboarding.component.html
View file @
cc24c0a2
<div
class=
"m-grid"
>
<div
class=
"m-grid__column-
6
m-grid__column__skip-4 m-grid__column-8--tablet m-grid__column__skip-3--tablet m-grid__column-10--mobile m-grid__column__skip-2--mobile"
class=
"m-grid__column-
7
m-grid__column__skip-4 m-grid__column-8--tablet m-grid__column__skip-3--tablet m-grid__column-10--mobile m-grid__column__skip-2--mobile"
>
<div
class=
"m-onboarding__wrapper"
>
<div
class=
"m-onboarding__form"
>
...
...
This diff is collapsed.
src/app/modules/onboarding-v2/page/onboarding.component.scss
View file @
cc24c0a2
...
...
@@ -56,12 +56,6 @@ m-onboarding {
padding
:
50px
20px
;
}
@media
screen
and
(
max-width
:
740px
)
{
.m-onboarding__progressbar
{
padding-top
:
20px
;
}
}
.m-onboarding__description
{
margin
:
35px
0
;
font-size
:
16px
;
...
...
@@ -126,7 +120,7 @@ m-onboarding {
text-align
:
center
;
}
&
:not
(
.m-onboarding__noticeTitle
)
{
&
:not
(
.m-onboarding__noticeTitle
)
:not
(
.m-onboardingProgressbar__stepName
)
{
@media
screen
and
(
max-width
:
740px
)
{
color
:
#a2a2a2
;
font-size
:
13px
;
...
...
@@ -136,6 +130,7 @@ m-onboarding {
text-align
:
center
;
margin-top
:
50px
;
margin-bottom
:
0
;
padding-bottom
:
0
;
}
}
}
...
...
@@ -245,23 +240,34 @@ m-onboarding {
}
.m-onboardingControl__label
{
position
:
relative
;
&
>
label
{
font-size
:
14px
;
line-height
:
19px
;
margin-bottom
:
8px
;
}
&
>
span
{
font-style
:
italic
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
}
&
>
*
{
margin-bottom
:
8px
;
}
input
[
type
=
'text'
],
input
[
type
=
'number'
]
{
display
:
block
;
width
:
100%
;
height
:
36px
;
border
:
1px
solid
#e8e8e8
;
font-size
:
14px
;
padding-left
:
8px
;
margin-bottom
:
8px
;
@include
m-theme
()
{
color
:
themed
(
$m-grey-800
);
}
&
:active
,
&
:focus
{
...
...
@@ -278,6 +284,7 @@ m-onboarding {
m-phone-input
{
display
:
flex
;
margin-bottom
:
8px
;
.m-phone-input--wrapper
{
justify-content
:
flex-start
;
...
...
@@ -290,6 +297,12 @@ m-onboarding {
width
:
100%
;
padding-left
:
8px
;
font-size
:
14px
;
@include
m-theme
()
{
color
:
themed
(
$m-grey-800
);
}
&
:active
,
&
:focus
{
outline
:
1px
solid
#4a90e2
;
...
...
@@ -339,6 +352,7 @@ m-onboarding {
margin-left
:
10px
;
.m-tooltip--anchor
{
font-weight
:
bold
;
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
...
...
@@ -374,6 +388,7 @@ m-onboarding {
font-size
:
16px
!
important
;
line-height
:
21px
!
important
;
font-weight
:
300
!
important
;
height
:
56px
!
important
;
}
.mf-button--alt
{
...
...
@@ -382,5 +397,6 @@ m-onboarding {
color
:
white
!
important
;
font-size
:
20px
!
important
;
line-height
:
26px
!
important
;
height
:
56px
!
important
;
}
}
This diff is collapsed.
src/app/modules/onboarding-v2/steps/hashtags/hashtags.component.ts
View file @
cc24c0a2
...
...
@@ -45,7 +45,7 @@ export class HashtagsStepComponent implements OnInit {
}
skip
()
{
this
.
router
.
navigate
([
'
/onboarding
'
,
'
channels
'
]);
this
.
router
.
navigate
([
'
/onboarding
'
,
'
info
'
]);
}
continue
()
{
...
...
This diff is collapsed.
src/app/modules/onboarding-v2/steps/info/info.component.ts
View file @
cc24c0a2
...
...
@@ -77,7 +77,7 @@ export class InfoStepComponent {
}
skip
()
{
this
.
router
.
navigate
([
'
/onboarding
'
,
'
hashtag
s
'
]);
this
.
router
.
navigate
([
'
/onboarding
'
,
'
group
s
'
]);
}
continue
()
{
...
...
This diff is collapsed.
src/app/modules/onboarding-v2/steps/info/phone-input/input.component.html
View file @
cc24c0a2
...
...
@@ -13,31 +13,28 @@
<span
i18n
>
Optional
</span>
</div>
<div
class=
"m-onboarding__control"
>
<div
class=
"m-onboarding__phoneInput"
>
<div
class=
"m-onboarding__input"
>
<m-phone-input
[(ngModel)]=
"number"
ngDefaultControl
></m-phone-input>
<div
class=
"m-onboarding__error"
*ngIf=
"numberError"
>
{{ numberError }}
</div>
<div
class=
"m-onboarding__phoneInput"
>
<div
class=
"m-onboarding__input"
>
<m-phone-input
[(ngModel)]=
"number"
ngDefaultControl
></m-phone-input>
<div
class=
"m-onboarding__error"
*ngIf=
"numberError"
>
{{ numberError }}
</div>
</div>
<div
*ngIf=
"inProgress"
class=
"mdl-spinner mdl-js-spinner is-active"
[
mdl
]
></div>
<div
*ngIf=
"inProgress"
class=
"mdl-spinner mdl-js-spinner is-active"
[
mdl
]
></div>
<div
class=
"m-onboardingInput__saveButton"
[class.disabled]=
"!number || number.length < 13"
(click)=
"savePhoneNumber()"
*ngIf=
"!inProgress"
i18n
>
<i
class=
"material-icons"
>
check
</i>
</div>
<div
class=
"m-onboardingInput__saveButton"
[class.disabled]=
"!number || number.length < 13"
(click)=
"savePhoneNumber()"
*ngIf=
"!inProgress"
i18n
>
<i
class=
"material-icons"
>
check
</i>
</div>
</div>
</ng-container>
...
...
This diff is collapsed.
Please
register
or
sign in
to comment