Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Clean the env db before running module tests locally#1408

Merged
circlecube merged 1 commit intodevelopfrom
add/test-clean-module
Nov 13, 2024
Merged

Clean the env db before running module tests locally#1408
circlecube merged 1 commit intodevelopfrom
add/test-clean-module

Conversation

@wpalani
Copy link
Copy Markdown
Member

@wpalani wpalani commented Nov 13, 2024

Proposed changes

A new script for local development only

While working on modules, an issue often comes up is tests passing locally but not in the GH action, a big driver of that is the db on the GH action is fresh vs the one locally is not because of active development. This new script does the following:

  • Stop the env wp-env stop
  • Clean the db in the env wp-env clean all
  • Start the env wp-env start
  • Run the module tests passed from the command npm run test:clean-module -- <wp-module-name>
# will run the command below
npm run test:e2e -- --browser chrome --spec "vendor/(newfold-labs/<wp-module-name>/tests/**/*.cy.js)"

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@cypress
Copy link
Copy Markdown

cypress bot commented Nov 13, 2024

Bluehost Brand Plugin    Run #11514

Run Properties:  status check passed Passed #11514  •  git commit 7db61c6a3b ℹ️: Merge 089268388cea9dcd1ded07e9fe69f630ea29a0f9 into 9f99da13246bd827e9151c1b5754...
Project Bluehost Brand Plugin
Branch Review add/test-clean-module
Run status status check passed Passed #11514
Run duration 29m 11s
Commit git commit 7db61c6a3b ℹ️: Merge 089268388cea9dcd1ded07e9fe69f630ea29a0f9 into 9f99da13246bd827e9151c1b5754...
Committer A. Alani
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 36
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 427
View all changes introduced in this branch ↗︎

@cypress
Copy link
Copy Markdown

cypress bot commented Nov 13, 2024

Bluehost Brand Plugin    Run #11515

Run Properties:  status check failed Failed #11515  •  git commit 089268388c: Add script
Project Bluehost Brand Plugin
Branch Review add/test-clean-module
Run status status check failed Failed #11515
Run duration 30m 52s
Commit git commit 089268388c: Add script
Committer wpalani
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 36
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 426
View all changes introduced in this branch ↗︎

Tests for review

Failed  vendor/newfold-labs/wp-module-notifications/tests/cypress/integration/theme-search.cy.js • 1 failed test

View Output Video

Test Artifacts
Theme Search > should not display non-matching theme search results Test Replay Screenshots Video
Flakiness  vendor/newfold-labs/wp-module-notifications/tests/cypress/integration/notifications.cy.js • 1 flaky test

View Output Video

Test Artifacts
Notifications > Dismissing notification removes it from the page Test Replay Screenshots Video
Flakiness  vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/2-general-onboarding-flow/basic-info.cy.js • 1 flaky test

View Output Video

Test Artifacts
Basic Info Page > Check Drawer Activity Test Replay Screenshots Video
Flakiness  vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/3-ecommerce-onboarding-flow/basic-info.cy.js • 1 flaky test

View Output Video

Test Artifacts
Basic Info Page > Check Drawer Activity Test Replay Screenshots Video

@circlecube circlecube added this to the November 20, 2024 Release milestone Nov 13, 2024
@circlecube circlecube merged commit ed55aab into develop Nov 13, 2024
@circlecube circlecube deleted the add/test-clean-module branch November 13, 2024 14:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants