protected function AuthenticationFormJsTest::visitKeyAddForm in Apigee Edge 8
Visits the Key add form for testing.
1 call to AuthenticationFormJsTest::visitKeyAddForm()
- AuthenticationFormJsTest::testUsingHybridForm in tests/
src/ FunctionalJavascript/ Form/ AuthenticationFormJsTest.php - Tests the Authentication form using Hybrid auth.
File
- tests/
src/ FunctionalJavascript/ Form/ AuthenticationFormJsTest.php, line 236
Class
- AuthenticationFormJsTest
- Apigee Edge API credentials, authentication form, key integration test.
Namespace
Drupal\Tests\apigee_edge\FunctionalJavascript\FormCode
protected function visitKeyAddForm() : void {
$web_assert = $this
->assertSession();
$page = $this
->getSession()
->getPage();
if ($this->loggedInUser
->id() !== $this->rootUser) {
$this
->drupalLogin($this->rootUser);
}
$this
->drupalGet(Url::fromRoute('entity.key.add_form'));
// Key name is required.
$page
->fillField('Key name', $this
->randomMachineName());
$this
->cssSelect('select[name="key_type"]')[0]
->setValue('apigee_auth');
// The "Send request" button now should appear again.
$web_assert
->waitForElementVisible('css', 'input[name="test_connection"]');
$this
->cssSelect('select[name="key_provider"]')[0]
->setValue('apigee_edge_private_file');
$web_assert
->waitForElementVisible('css', 'key_input_settings[organization]');
}