? PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar sandewt
sandewt
25 Mar 2023

Pull Request for Issue # .

Add mod_articles_popular system test.

avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2023
Category JavaScript Unit Tests
avatar sandewt sandewt - open - 25 Mar 2023
avatar sandewt sandewt - change - 25 Mar 2023
Status New Pending
avatar sandewt
sandewt - comment - 25 Mar 2023

Result of the (local) Cypress test in browser

pr_40189

avatar brianteeman
brianteeman - comment - 25 Mar 2023

Surely thats just testing if the module loads something and not that it loads something popular

avatar sandewt
sandewt - comment - 25 Mar 2023

Surely thats just testing if the module loads something and not that it loads something popular

It would indeed be nicer to load, for example, the last five articles with one of them with the title of the test article.
The question is whether that is possible in a simple way.

I've tried that but haven't gotten it done yet.

avatar laoneo
laoneo - comment - 25 Mar 2023

For now this is ok, we can always add more tests in the future when we get more experience.

avatar laoneo laoneo - change - 25 Mar 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-03-25 08:19:45
Closed_By laoneo
Labels Added: ? PR-4.4-dev
avatar laoneo laoneo - close - 25 Mar 2023
avatar laoneo laoneo - merge - 25 Mar 2023
avatar sandewt
sandewt - comment - 25 Mar 2023

This can be achieved very easily, without the automated test article

pr_40189-2

avatar sandewt
sandewt - comment - 25 Mar 2023

@laoneo very easy to change

.then(() => cy.db_createModule({ module: 'mod_articles_popular', params: JSON.stringify({ catid: 2 }) }))
becomes
.then(() => cy.db_createModule({ module: 'mod_articles_popular }))

[EDIT I can make a new pr]

avatar sandewt
sandewt - comment - 25 Mar 2023

Note; It would then be nice to use an if statement if there are no articles yet

avatar laoneo
laoneo - comment - 25 Mar 2023

Tests should not have conditions and you have to always assume the database is empty. So you have to setup tthe database in a way you want to test it.

avatar sandewt
sandewt - comment - 25 Mar 2023

Thanks

Add a Comment

Login with GitHub to post a comment