Skip to content

Commit

Permalink
Fix css bug in modal
Browse files Browse the repository at this point in the history
  • Loading branch information
aliroemhildt committed Feb 15, 2022
1 parent 01bfa3d commit 6a28d67
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cypress/integration/Login-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ describe('Login user flow', () => {
.eq(1).type('654321')
.get('.sign-in-button')
.click()
.get('.error-message')
.get('.error-message-login')
.should('have.text', 'Username or password is incorrect')

cy.get('.sign-in-button').click()
.get('.error-message')
.get('.error-message-login')
.should('have.text', 'You are missing a required parameter of email')

cy.get('input')
.eq(0).type('[email protected]')
.get('.sign-in-button').click()
.get('.error-message')
.get('.error-message-login')
.should('have.text', 'You are missing a required parameter of password')

cy.get('.close-button').click()
Expand Down
3 changes: 3 additions & 0 deletions src/components/ErrorModal/ErrorModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@

.modal-content {
@include modal-content();
justify-content: center;
align-items: center;
}

.error-message {
margin-bottom: 20px;
text-align: center;
}
2 changes: 1 addition & 1 deletion src/components/Login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Login extends Component {
render() {

const errorMessage = this.props.errorMessage &&
<p className='error-message'>
<p className='error-message-login'>
{this.props.errorMessage}
</p>

Expand Down
4 changes: 3 additions & 1 deletion src/components/Login/Login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

.login-content {
@include modal-content();
justify-content: space-around;
align-items: flex-start;
width: 400px;
height: 300px;
}
Expand Down Expand Up @@ -78,7 +80,7 @@ input {
opacity: 0.8;
}

.error-message {
.error-message-login {
color: $red;
text-align: center;
}
4 changes: 2 additions & 2 deletions src/styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
width: 30%;
height: 35%;
@include flex-column();
justify-content: center;
align-items: center;
// justify-content: center;
// align-items: center;
border-radius: 10px;
}

Expand Down

0 comments on commit 6a28d67

Please sign in to comment.