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

Disable SCRIPT_DEBUG for local e2e tests run #14638

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Mar 26, 2019

Description

There is this issue that e2e tests run locally will fail at the moment because SCRIPT_DEBUG is set to true and we need to fix React warnings. It is disabled on Travis and this PR does it for local env as well.

In theorhy we should need only:

"pretest-e2e": "cross-env SCRIPT_DEBUG=false ./bin/reset-e2e-tests.sh",

However, I run into some issues where I could update SCRIPT_DEBUG for wordpress container but not wordpress_e2e_tests container so I applied a few changes based on this Stack Overflow page:
https://stackoverflow.com/questions/50999848/how-to-run-wp-cli-in-docker-compose-yml/51001043#51001043

I also removed bin/run-e2e-tests.sh file which is no longer in use.

How has this been tested?

npm run test-e2e locally.

@gziolo gziolo added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Bug An existing feature does not function as intended labels Mar 26, 2019
@gziolo gziolo self-assigned this Mar 26, 2019
@gziolo gziolo requested a review from notnownikki March 26, 2019 14:28
Copy link
Member

@notnownikki notnownikki left a comment

Choose a reason for hiding this comment

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

Works great for me, everything passes locally again!

@gziolo gziolo merged commit 081f130 into master Mar 26, 2019
@gziolo gziolo deleted the update/disable-script-debug-e2e branch March 26, 2019 15:08
@gziolo gziolo added this to the 5.4 (Gutenberg) milestone Mar 26, 2019
@@ -65,6 +65,7 @@ fi
# Make sure the uploads and upgrade folders exist and we have permissions to add files.
echo -e $(status_message "Ensuring that files can be uploaded...")
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CONTAINER chmod 767 /var/www/html/wp-content/plugins
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm $CONTAINER chmod 767 /var/www/html/wp-config.php
Copy link
Member

Choose a reason for hiding this comment

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

Multiple file paths can be passed to a single chmod command. Could (marginally) improve performance to avoid multiple separate docekr-compose run.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm wondering if we still need it to be honest. I suspect that we were using the wrong user for WP-CLI dedicated to e2e tests. However, I wanted to unblock other folks and I didn't investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants