+
{__(
'In order to include an Apple Map on your website you need to confirm your MapKit credentials below. Here is documentation on how to get those credentials: ',
'maps-block-apple'
@@ -241,12 +244,8 @@ export default function MapsBlockAppleEdit(props) {
'Instructions for creating your MapKit credentials.',
'maps-block-apple'
)}
- {' '}
-
- }
- isColumnLayout={true}
- >
-
+
+
diff --git a/tests/bin/initialize.sh b/tests/bin/initialize.sh
index 9d06a85..e9cb0f0 100755
--- a/tests/bin/initialize.sh
+++ b/tests/bin/initialize.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-npm run env run tests-wordpress "chmod -c ugo+w /var/www/html"
-npm run env run tests-cli "wp rewrite structure '/%postname%/' --hard"
+wp-env run tests-wordpress chmod -c ugo+w /var/www/html
+wp-env run tests-cli wp rewrite structure '/%postname%/' --hard
diff --git a/tests/cypress/config.js b/tests/cypress/config.js
index 46fd20f..7d0cb50 100644
--- a/tests/cypress/config.js
+++ b/tests/cypress/config.js
@@ -1,5 +1,6 @@
const { defineConfig } = require('cypress');
-const { readConfig } = require('@wordpress/env/lib/config');
+const { loadConfig } = require( '@wordpress/env/lib/config' );
+const getCacheDirectory = require( '@wordpress/env/lib/config/get-cache-directory' );
module.exports = defineConfig({
fixturesFolder: 'tests/cypress/fixtures',
@@ -26,13 +27,14 @@ module.exports = defineConfig({
/**
* Set WP URL as baseUrl in Cypress config.
- *
+ *
* @param {Function} on function that used to register listeners on various events.
* @param {object} config Cypress Config object.
* @returns config Updated Cypress Config object.
*/
const setBaseUrl = async (on, config) => {
- const wpEnvConfig = await readConfig('wp-env');
+ const cacheDirectory = await getCacheDirectory();
+ const wpEnvConfig = await loadConfig( cacheDirectory );
if (wpEnvConfig) {
const port = wpEnvConfig.env.tests.port || null;
diff --git a/tests/cypress/e2e/block.test.js b/tests/cypress/e2e/block.test.js
index f33199d..225f060 100644
--- a/tests/cypress/e2e/block.test.js
+++ b/tests/cypress/e2e/block.test.js
@@ -1,9 +1,6 @@
describe("Test block functions", () => {
- before(() => {
- cy.login();
- });
-
beforeEach(() => {
+ cy.login();
cy.mapsBlockSaveSettings();
});
diff --git a/tests/cypress/e2e/settings.test.js b/tests/cypress/e2e/settings.test.js
index ee02558..8e71b18 100644
--- a/tests/cypress/e2e/settings.test.js
+++ b/tests/cypress/e2e/settings.test.js
@@ -1,5 +1,5 @@
describe("Settings", () => {
- before(() => {
+ beforeEach(() => {
cy.login();
});
diff --git a/tests/cypress/support/e2e.js b/tests/cypress/support/e2e.js
index c933e9a..45fb158 100644
--- a/tests/cypress/support/e2e.js
+++ b/tests/cypress/support/e2e.js
@@ -17,11 +17,3 @@ import "@10up/cypress-wp-utils";
// Import commands.js using ES2015 syntax:
import "./commands";
-
-// Alternatively you can use CommonJS syntax:
-// require('./commands')
-beforeEach(() => {
- Cypress.Cookies.defaults({
- preserve: /^wordpress.*?/,
- });
-});