Closed pAnd0rASBG closed 1 week ago
@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.
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.
Thanks @richard67 👍
Thanks!
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:
[x] No documentation changes for docs.joomla.org needed
[ ] Pull Request link for manual.joomla.org:
[x] No documentation changes for manual.joomla.org needed