Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszUrbanowicz committed Dec 2, 2015
1 parent dd88cff commit cd2b04a
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions tests/functional/ContentCest.php
Expand Up @@ -192,38 +192,7 @@ public function seePromotedContentOnTopOfTheList(FunctionalTester $I)

$I->see($promotedContent->translations[0]->title, '(//h2)[1]');
}


public function contentsAreOrderedByWeight(FunctionalTester $I)
{
$category = $I->haveContent(['type' => 'category', 'isActive' => 1]);
$route = '/' . $category->route->translations[0]['langCode'] . '/' . $category->route->translations[0]['url'];
$counter = 1;
$contents = [];

do {
$contents[$counter] = $I->haveContent(
[
'isActive' => 1,
'weight' => $counter,
'parentId' => $category->id
]
);
$counter++;
} while ($counter <= 10);

$I->wantTo('check if heavier contents go to bottom');
$I->amOnPage($route);
$I->seeResponseCodeIs(200);

$counter = 1;

do {
$I->see($contents[$counter]->translations[0]->title, "(//h2)[{$counter}]");
$counter++;
} while ($counter <= 10);
}


public function canSeeNotPublishedCategoryAsAdmin(FunctionalTester $I)
{
$category = $I->haveContent(['type' => 'category', 'isActive' => 0]);
Expand Down

0 comments on commit cd2b04a

Please sign in to comment.