Skip to content

Commit

Permalink
Try and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed May 29, 2020
1 parent a5f683d commit bd5e237
Showing 1 changed file with 37 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@
*/
class Content extends Admin
{
/**
* Flag if workflows are enabled by default
*
* @var bool
*/
private $workflowsEnabled = false;

/**
* Method to create an article.
*
* @param Array articleDetails Array with Article Details like Title, Alias, Content etc
* @param array articleDetails Array with Article Details like Title, Alias, Content etc
*
* @return void
*
Expand Down Expand Up @@ -121,7 +127,16 @@ public function unPublishArticle($title)
$I->checkAllResults();
$I->clickToolbarButton('Action');
$I->wait(2);
$I->clickToolbarButton('transition', '1');

if ($this->workflowsEnabled)
{
$I->clickToolbarButton('transition', '1');
}
else
{
$I->clickToolbarButton('unpublish');
}

$I->filterByCondition($title, "Unpublished");
}

Expand All @@ -144,7 +159,16 @@ public function publishArticle($title)
$I->checkAllResults();
$I->clickToolbarButton('Action');
$I->wait(2);
$I->clickToolbarButton('transition', '2');

if ($this->workflowsEnabled)
{
$I->clickToolbarButton('transition', '2');
}
else
{
$I->clickToolbarButton('publish');
}

$I->filterByCondition($title, "Published");
}

Expand All @@ -168,7 +192,16 @@ public function trashArticle($title)
$I->checkAllResults();
$I->clickToolbarButton('Action');
$I->wait(2);
$I->clickToolbarButton('transition', '3');

if ($this->workflowsEnabled)
{
$I->clickToolbarButton('transition', '3');
}
else
{
$I->clickToolbarButton('trash');
}

$I->filterByCondition($title, "Trashed");
}

Expand Down

0 comments on commit bd5e237

Please sign in to comment.