Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move API system tests to cypress #40135

Merged
merged 70 commits into from
Mar 20, 2023
Merged

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Mar 16, 2023

Moves the Joomla API tests to cypress and removes the whole codeception dependency. There is only one remaining system tests for the back end media manager. As these tests are not executed in drone they will be ported in a second step.

Beside that it renames the tests/cypress folder to tests/System to be more inline with Unit and Integration.

@laoneo
Copy link
Member Author

laoneo commented Mar 16, 2023

@dgrammatiko can you have a look here if the lint:testjs command can somehow be merged into the lint:js command? Thanks.

@dgrammatiko
Copy link
Contributor

dgrammatiko commented Mar 16, 2023

You could add another line that fires the existing tasks ie:

   "lint:js": "npm run lints-src && lint:testjs",
   "lint:js-src": "eslint --config build/.eslintrc --ignore-pattern '/media/' --ext .es6.js,.es6,.vue,.cy.js .",
     "lint:testjs": "eslint --config build/.eslintrc --ext .js tests/cypress",

or combine these as one task, ie:

"lint:js": "eslint --config build/.eslintrc --ignore-pattern '/media/' --ext .es6.js,.es6,.vue,.cy.js . && eslint --config build/.eslintrc --ext .js tests/cypress",

tests/README.md Outdated Show resolved Hide resolved
@laoneo laoneo changed the title [DRAFT] Move API system tests to cypress Move API system tests to cypress Mar 17, 2023
@laoneo laoneo merged commit 7611824 into joomla:4.4-dev Mar 20, 2023
@laoneo laoneo deleted the cypress/api branch March 20, 2023 08:51
@laoneo laoneo added this to the Joomla! 4.4.0 milestone Mar 20, 2023
@@ -146,7 +146,7 @@ private function checkMimeType($mime, $component = 'com_media'): bool
);

// Get the mime type configuration
$allowedMime = array_map('trim', explode(',', $allowedMime));
$allowedMime = array_map('trim', explode(',', str_replace('\\', '', $allowedMime)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry if you've had to change the code here as part of this PR it needs properly testing. Merging stuff without any changes when you're changing library code is wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants