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

Fix Cypress pretty permalink setup #930

Merged
merged 1 commit into from
Feb 23, 2024
Merged

Fix Cypress pretty permalink setup #930

merged 1 commit into from
Feb 23, 2024

Conversation

BrianHenryIE
Copy link
Contributor

When Cypress was configuing pretty permalinks it wasn't working.

Proposed changes

The fix is to add --hard to the CLI command.

Additionally, the command is only run when required and confirms it has applied successfully.

Screenshot 2024-01-31 at 4 41 05 PM

Test:

  1. Use npx wp-env destroy; npx wp-env start to create a fresh container.
  2. Visit http://localhost:8882/wp-json/ and see 404
  3. Run Cypress tests
  4. Visit http://localhost:8882/wp-json/ and see 200

Type of Change

  • Bugfix (non-breaking change which fixes an issue)

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

I thought this required a wp-cli.yml in the container with:

apache_modules:
  - mod_rewrite

but it worked ok without that. Maybe an updated to wp-env has done away with that requirement

See: WordPress/gutenberg#49373 (comment)

Copy link

cypress bot commented Feb 1, 2024

5 failed and 1 flaky tests on run #6852 ↗︎

5 303 43 0 Flakiness 1

Details:

Merge ac7b87c into f51c559...
Project: Bluehost Brand Plugin Commit: aea7f987e1 ℹ️
Status: Failed Duration: 20:37 💡
Started: Feb 1, 2024 12:46 AM Ended: Feb 1, 2024 1:07 AM
Failed  vendor/newfold-labs/wp-module-global-ctb/tests/cypress/integration/global-ctb.cy.js • 2 failed tests

View Output Video

Test Artifacts
Click to buy > CTB modal is functional Test Replay Screenshots Video
Click to buy > CTB fallback is functional Test Replay Screenshots Video
Failed  vendor/newfold-labs/wp-module-notifications/tests/cypress/integration/notifications.cy.js • 3 failed tests

View Output Video

Test Artifacts
Notifications > Test notification displays in plugin app with `all` Test Replay Screenshots Video
Notifications > Test notification displays in plugin app for specific page (settings) Test Replay Screenshots Video
Notifications > Dismissing notification removes it from the page Test Replay Screenshots Video
Flakiness  tests/cypress/integration/help.cy.js • 1 flaky test

View Output Video

Test Artifacts
Help Page > Is Accessible Test Replay Screenshots Video

Review all test suite changes for PR #930 ↗︎

Copy link
Member

@circlecube circlecube left a comment

Choose a reason for hiding this comment

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

This fixed an issue for me locally too!

@BrianHenryIE BrianHenryIE merged commit a62af0d into main Feb 23, 2024
0 of 23 checks passed
@circlecube circlecube deleted the pretty-permalinks branch March 20, 2024 19:11
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.

None yet

2 participants