From 2e913abf3e1800e361ee669bd10b47a05b81145f Mon Sep 17 00:00:00 2001 From: mikkamp Date: Thu, 3 Aug 2023 17:47:54 +0100 Subject: [PATCH] Add wp-cli.yml to hard flush rewrite rules --- .wp-env.json | 3 +++ tests/e2e/bin/test-env-setup.sh | 2 +- tests/e2e/config/wp-cli.yml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tests/e2e/config/wp-cli.yml diff --git a/.wp-env.json b/.wp-env.json index 11aaf1880b..cd5f56fc9f 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -6,6 +6,9 @@ "./tests/e2e/bin/test-data.php", "." ], + "mappings": { + "wp-cli.yml": "./tests/e2e/config/wp-cli.yml" + }, "lifecycleScripts": { "afterStart": "./tests/e2e/bin/test-env-setup.sh", "afterClean": "./tests/e2e/bin/test-env-setup.sh" diff --git a/tests/e2e/bin/test-env-setup.sh b/tests/e2e/bin/test-env-setup.sh index ef2eba9959..6d5647dcbb 100755 --- a/tests/e2e/bin/test-env-setup.sh +++ b/tests/e2e/bin/test-env-setup.sh @@ -4,7 +4,7 @@ echo -e 'Activate twentytwentytwo theme \n' wp-env run tests-cli wp theme activate twentytwentytwo echo -e 'Update URL structure \n' -wp-env run tests-cli wp rewrite structure '/%postname%/' --hard +wp-env run tests-cli -- wp rewrite structure '/%postname%/' --hard echo -e 'Add Customer user \n' wp-env run tests-cli wp user create customer customer@woocommercee2etestsuite.com \ diff --git a/tests/e2e/config/wp-cli.yml b/tests/e2e/config/wp-cli.yml new file mode 100644 index 0000000000..3cf7565b3b --- /dev/null +++ b/tests/e2e/config/wp-cli.yml @@ -0,0 +1,2 @@ +apache_modules: + - mod_rewrite