Skip to content

Remove tests directory to fix Dependabot error#2307

Open
IndiraBiswas wants to merge 1 commit intodevelopfrom
remove-tests-file-dependabot-error
Open

Remove tests directory to fix Dependabot error#2307
IndiraBiswas wants to merge 1 commit intodevelopfrom
remove-tests-file-dependabot-error

Conversation

@IndiraBiswas
Copy link
Contributor

Removed the /tests directory (which contained deprecated wp-e2e-playwright and codeception test code) to resolve several Dependabot security vulnerabilities caused by outdated test dependencies.

Copilot AI review requested due to automatic review settings March 4, 2026 11:14
@IndiraBiswas IndiraBiswas assigned juhi123 and unassigned Pradeep1308 Mar 4, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request removes the /tests directory, which contained deprecated and vulnerable testing code. This resolves Dependabot alerts related to outdated dependencies and simplifies the project's dependency management.

Highlights

  • Security Vulnerabilities: This PR addresses multiple security vulnerabilities reported by Dependabot by removing deprecated test code and dependencies.
  • Code Removal: The /tests directory, containing outdated wp-e2e-playwright and codeception test code, has been completely removed.
  • Dependency Reduction: By removing the testing directory, the number of outdated dependencies is reduced, simplifying the project and improving maintainability.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Activity
  • The primary action in this pull request is the removal of the /tests directory to address security concerns and streamline the project.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the entire /tests directory, which contained deprecated test suites for Codeception and Playwright. This is a significant and positive change, as it eliminates outdated code and resolves several security vulnerabilities reported by Dependabot that were caused by old test dependencies. The removal of these tests simplifies the codebase and reduces future maintenance overhead. The change is straightforward and aligns with the stated goal.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the deprecated /tests tree (legacy Playwright E2E + Codeception suites) to eliminate Dependabot alerts originating from outdated test-only dependencies.

Changes:

  • Deleted the tests/wp-e2e-playwright Playwright E2E harness, configs, and specs.
  • Deleted the tests/codeception Codeception test suite (configs, helpers, and Cept test cases).
  • Deleted legacy PHPUnit bootstrap/test base files under tests/.

Reviewed changes

Copilot reviewed 111 out of 117 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/wp-e2e-playwright/utils/urls.js Removed deprecated Playwright E2E helper.
tests/wp-e2e-playwright/tsconfig.json Removed deprecated Playwright E2E TypeScript config.
tests/wp-e2e-playwright/tsconfig.base.json Removed deprecated Playwright E2E TypeScript base config.
tests/wp-e2e-playwright/test_utils/backend.js Removed deprecated Playwright E2E page-object helper.
tests/wp-e2e-playwright/test_utils/activity.js Removed deprecated Playwright E2E page-object helper.
tests/wp-e2e-playwright/test-data Removed deprecated Playwright E2E test-data submodule pointer.
tests/wp-e2e-playwright/specs/types.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/prerequisite.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/other_settings/privacy.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/other_settings/custom_css.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/other_settings/03_footer_link.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/other_settings/02_user_terms.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/other_settings/01_admin-settings.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/media_size.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/display/01_single-media-view.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/cleanup.spec.js Removed deprecated Playwright E2E cleanup spec.
tests/wp-e2e-playwright/specs/buddypress/03_album_settings.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/buddypress/02_comment_media.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/buddypress/01_integrated-features.spec.js Removed deprecated Playwright E2E spec.
tests/wp-e2e-playwright/specs/TESTS.md Removed deprecated Playwright E2E documentation.
tests/wp-e2e-playwright/playwright.config.ts Removed deprecated Playwright E2E config.
tests/wp-e2e-playwright/package.json Removed deprecated Playwright E2E package manifest/deps.
tests/wp-e2e-playwright/config/global-setup.ts Removed deprecated Playwright E2E global setup.
tests/wp-e2e-playwright/config/flaky-tests-reporter.ts Removed deprecated Playwright E2E custom reporter.
tests/wp-e2e-playwright/config.ts Removed deprecated Playwright E2E env/config module.
tests/wp-e2e-playwright/bin/pr-status.js Removed deprecated Playwright E2E CI helper script.
tests/wp-e2e-playwright/bin/packages/validate-typescript-version.js Removed deprecated Playwright E2E build helper.
tests/wp-e2e-playwright/bin/packages/build.js Removed deprecated Playwright E2E build helper.
tests/wp-e2e-playwright/bin/packages/build-worker.js Removed deprecated Playwright E2E build worker.
tests/wp-e2e-playwright/README.md Removed deprecated Playwright E2E README.
tests/wp-e2e-playwright/.prettierrc.js Removed deprecated Playwright E2E formatting config.
tests/wp-e2e-playwright/.gitignore Removed deprecated Playwright E2E ignore rules.
tests/wp-e2e-playwright/.env Removed deprecated Playwright E2E local env file.
tests/rt-wp-test-case.php Removed legacy WP_UnitTestCase base test file.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/02-Negative/DisableUploadTermsOnUploadMediaCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/02-Negative/DisableUploadTermsOnActivityCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/02-Negative/DisablePrivacyMessageOnWebsiteCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/02-Negative/DisableFooterLinkCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/02-Negative/DisableAdminMenubarIntegrationCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/01-Positive/PrivacyMessageOnWebsiteAndRemovingItCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/01-Positive/PrivacyMessageOnWebsiteAndKeeoingItCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/01-Positive/EnableUploadTermsOnUploadMediaAndUsingItCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/01-Positive/EnableUploadTermsOnUploadMediaAndNotUsingItWhileUploadingCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/01-Positive/EnableUploadTermsOnActivityAndUsingItCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/01-Positive/EnableUploadTermsOnActivityAndNotUsingItWhileUploadingCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/01-Positive/EnableFooterLinkCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/07-OtherSettings/01-Positive/EnableAdminMenubarIntegrationCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/06-CustomCss/01-Positive/EnableRtmediaDefaultStlyeWithoutCustomCssCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/06-CustomCss/01-Positive/EnableRtmediaDefaultStlyeWithCustomCssCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/05-Types/02-Negative/DisableVideoMediaTypesCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/05-Types/02-Negative/DisablePhotoMediaTypesCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/05-Types/02-Negative/DisableMusicMediaTypesCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/05-Types/01-Positive/EnableVideoMediaTypesCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/05-Types/01-Positive/EnablePhotoMediaTypesCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/05-Types/01-Positive/EnableMusicMediaTypesCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/04-MediaSizes/01-Positive/SetSizeForVideoSingleplayerCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/04-MediaSizes/01-Positive/SetSizeForVideoActivityplayerCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/04-MediaSizes/01-Positive/SetSizeForPhotoThumbnailCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/04-MediaSizes/01-Positive/SetSizeForPhotoMediumCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/04-MediaSizes/01-Positive/SetSizeForPhotoLargeCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/04-MediaSizes/01-Positive/SetSizeForMusicForSingleplayerCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/04-MediaSizes/01-Positive/SetSizeForMusicForActivityplayerCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/02-Negative/DisableUploadFromActivityStreamCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/02-Negative/DisableShowAlbumDescCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/02-Negative/DisableOrganizeMediaIntoAlbumsCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/02-Negative/DisableMediaInProfileCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/02-Negative/DisableMediaInGroupCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/02-Negative/DisableMediaInCommentCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/02-Negative/DisableCreateActivityForMediaLikesCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/02-Negative/DisableCreateActivityForMediaCommentCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/01-Positive/NoOfMediaPerActivityCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/01-Positive/EnableShowAlbumDescCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/01-Positive/EnableOrganizeMediaIntoAlbumsCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/01-Positive/EnableMediaInProfileCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/01-Positive/EnableMediaInGroupCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/01-Positive/EnableMediaInCommentCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/01-Positive/EnableCreateActivityForMediaLikeCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/01-Positive/EnableCreateActivityForMediaCommentCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/03-Buddypress/01-Positive/EnableAllowUploadFromActivityStreamCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/02-Negative/DisableMasonaryLayoutCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/02-Negative/DisableLikesForMediaCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/02-Negative/DisableLightboxtestCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/02-Negative/DisableGalleryMediaSearchCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/02-Negative/DisableDirectUploadCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/02-Negative/DisableAllowUserToCommentOnUploadedMediaCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/01-Positive/SetMediaPerPageCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/01-Positive/SetMediaDisplayPaginationOptionPaginationCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/01-Positive/SetMediaDisplayPaginationOptionLoadmoreCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/01-Positive/EnableMasonryLayoutCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/01-Positive/EnableLikesForMediaCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/01-Positive/EnableLightboxtestCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/01-Positive/EnableGalleryMediaSearchCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/01-Positive/EnableDirectUploadCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/02-Display/01-Positive/EnableAllowUserToCommentOnUploadedMediaCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/01-Privacy/02-Negative/DisablePrivacyForUserCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/01-Privacy/01-Positive/SetDefaultPrivacyWithPublicOptionCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/01-Privacy/01-Positive/SetDefaultPrivacyWithPrivateOptionCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/01-Privacy/01-Positive/SetDefaultPrivacyForLoggedinUsersCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/core-rtMedia-settings/01-Privacy/01-Positive/EnablePrivacyForUserCept.php Removed legacy Codeception acceptance test case.
tests/codeception/tests/acceptance/_bootstrap.php Removed legacy Codeception acceptance bootstrap.
tests/codeception/tests/acceptance.suite.yml Removed legacy Codeception suite config.
tests/codeception/tests/_support/Page/UploadMedia.php Removed legacy Codeception page object.
tests/codeception/tests/_support/Page/Logout.php Removed legacy Codeception page object.
tests/codeception/tests/_support/Page/Login.php Removed legacy Codeception page object.
tests/codeception/tests/_support/Page/DashboardSettings.php Removed legacy Codeception page object.
tests/codeception/tests/_support/Page/Constants.php Removed legacy Codeception constants/selectors.
tests/codeception/tests/_support/Page/BuddypressSettings.php Removed legacy Codeception page object.
tests/codeception/tests/_support/Helper/Acceptance.php Removed legacy Codeception helper.
tests/codeception/tests/_support/AcceptanceTester.php Removed legacy Codeception actor definition.
tests/codeception/tests/_data/dump.sql Removed legacy Codeception placeholder data dump.
tests/codeception/tests/_bootstrap.php Removed legacy Codeception global bootstrap.
tests/codeception/composer.json Removed legacy Codeception dependency manifest.
tests/codeception/codeception.yml Removed legacy Codeception root config.
tests/codeception/README.md Removed legacy Codeception documentation.
tests/bootstrap.php Removed legacy PHPUnit bootstrap.
Comments suppressed due to low confidence (3)

tests/bootstrap.php:1

  • phpunit.xml still points to tests/bootstrap.php and a ./tests/ testsuite directory. With this file/directory removed, running PHPUnit will fail. Either update phpunit.xml to the new test location (if tests were moved) or remove/replace the PHPUnit config if the project no longer supports PHPUnit tests.
    tests/wp-e2e-playwright/package.json:1
  • The repo still contains CI automation that cds into tests/wp-e2e-playwright (e.g. .github/ci/main.sh, and the disabled .github/workflows/playwright.yml references it too). After deleting this directory, those scripts will break if re-enabled or run manually; consider updating/removing the Playwright CI script/workflow as part of this cleanup.
    tests/codeception/codeception.yml:1
  • .travis.yml still runs Codeception from tests/codeception/ (composer install + codecept run acceptance). With this directory removed, the Travis job definition will fail if used. Consider updating/removing the Travis config to reflect that Codeception tests are deprecated/removed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants