Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Add basic tests for frontend #48

Merged
merged 6 commits into from
Jul 4, 2018
Merged

Add basic tests for frontend #48

merged 6 commits into from
Jul 4, 2018

Conversation

garatortiz
Copy link
Contributor

Closes #10

@garatortiz garatortiz added in progress WIP Please, don't merge labels Jun 21, 2018
@ghost ghost assigned garatortiz Jun 21, 2018
@coveralls
Copy link

coveralls commented Jun 21, 2018

Pull Request Test Coverage Report for Build 135

  • 7 of 7 (100.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+20.7%) to 46.821%

Totals Coverage Status
Change from base Build 133: 20.7%
Covered Lines: 143
Relevant Lines: 264

💛 - Coveralls

@garatortiz garatortiz removed the WIP Please, don't merge label Jun 27, 2018
@@ -6,7 +6,7 @@ import Socials from './Socials'
import { footerHeight, headerBackgroundImage } from './styles/constants'
import { fullWidth } from './styles/mixins'

const BaseFooter = glamorous.div(fullWidth, {
const BaseFooter = glamorous.div([fullWidth, 'footer'], {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the array necessary here?

Copy link
Contributor Author

@garatortiz garatortiz Jul 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not... I used it only for the first expect

expect(wrapper.find('div.footer')).toHaveLength(1)
expect(wrapper.find('div div.logo-container')).toHaveLength(1)
expect(wrapper.find('div div.logo-container p')).toHaveLength(1)
expect(wrapper.find('div div.logo-container a.poa-logo')).toHaveLength(1)
expect(wrapper.find('div div.logo-container div.social-container')).toHaveLength(1)
expect(wrapper.find('div div.logo-container div.social-container a.social-item')).toHaveLength(3)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not asking why did you add the class. I'm saying that this is the only place where an array is used instead of just listing the arguments. We should use the API consistently even if glamorous accepts different ways of specifying the parameters.

But maybe there was a reason to use it this way here, that was the question.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, now I understand the question. Based on what I read about Glomorous, I understood that the way to indicate two or more classes is with an array, and when it is only one class it can be listed or use an array.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find anything about that in the documentation. Can you give me a link?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember where I had read it, or if I just tried and it worked... but I only did it for that test... in any case we can remove it if you think so.

@ghost ghost assigned fvictorio Jul 4, 2018
# Conflicts:
#	frontend/src/ui/BankAccountList.js
@garatortiz garatortiz merged commit 5191c9e into master Jul 4, 2018
@ghost ghost removed the in progress label Jul 4, 2018
@garatortiz garatortiz deleted the issue-#10 branch July 4, 2018 18:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants