Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fo badge component #681

Merged
merged 5 commits into from
Mar 22, 2021
Merged

Conversation

sofia-ester-calderon
Copy link
Collaborator

I added the complete test suite for the first component: Badge.

run npm run test:unit to run the tests locally.

I had to comment out previous tests because they were failing, who knows since when.

Found a potential bug: (they are commented in the test suite code)
The number of the badge is not dynamic. If a notification process is deleted, the number stays the same.

@yamelsenih yamelsenih added 28 Functional Test Functional, modular test 31 Medium Resolution Is a issue with a resolution along with month 21 Testing and removed 28 Functional Test Functional, modular test labels Mar 22, 2021
@yamelsenih
Copy link
Member

Hi @sofia-ester-calderon maybe you can resolve this in other PR:

 FAIL  tests/unit/utils/parseTime.spec.js
  ● Utils:parseTime › timestamp string

    expect(received).toBe(expected) // Object.is equality

    Expected: "2018-07-13 17:54:01"
    Received: "2018-07-13 13:54:01"

       8 |
       9 |   it('timestamp string', () => {
    > 10 |     expect(parseTime((d + ''))).toBe('2018-07-13 17:54:01')
         |                                 ^
      11 |   })                                                                                                                                                                                                                                                                
      12 |                                                                                                                                                                                                                                                                     
      13 |   it('ten digits timestamp', () => {                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                               
      at Object.<anonymous> (tests/unit/utils/parseTime.spec.js:10:33)

@yamelsenih yamelsenih merged commit 8b0a1d1 into adempiere:develop Mar 22, 2021
@sofia-ester-calderon
Copy link
Collaborator Author

sofia-ester-calderon commented Mar 24, 2021

Hi @sofia-ester-calderon maybe you can resolve this in other PR:

 FAIL  tests/unit/utils/parseTime.spec.js
  ● Utils:parseTime › timestamp string

    expect(received).toBe(expected) // Object.is equality

    Expected: "2018-07-13 17:54:01"
    Received: "2018-07-13 13:54:01"

       8 |
       9 |   it('timestamp string', () => {
    > 10 |     expect(parseTime((d + ''))).toBe('2018-07-13 17:54:01')
         |                                 ^
      11 |   })                                                                                                                                                                                                                                                                
      12 |                                                                                                                                                                                                                                                                     
      13 |   it('ten digits timestamp', () => {                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                               
      at Object.<anonymous> (tests/unit/utils/parseTime.spec.js:10:33)

Hey @yamelsenih did you run the test locally and it failed? It doesn't fail on my local machine. So I'm thinking that maybe it has to do with the timezones of our machines.
And is only that one test failing or more from that test suite?

EdwinBetanc0urt added a commit to EdwinBetanc0urt/adempiere-vue that referenced this pull request Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
21 Testing 31 Medium Resolution Is a issue with a resolution along with month
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants