コード例 #1
0
ファイル: AuthPluginCept.php プロジェクト: gargallo/tfs-test
 $WP->admin_login();
 $I->amOnPage($plugins['base']['admin_page']);
 // Fill out the form
 $I->fillField('agora_core_framework_config[prod_token]', $mw_settings[$a]['prod_token']);
 $I->fillField('agora_core_framework_config[uat_token]', $mw_settings[$a]['uat_token']);
 $I->click('Save');
 $I->amGoingTo('Configure some Authcodes');
 $I->amOnPage($plugins['auth']['admin_page']);
 $I->see('Add new Authentication Code');
 foreach ($pubcodes[$a] as $authcode) {
     $I->fillField('#add_new_authcode .authcode_name', $authcode['name']);
     $I->fillField('#add_new_authcode .authcode_advantage_code', $authcode['advantage_code']);
     $I->fillField('#add_new_authcode .authcode_description', $authcode['description']);
     $I->selectOption('#add_new_authcode .authcode_type', $authcode['auth_type']);
     $I->click('Add New', '#add_new_authcode');
     $I->waitForJS('return jQuery.active == 0', 5);
     $I->see($authcode['description']);
 }
 $I->amGoingTo('Insert some Test Content');
 foreach ($pubcodes[$a] as $authcode) {
     $I->amOnPage('/wp-admin/post-new.php');
     $I->fillField('post_title', 'Test Post for ' . $authcode['description']);
     $I->click('Text');
     $I->fillField('content', 'Content for ' . $authcode['description']);
     $I->click('Visual');
     $I->fillField('excerpt', 'Excerpt for ' . $authcode['description']);
     $I->checkOption('#pubcode_' . $authcode['name']);
     $I->wait(2);
     $I->click('Publish', '#publishing-action');
     $I->see('Post Published');
     $I->seeCheckboxIsChecked('#pubcode_' . $authcode['name']);