diff --git a/src/Form/BynderConfigurationForm.php b/src/Form/BynderConfigurationForm.php index ea60627..08882f8 100644 --- a/src/Form/BynderConfigurationForm.php +++ b/src/Form/BynderConfigurationForm.php @@ -440,7 +440,7 @@ class BynderConfigurationForm extends ConfigFormBase { } } if (!(substr(trim($credentials['account_domain']), 0, 8) === 'https://') || filter_var(trim($credentials['account_domain']), FILTER_VALIDATE_URL) === false ) { - $form_state->setError($form['account_domain'], $this->t('Account domain expect a valid secure url format, as provided to you by Bynder: ":url".', [':url' => '"https://bynder-domain.extension/"'])); + $form_state->setError($form['account_domain'], $this->t('Account domain expect a valid secure url format, as provided to you by Bynder: ":url".', [':url' => 'https://bynder-domain.extension/'])); } if ($form_state->getValue('test_connection')) { diff --git a/tests/src/FunctionalJavascript/ConfigurationFormTest.php b/tests/src/FunctionalJavascript/ConfigurationFormTest.php index 48c7331..134c432 100644 --- a/tests/src/FunctionalJavascript/ConfigurationFormTest.php +++ b/tests/src/FunctionalJavascript/ConfigurationFormTest.php @@ -71,7 +71,7 @@ class ConfigurationFormTest extends JavascriptTestBase { $this->getSession()->getPage()->fillField('credentials[token_secret]', '44444444444444444444444444444444'); $this->assertSession()->pageTextContains('Account domain'); - $this->assertSession()->responseContains('Provide your account domain. It should be in the format "https://my-name.getbynder.com/". Change "my-name" with your subdomain. For more information check Bynder docs.'); + $this->assertSession()->responseContains('Provide your Bynder account domain. It should be in the format "https://bynder-domain.extension/". Change "bynder-domain.extension" with the domain provided by Bynder. For more information check Bynder docs.'); $this->getSession()->getPage()->fillField('credentials[account_domain]', 'https://test.getbynder.com/'); $this->assertSession()->pageTextContains('Debug'); @@ -132,7 +132,7 @@ class ConfigurationFormTest extends JavascriptTestBase { // Check form validation. $this->getSession()->getPage()->fillField('credentials[consumer_key]', '11111111-1111-1111-111111111111111'); - $this->getSession()->getPage()->fillField('credentials[consumer_secret]', '2222222222222222222222222222222'); + $this->getSession()->getPage()->fillField('credentials[consumer_secret]', '????????????????????????????????'); $this->getSession()->getPage()->fillField('credentials[token]', '33333333-3333-333!-3333333333333333'); $this->getSession()->getPage()->fillField('credentials[token_secret]', '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'); $this->getSession()->getPage()->fillField('credentials[account_domain]', 'http://test.getbynder.comm/'); @@ -155,10 +155,10 @@ class ConfigurationFormTest extends JavascriptTestBase { $this->assertSession()->pageTextNotContains('Print license restriction level'); $this->assertSession()->pageTextContains('Consumer key needs to use the pattern 8-4-4-16.'); - $this->assertSession()->pageTextContains('Consumer secret needs to be 32 characters long and contain only letters and numbers'); + $this->assertSession()->pageTextContains('Consumer secret needs to contain only letters and numbers.'); $this->assertSession()->pageTextContains('Token needs to use only numbers and letters separated with "-".'); - $this->assertSession()->pageTextContains('Token secret needs to be 32 characters long and contain only letters and numbers.'); - $this->assertSession()->pageTextContains('Account domain expect a value in the format "https://some-name.getbynder.com/".'); + $this->assertSession()->pageTextContains('Token secret needs to contain only letters and numbers.'); + $this->assertSession()->pageTextContains('Account domain expect a valid secure url format, as provided to you by Bynder: "https://bynder-domain.extension/".'); \Drupal::state()->set('bynder.bynder_test_brands', NULL); $this->drupalGet('admin/config/services/bynder');