Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
class SettingsPageCest {
public function _before( AcceptanceTester $I ) {
$I->amOnPage( '/wp-login.php' );
$I->wait( 1 );
$I->fillField( [ 'name' => 'log' ], 'admin' );
$I->fillField( [ 'name' => 'pwd' ], 'password' );
$I->click( '#wp-submit' );
}
public function general_settings_page( AcceptanceTester $I ) {
$I->amOnPage('/wp-admin/admin.php?page=backwpupsettings');
$I->see('Display Settings', 'h3');
$I->dontSeeCheckboxIsChecked('#showadminbarmenu');
$I->dontSeeCheckboxIsChecked('#showfoldersize');
$I->seeCheckboxIsChecked('#protectfolders');
$I->checkOption('#showadminbarmenu');
$I->checkOption('#showfoldersize');
$I->uncheckOption('#protectfolders');
$I->click('Save Changes');
$I->seeCheckboxIsChecked('#showadminbarmenu');
$I->seeCheckboxIsChecked('#showfoldersize');
$I->dontSeeCheckboxIsChecked('#protectfolders');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.