This ticket is very similar to a normal ticket in our project. This task is intended to evaluate how well you can implement a feature based on a real-world ticket. So please approach this task as if you were working on a real project. If you have any questions, feel free to reach out to us. Also if you have any suggestions for improvements outside of this ticket, then that is something we can talk about in the interview.
As admin user I want to publish articles so that only published articles can be used in orders.
Given I am logged in as admin user
And I am on the article detail page of an unpublished article
Then I see a button "Publish article"
When I click "Publish article"
Then I am asked to confirm
And after confirming the article is marked as published and shows its published date on the detail page
And the publish button disappears for that article
And it should not be possible to unpublish an article
Given I am logged in as non-admin user
And I am on any article detail page
Then I do not see the "Publish article" button
Given I am on the article list page
Then I see which articles are published (state indicator)
Given I am creating an order
Then it should not be possible to add unpublished articles to the order
- no need to migrate existing data. So if there are already orders with unpublished articles, then thats ok.