Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content modelling/748 add review page to the reschedule journey #9747

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Feature: Schedule a content object
Background:
Given I am a GDS admin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this move might be a bit controversial but thought it worth getting some feedback on

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I think it makes total sense

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 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 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"
63 changes: 0 additions & 63 deletions lib/engines/content_block_manager/features/schedule_object.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,57 +18,6 @@ Feature: Schedule a content object
And I should see the scheduled date on the object
And I should see the scheduled event on the timeline

@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 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 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"

@disable-sidekiq-test-mode
Scenario: GDS Editor tries to reschedule a content object with an invalid date
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
When I choose to schedule the change
And I enter an invalid date
And I save and continue
Then I see the errors informing me the date is invalid

@disable-sidekiq-test-mode
Scenario: GDS Editor publishes a new version of a previously scheduled content object
When I am updating a content block
Expand All @@ -81,18 +30,6 @@ Feature: Schedule a content object
When I review and confirm my answers are correct
Then there should be no jobs scheduled

@disable-sidekiq-test-mode
Scenario: GDS Editor schedules a new version of a previously scheduled content block
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 click to view the content block
Then there should only be one job scheduled

Scenario: A scheduled content object is published
When I am updating a content block
Then I am asked when I want to publish the change
Expand Down