-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9747 from alphagov/content-modelling/748-add-revi…
…ew-to-schedule-edit Content modelling/748 add review page to the reschedule journey
- Loading branch information
Showing
5 changed files
with
75 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
lib/engines/content_block_manager/features/reschedule_object.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Feature: Schedule a content object | ||
Background: | ||
Given I am a GDS admin | ||
And the organisation "Ministry of Example" exists | ||
And a schema "email_address" exists with the following fields: | ||
| field | type | format | required | | ||
| email_address | string | email | true | | ||
And an email address content block has been created | ||
|
||
@disable-sidekiq-test-mode | ||
Scenario: GDS Editor immediately publishes a scheduled content object | ||
When I am updating a content block | ||
Then I am asked when I want to publish the change | ||
And I schedule the change for 7 days in the future | ||
When I review and confirm my answers are correct | ||
When I click to view the content block | ||
And I click to edit the schedule | ||
And I choose to publish the change now | ||
And I save and continue | ||
When I review and confirm my answers are correct | ||
When I click to view the content block | ||
Then the published state of the object should be shown | ||
And there should be no jobs scheduled | ||
|
||
@disable-sidekiq-test-mode | ||
Scenario: GDS Editor reschedules a content object | ||
When I am updating a content block | ||
Then I am asked when I want to publish the change | ||
And I schedule the change for 7 days in the future | ||
When I review and confirm my answers are correct | ||
When I click to view the content block | ||
And I click to edit the schedule | ||
And I schedule the change for 5 days in the future | ||
When I review and confirm my answers are correct | ||
When I click to view the content block | ||
Then I should see the scheduled date on the object | ||
And there should only be one job scheduled | ||
|
||
@disable-sidekiq-test-mode | ||
Scenario: GDS Editor tries to reschedule a content object without choosing to schedule | ||
When I am updating a content block | ||
Then I am asked when I want to publish the change | ||
And I schedule the change for 7 days in the future | ||
When I review and confirm my answers are correct | ||
When I click to view the content block | ||
And I click to edit the schedule | ||
And I save and continue | ||
Then I see the error message "Schedule publishing cannot be blank" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters