Feature: Exportable groups
Scenario: Selecting an element within a non-exportable group
Given A design <design> with no exportable groups
When I click on <click element>
Then <click element> should be selected
Examples:
| design | click element |
| G1(A, B) | A |
| G1(A, G2(B, C)) | C |
Scenario: Hovering an element within a non-exportable group
Given A design <design> with no exportable groups
When I hover on <hover element>
Then I should see the artboard guides for <hover element>
Examples:
| design | hover element |
| G1(A, B) | A |
| G1(A, G2(B, C)) | C |
Scenario: Trying to select a non-exportable group
Given A design <design> with no exportable groups
When I click inside the area of <click group> but outside of any children
Then the artboard should be selected
Examples:
| design | click group |
| G1(A, B) | G1 |
| G1(A, G2(B, C)) | G2 |
Scenario: Trying to hover a non-exportable group
Given A design <design> with no exportable groups
When I hover inside the area of <hover group> but outside of any children
Then the artboard should be selected
Examples:
| design | hover group |
| G1(A, B) | G1 |
| G1(A, G2(B, C)) | G2 |
Scenario: Selecting an exportable group
Given A design <design> with all groups exportable
When I <click action>
Then <outcome>
Examples:
| design | click action | outcome |
| G1(A, B) | click G1 outside of any children | G1 should be selected |
| G1(A, G2(B, C)) | click A | G1 should be selected |
| G1(A, G2(B, C)) | click C | G1 should be selected |
| G1(A, G2(B, C)) | click C, click C | G2 should be selected |
Scenario: Viewing artboard guides for an exportable group
Given A design <design> with all groups exportable
When I <hover action>
Then <outcome>
Examples:
| design | hover action | outcome |
| G1(A, B) | hover G1 outside of any children | I should see artboard guides for G1 |
| G1(A, G2(B, C)) | hover A | I should see artboard guides for G1 |
| G1(A, G2(B, C)) | hover C | I should see artboard guides for G1 |
Scenario: Viewing relative guides between elements and exportable groups
Given A design <design> with all groups exportable
When I <action>
Then <outcome>
Examples:
| design | action | outcome |
| A, G2(B, C) | select A, hover G2 outside any children | I should see relative guides between A and G2 |
| A, G2(B, C) | select A, hover B | I should see relative guides between A and G2 |