Unit/System Tests PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar pAnd0rASBG
pAnd0rASBG
11 Nov 2024

On line 22 "ci-admin" was hardcoded, causing the test to fail, if another user is configured in cypress.config.mjs

Summary of Changes

replaced ci-admin with Cypress.env('username')

Testing Instructions

Configure cypress.config.mjs to user other than "ci-admin"

Actual result BEFORE applying this Pull Request

"can display a list of actions" will fail due to "ci-admin" not being found in log

Expected result AFTER applying this Pull Request

Test will pass, due to searching for the actual username

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar pAnd0rASBG pAnd0rASBG - open - 11 Nov 2024
avatar pAnd0rASBG pAnd0rASBG - change - 11 Nov 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2024
Category JavaScript Unit Tests
avatar pAnd0rASBG pAnd0rASBG - change - 11 Nov 2024
The description was changed
avatar pAnd0rASBG pAnd0rASBG - edited - 11 Nov 2024
avatar richard67
richard67 - comment - 11 Nov 2024

@pAnd0rASBG Could you check and fix the javascript codestyle error reported by Drone here https://ci.joomla.org/joomla/joomla-cms/80258/1/20 ?

npm run lint:js

> joomla@5.2.2 lint:js
> eslint --config build/.eslintrc --ignore-pattern '/media/' --ext .es6.js,.es6,.vue .

+ npm run lint:testjs

> joomla@5.2.2 lint:testjs
> eslint --config build/.eslintrc --ext .js tests/System


/drone/src/tests/System/integration/administrator/components/com_actionlogs/Actionlogs.cy.js
  22:17  error  Unexpected string concatenation  prefer-template

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.
avatar pAnd0rASBG pAnd0rASBG - change - 11 Nov 2024
Labels Added: Unit/System Tests PR-5.2-dev
avatar pAnd0rASBG
pAnd0rASBG - comment - 11 Nov 2024

I changed the Syntax to not use the concatenation Drone was complaining about. However - I don't see why it's failing now with "Unexpected token username" as this is the Variable from Cypress' config and the test works perfectly like that.

avatar pAnd0rASBG
pAnd0rASBG - comment - 11 Nov 2024

Thanks @richard67 👍

avatar laoneo laoneo - close - 12 Nov 2024
avatar laoneo laoneo - merge - 12 Nov 2024
avatar laoneo laoneo - change - 12 Nov 2024
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-11-12 06:49:19
Closed_By laoneo
avatar laoneo
laoneo - comment - 12 Nov 2024

Thanks!

Add a Comment

Login with GitHub to post a comment