Skip to content

Commit

Permalink
Add new acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Bardo committed May 18, 2016
1 parent 834e34f commit 55bce50
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/codeception/acceptance/UserTestCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,31 @@ public function validateWidgetSocialOutput( AcceptanceTester $I ) {

}

/**
* Validate that the edit link redirects to the customizer correctly
*
* @param AcceptanceTester $I
*/
public function validateEditLink( AcceptanceTester $I ) {

$I->wantTo( 'Validate the edit link of our widget' );

$I->amOnPage( home_url() );

$I->cantSeeElementInDOM( [ 'css' => '.wpcw-widgets .post-edit-link' ] );

$this->login( $I );

$I->amOnPage( home_url() );

$I->canSeeElementInDOM( [ 'css' => '.wpcw-widgets .post-edit-link' ] );

$I->click( [ 'css' => '.wpcw-widget-social .post-edit-link' ] );

$I->canSeeInCurrentUrl( 'wp-admin/customize.php' );

$I->canSeeElement( [ 'class' => 'wpcw-widget-social' ] );

}

}

0 comments on commit 55bce50

Please sign in to comment.