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

feat: demo workspace e2e #3889

Merged
merged 6 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
94 changes: 94 additions & 0 deletions e2e/tests/api-driven/src/demo-workspace/demoUser.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Feature: Demo user access
# We create the steps data from these Given statements below
# altering these will alter what data is created for testing
Background:

Given I have the following teams in the database:
| id | name | slug |
| 1 | Open Systems Lab | open-systems-lab |
| 29 | Templates | templates |
| 30 | Open Digital Planning | open-digital-planning |
| 32 | Demo | demo |
| 45 | Other Team | other-team |

And I have two users in the database:
| id | first_name | last_name | email |
| 1 | Demo | User | [email protected] |
| 2 | Nota | Demo | [email protected] |

And I have the following flows in the database:
| creator_id | name | slug | team_id |
| 1 | Demo Flow | demo-flow | 32 |
| 2 | Test OSL | test-osl | 1 |
| 2 | Test Templates | test-templates | 29 |
| 2 | Test ODP | test-odp | 30 |
| 2 | Other Flow | other-flow | 45 |
And I am a demoUser

@demo-user-permissions
RODO94 marked this conversation as resolved.
Show resolved Hide resolved
Scenario Outline: I can only view my own flows
When I am in the "<TEAM>" team
Then I should only see my own flows
But I should not see flows that I have not created
Examples:
| TEAM |
| demo |


@demo-user-permissions
Scenario Outline: I can only view specific teams
When I query the teams table
Then I can access the teams with slug: "<SLUG>"
But I should not be able to access the Other Team

Examples:
| SLUG |
| open-systems-lab |
| templates |
| open-digital-planning |
| demo |

@demo-user-permissions
Scenario Outline: Creating a new flow
When I insert a flow into the team: "<TEAM>"
Then I should not be able to create a flow
But I should be able to create a flow in the Demo team

Examples:
| TEAM |
| templates |
| open-systems-lab |
| open-digital-planning |

@demo-user-permissions
Scenario Outline: Actioning my own flows
When I am on my own flow
Then I should be able to "<ACTION>" the flow

Examples:
| ACTION |
| update |
| delete |

@demo-user-permissions
Scenario Outline: Actioning flows in other teams
When I am in the "<TEAM>" team
Then I should be able to see a flow
But I should not have access to modify the flow

Examples:
| TEAM |
| templates |
| open-systems-lab |
| open-digital-planning |

@demo-user-permissions
Scenario Outline: Editing team settings
When I am in the "<TEAM>" team
Then I should not have access to team settings

Examples:
| TEAM |
| templates |
| open-systems-lab |
| open-digital-planning |
Loading
Loading