You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/12/28 12:34:28 UTC

[GitHub] [cloudstack] weizhouapache opened a new pull request, #7030: UI: fix ui test errors

weizhouapache opened a new pull request, #7030:
URL: https://github.com/apache/cloudstack/pull/7030

   ### Description
   
   This PR fixes the UI test errors.
   
   $ npm run test:unit
   ...
   =============================== Coverage summary ===============================
   Statements   : 5.54% ( 1322/23850 )
   Branches     : 5.42% ( 636/11724 )
   Functions    : 2.59% ( 189/7311 )
   Lines        : 5.63% ( 1304/23143 )
   ================================================================================
   
   Test Suites: 4 passed, 4 total
   Tests:       175 passed, 175 total
   Snapshots:   0 total
   Time:        16.175s
   Ran all test suites.
   
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] weizhouapache commented on pull request #7030: UI: fix ui test errors

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on PR #7030:
URL: https://github.com/apache/cloudstack/pull/7030#issuecomment-1366652732

   ubuntu 20.04 is tool old. The following succeeds on ubuntu 22.04.
   
   ```
   FAIL tests/unit/components/view/ActionButton.spec.js
     ● Components > View > ActionButton.vue › Watcher › handleShowBadge() › The handleShowBadge() is not called with an empty resource
       TypeError: object.hasOwnProperty is not a function
         273 |           }
         274 |         })
       > 275 |         const handleShowBadge = jest.spyOn(wrapper.vm, 'handleShowBadge')
             |                                      ^
         276 |         await wrapper.setProps({ resource: null })
         277 |
         278 |         expect(handleShowBadge).not.toBeCalled()
         at ModuleMockerClass.spyOn (node_modules/jest-mock/build/index.js:850:36)
         at Object.<anonymous> (tests/unit/components/view/ActionButton.spec.js:275:38)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] DaanHoogland commented on pull request #7030: UI: fix ui test errors

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on PR #7030:
URL: https://github.com/apache/cloudstack/pull/7030#issuecomment-1367141727

   only github action and ui test changes, merging


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] sonarcloud[bot] commented on pull request #7030: UI: fix ui test errors

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #7030:
URL: https://github.com/apache/cloudstack/pull/7030#issuecomment-1366769901

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_cloudstack&pullRequest=7030)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7030&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7030&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7030&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7030&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7030&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7030&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7030&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7030&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_cloudstack&pullRequest=7030&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7030&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7030&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_cloudstack&pullRequest=7030&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7030&metric=coverage&view=list) No Coverage information  
   [![No Duplication information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png 'No Duplication information')](https://sonarcloud.io/component_measures?id=apache_cloudstack&pullRequest=7030&metric=duplicated_lines_density&view=list) No Duplication information
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] rohityadavcloud commented on pull request #7030: UI: fix ui test errors

Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on PR #7030:
URL: https://github.com/apache/cloudstack/pull/7030#issuecomment-1366629851

   Other failures fixed, just one remaining @weizhouapache 
   ```
   FAIL tests/unit/components/view/ActionButton.spec.js
     ● Components > View > ActionButton.vue › Watcher › handleShowBadge() › The handleShowBadge() is not called with an empty resource
   
       TypeError: object.hasOwnProperty is not a function
   
         273 |           }
         274 |         })
       > 275 |         const handleShowBadge = jest.spyOn(wrapper.vm, 'handleShowBadge')
             |                                      ^
         276 |         await wrapper.setProps({ resource: null })
         277 |
         278 |         expect(handleShowBadge).not.toBeCalled()
   
         at ModuleMockerClass.spyOn (node_modules/jest-mock/build/index.js:850:36)
         at Object.<anonymous> (tests/unit/components/view/ActionButton.spec.js:275:38)
   
     ● Components > View > ActionButton.vue › Watcher › handleShowBadge() › The handleShowBadge() is not called with a resource have containing id null
   
       TypeError: object.hasOwnProperty is not a function
   
         287 |           }
         288 |         })
       > 289 |         const handleShowBadge = jest.spyOn(wrapper.vm, 'handleShowBadge')
             |                                      ^
         290 |         await wrapper.setProps({ resource: { id: null } })
         291 |
         292 |         expect(handleShowBadge).not.toBeCalled()
   
         at ModuleMockerClass.spyOn (node_modules/jest-mock/build/index.js:850:36)
         at Object.<anonymous> (tests/unit/components/view/ActionButton.spec.js:289:38)
   
     ● Components > View > ActionButton.vue › Watcher › handleShowBadge() › The handleShowBadge() should be called with changed resource data
   
       TypeError: object.hasOwnProperty is not a function
   
         301 |           }
         302 |         })
       > 303 |         const handleShowBadge = jest.spyOn(wrapper.vm, 'handleShowBadge')
             |                                      ^
         304 |         await wrapper.setProps({
         305 |           resource: {
         306 |             id: 'test-resource-id-2'
   
         at ModuleMockerClass.spyOn (node_modules/jest-mock/build/index.js:850:36)
         at Object.<anonymous> (tests/unit/components/view/ActionButton.spec.js:303:38)
   
   
   =============================== Coverage summary ===============================
   Statements   : 5.7% ( 1373/24101 )
   Branches     : 4.83% ( 646/13375 )
   Functions    : 2.59% ( 189/7304 )
   Lines        : 5.79% ( 1354/23392 )
   ================================================================================
   Test Suites: 1 failed, 3 passed, 4 total
   Tests:       3 failed, 172 passed, 175 total
   Snapshots:   0 total
   Time:        104.483s
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] codecov[bot] commented on pull request #7030: UI: fix ui test errors

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #7030:
URL: https://github.com/apache/cloudstack/pull/7030#issuecomment-1366839519

   # [Codecov](https://codecov.io/gh/apache/cloudstack/pull/7030?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#7030](https://codecov.io/gh/apache/cloudstack/pull/7030?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (468ed8c) into [main](https://codecov.io/gh/apache/cloudstack/commit/ca7e1ac1abbe78513bfdd57b990d58e018f8d65d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ca7e1ac) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff            @@
   ##               main    #7030   +/-   ##
   =========================================
     Coverage     11.31%   11.31%           
     Complexity     7334     7334           
   =========================================
     Files          2494     2494           
     Lines        246787   246787           
     Branches      38533    38533           
   =========================================
     Hits          27933    27933           
     Misses       215255   215255           
     Partials       3599     3599           
   ```
   
   
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] DaanHoogland merged pull request #7030: UI: fix ui test errors

Posted by GitBox <gi...@apache.org>.
DaanHoogland merged PR #7030:
URL: https://github.com/apache/cloudstack/pull/7030


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] blueorangutan commented on pull request #7030: UI: fix ui test errors

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #7030:
URL: https://github.com/apache/cloudstack/pull/7030#issuecomment-1366627041

   UI build: :heavy_check_mark:
   Live QA URL: https://qa.cloudstack.cloud/simulator/pr/7030 (QA-JID-22)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] blueorangutan commented on pull request #7030: UI: fix ui test errors

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on PR #7030:
URL: https://github.com/apache/cloudstack/pull/7030#issuecomment-1366623423

   @rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] rohityadavcloud commented on pull request #7030: UI: fix ui test errors

Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on PR #7030:
URL: https://github.com/apache/cloudstack/pull/7030#issuecomment-1366622881

   @blueorangutan ui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org