BDD file with acceptance criteria for call to actions shown on a project card, describing each step of the feature.
Feature: As I user I should see different CTAs on the screen cards depending on my permissions and device
Scenario: Primary CTA with edit permissions
Given I have edit permissions for the project
Then there should be a primary CTA on the card linking me to hotspot editor
Scenario: Primary CTA with read permissions
Given I only have read permission for the project
Then there should be a primary CTA on the card linking me to prototype viewer
Scenario: Primary CTA on mobile
Given I am a mobile user
Then there should be a CTA on the card linking me to prototype viewer
Scenario Outline: Secondary CTAs with edit permissions - direct upload
Given I have edit permissions for the project
And the screen is a direct upload
Then there should be <ctaText> CTA
And it should link to <url>
Examples:
| ctaText | url |
| Edit design | /project/5/design/23 |
Scenario Outline: Secondary CTAs with edit permissions - design
Given I have edit permissions for the project
And the screen is a design
Then there should be <ctaText> CTA
And it should link to <url>
Examples:
| ctaText | url |
| Handoff | /dsffreg/screen/23/handoff |
| Edit design | /project/5/design/23 |
Scenario Outline: Secondary CTAs with edit permissions - sketch upload
Given I have edit permissions for the project
And the screen is a sketch upload
Then there should be <ctaText> CTA
And it should link to <url>
Examples:
| ctaText | url |
| Handoff | /dsffreg/screen/23/handoff |
Scenario Outline: Direct upload screens with external id show handoff CTA
Given a screen is a direct upload with an external id
Then there should be <ctaText> CTA
And it should link to <url>
Examples:
| ctaText | url |
| Handoff | /dsffreg/screen/23/handoff |
Scenario: Secondary CTAs with read permissions - direct upload
Given I only have read permissions for the project
And the screen is a direct upload
Then there should be no secondary CTAs
Scenario Outline: Secondary CTAs with read permissions - design
Given I only have read permissions for the project
And the screen is a design
Then there should be <ctaText> CTA
And it should link to <url>
Examples:
| ctaText | url |
| Handoff | /dsffreg/screen/23/handoff |
Scenario Outline: Secondary CTAs with read permissions - sketch upload
Given I only have read permissions for the project
And the screen is a sketch upload
Then there should be <ctaText> CTA
And it should link to <url>
Examples:
| ctaText | url |
| Handoff | /dsffreg/screen/23/handoff |
Scenario: Secondary CTAs on mobile
Given I am on mobile
Then secondary CTAs should not be available on the image thumbnail card