Skip to content

Commit

Permalink
Fix fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
JarJak committed Jan 23, 2019
1 parent 92ae391 commit 912e0d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/DataFixtures/ContentFixtures.php
Expand Up @@ -8,6 +8,7 @@
use Bolt\Entity\Content;
use Bolt\Entity\Field;
use Bolt\Entity\User;
use Bolt\Enum\Statuses;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
Expand Down Expand Up @@ -58,7 +59,7 @@ private function loadContent(ObjectManager $manager): void
$content = new Content();
$content->setContentType($contentType['slug']);
$content->setAuthor($author);
$content->setStatus($this->getRandomStatus());
$content->setStatus($i === 1 ? Statuses::PUBLISHED : $this->getRandomStatus());
$content->setCreatedAt($this->faker->dateTimeBetween('-1 year'));
$content->setModifiedAt($this->faker->dateTimeBetween('-1 year'));
$content->setPublishedAt($this->faker->dateTimeBetween('-1 year'));
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/features/edit_record.feature
Expand Up @@ -5,7 +5,7 @@ Feature: Edit record
Given I am logged in as "admin"

When I visit the "edit_record" page with parameters:
| id | 2 |
| id | 5 |
Then I wait for "title_field" element to appear

When I fill the "title_field" field with "Changed title"
Expand All @@ -14,5 +14,5 @@ Feature: Edit record
And I click the "save_button" element

When I visit the "single_record" page with parameters:
| id | 2 |
| id | 5 |
Then there is element "title" with text "Changed title"

0 comments on commit 912e0d8

Please sign in to comment.