Unit/System Tests PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar rajputanuj31
rajputanuj31
23 Dec 2023

Added a cypress api test for com_menus.

avatar rajputanuj31 rajputanuj31 - open - 23 Dec 2023
avatar rajputanuj31 rajputanuj31 - change - 23 Dec 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Dec 2023
Category JavaScript Unit Tests
avatar rajputanuj31
rajputanuj31 - comment - 25 Dec 2023

Hey @laoneo can you please check why a test is failing? Because in my local system it is working perfectly.

avatar rajputanuj31 rajputanuj31 - change - 25 Dec 2023
Labels Added: Unit/System Tests PR-4.4-dev
avatar richard67
richard67 - comment - 25 Dec 2023

@rajputanuj31 You can check the logs here https://ci.joomla.org/joomla/joomla-cms/72498/1/35 . Just use the "Show all logs" at the top of the dark frame at the right hand site to show the complete log, or use the download button in the top right corner to download the complete log file.

It shows that the "Test that menus site API endpoint can deliver a list of site menus" test is failing:

 Running:  api/com_menus/Site.cy.js                                                     (87 of 109)

  Test that menus site API endpoint
    1) can deliver a list of site menus
    ✓ can deliver a single site menu (335ms)
    ✓ can create a site menu (287ms)
    ✓ can update a site menu (429ms)
    ✓ can delete a site menu (276ms)

  4 passing (7s)
  1 failing

  1) Test that menus site API endpoint
       can deliver a list of site menus:
     AssertionError: Timed out retrying after 4000ms: expected 'Main Menu' to include 'automated test site menu'
      at  (webpack://joomla/./tests/System/integration/api/com_menus/Site.cy.js:9:9)
      at getRet (http://localhost/__cypress/runner/cypress_runner.js:118033:20)
      at tryCatcher (http://localhost/__cypress/runner/cypress_runner.js:1807:23)
      at __webpack_modules__</module.exports/Promise.try (http://localhost/__cypress/runner/cypress_runner.js:4315:29)
      at thenFn (http://localhost/__cypress/runner/cypress_runner.js:118044:60)
      at then (http://localhost/__cypress/runner/cypress_runner.js:118293:21)
      at wrapped (http://localhost/__cypress/runner/cypress_runner.js:138252:19)
      at __webpack_modules__</runCommand (http://localhost/__cypress/runner/cypress_runner.js:144143:15)
      at tryCatcher (http://localhost/__cypress/runner/cypress_runner.js:1807:23)
      at __webpack_modules__</module.exports/Promise.prototype._settlePromiseFromHandler (http://localhost/__cypress/runner/cypress_runner.js:1519:31)
      at __webpack_modules__</module.exports/Promise.prototype._settlePromise (http://localhost/__cypress/runner/cypress_runner.js:1576:18)
      at __webpack_modules__</module.exports/Promise.prototype._settlePromiseCtx (http://localhost/__cypress/runner/cypress_runner.js:1613:10)
      at _drainQueueStep (http://localhost/__cypress/runner/cypress_runner.js:2411:12)
      at _drainQueue (http://localhost/__cypress/runner/cypress_runner.js:2400:24)
      at __webpack_modules__</Async.prototype._drainQueues (http://localhost/__cypress/runner/cypress_runner.js:2416:16)
      at __webpack_modules__</Async/this.drainQueues (http://localhost/__cypress/runner/cypress_runner.js:2286:14)

Unfortunately there was (and maybe still is?) a problem with uploading the screenshots to the artifacts server so we don't have the screenshots from the failed test.

Does this help you a bit?

avatar rajputanuj31
rajputanuj31 - comment - 25 Dec 2023

@rajputanuj31 You can check the logs here https://ci.joomla.org/joomla/joomla-cms/72498/1/35 . Just use the "Show all logs" at the top of the dark frame at the right hand site to show the complete log, or use the download button in the top right corner to download the complete log file.

It shows that the "Test that menus site API endpoint can deliver a list of site menus" test is failing:

 Running:  api/com_menus/Site.cy.js                                                     (87 of 109)

  Test that menus site API endpoint
    1) can deliver a list of site menus
    ✓ can deliver a single site menu (335ms)
    ✓ can create a site menu (287ms)
    ✓ can update a site menu (429ms)
    ✓ can delete a site menu (276ms)

  4 passing (7s)
  1 failing

  1) Test that menus site API endpoint
       can deliver a list of site menus:
     AssertionError: Timed out retrying after 4000ms: expected 'Main Menu' to include 'automated test site menu'
      at  (webpack://joomla/./tests/System/integration/api/com_menus/Site.cy.js:9:9)
      at getRet (http://localhost/__cypress/runner/cypress_runner.js:118033:20)
      at tryCatcher (http://localhost/__cypress/runner/cypress_runner.js:1807:23)
      at __webpack_modules__</module.exports/Promise.try (http://localhost/__cypress/runner/cypress_runner.js:4315:29)
      at thenFn (http://localhost/__cypress/runner/cypress_runner.js:118044:60)
      at then (http://localhost/__cypress/runner/cypress_runner.js:118293:21)
      at wrapped (http://localhost/__cypress/runner/cypress_runner.js:138252:19)
      at __webpack_modules__</runCommand (http://localhost/__cypress/runner/cypress_runner.js:144143:15)
      at tryCatcher (http://localhost/__cypress/runner/cypress_runner.js:1807:23)
      at __webpack_modules__</module.exports/Promise.prototype._settlePromiseFromHandler (http://localhost/__cypress/runner/cypress_runner.js:1519:31)
      at __webpack_modules__</module.exports/Promise.prototype._settlePromise (http://localhost/__cypress/runner/cypress_runner.js:1576:18)
      at __webpack_modules__</module.exports/Promise.prototype._settlePromiseCtx (http://localhost/__cypress/runner/cypress_runner.js:1613:10)
      at _drainQueueStep (http://localhost/__cypress/runner/cypress_runner.js:2411:12)
      at _drainQueue (http://localhost/__cypress/runner/cypress_runner.js:2400:24)
      at __webpack_modules__</Async.prototype._drainQueues (http://localhost/__cypress/runner/cypress_runner.js:2416:16)
      at __webpack_modules__</Async/this.drainQueues (http://localhost/__cypress/runner/cypress_runner.js:2286:14)

Unfortunately there was (and maybe still is?) a problem with uploading the screenshots to the artifacts server so we don't have the screenshots from the failed test.

Does this help you a bit?

Thanks @richard67 for your help.

avatar laoneo laoneo - change - 17 Jan 2024
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-01-17 12:52:42
Closed_By laoneo
avatar laoneo laoneo - close - 17 Jan 2024
avatar laoneo laoneo - merge - 17 Jan 2024
avatar laoneo
laoneo - comment - 17 Jan 2024

Thanks!

Add a Comment

Login with GitHub to post a comment