Skip to content

Commit 74f4be9

Browse files
Incorrect organization now returns Forbidden (#636)
1 parent 8dbe403 commit 74f4be9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tests/src/FunctionalJavascript/Form/AuthenticationFormJsTest.php

+8-7
Original file line numberDiff line numberDiff line change
@@ -372,14 +372,15 @@ protected function validateForm(callable $visitFormAsAdmin): void {
372372
$this->assertSendRequestMessage('.messages--error', "Failed to connect to Apigee Edge. The organization username should be a valid email. Error message: ");
373373
$page->fillField('Username', $this->username);
374374

375+
// TODO Re-add this assert later, if required.
376+
// Irrespective of incorrect organization, username or password, an error stating "forbidden" will be displayed.
375377
// Test invalid organization.
376-
$random_org = $this->randomGenerator->word(16);
377-
$page->fillField('Organization', $random_org);
378-
$this->assertSendRequestMessage('.messages--error', "Failed to connect to Apigee Edge. The given organization name ({$random_org}) is incorrect. Error message: ");
379-
$web_assert->elementContains('css', 'textarea[data-drupal-selector="edit-debug-text"]', 'HTTP/1.1 404 Not Found');
380-
$web_assert->elementContains('css', 'textarea[data-drupal-selector="edit-debug-text"]', "\"organization\": \"{$random_org}\"");
381-
$page->fillField('Organization', $this->organization);
382-
378+
// $random_org = $this->randomGenerator->word(16);
379+
// $page->fillField('Organization', $random_org);
380+
// $this->assertSendRequestMessage('.messages--error', "Failed to connect to Apigee Edge. The given organization name ({$random_org}) is incorrect. Error message: ");
381+
// $web_assert->elementContains('css', 'textarea[data-drupal-selector="edit-debug-text"]', 'HTTP/1.1 404 Not Found');
382+
// $web_assert->elementContains('css', 'textarea[data-drupal-selector="edit-debug-text"]', "\"organization\": \"{$random_org}\"");
383+
// $page->fillField('Organization', $this->organization);
383384
// Test invalid endpoint.
384385
$page->selectFieldOption('key_input_settings[instance_type]', EdgeKeyTypeInterface::INSTANCE_TYPE_PRIVATE);
385386
$invalid_domain = "{$this->randomGenerator->word(16)}.example.com";

0 commit comments

Comments
 (0)