Skip to content

Commit

Permalink
feat: Published flows
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Sep 21, 2023
1 parent d33a4ff commit 3a2fc92
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
4 changes: 4 additions & 0 deletions e2e/tests/api-driven/src/permissions/queries/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DELETE_FLOW_QUERY, INSERT_FLOW_QUERY, UPDATE_FLOW_QUERY } from "./flows";
import { INSERT_PUBLISHED_FLOW_QUERY } from "./publishedFlows";
import { SELECT_USERS_QUERY } from "./users";

export const queries = {
Expand All @@ -9,5 +10,8 @@ export const queries = {
},
users: {
select: SELECT_USERS_QUERY,
},
published_flows: {
insert: INSERT_PUBLISHED_FLOW_QUERY,
}
} as const;
11 changes: 11 additions & 0 deletions e2e/tests/api-driven/src/permissions/queries/publishedFlows.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import gql from "graphql-tag";

export const INSERT_PUBLISHED_FLOW_QUERY = gql`
mutation InsertPublishedFlowsE2E($team1FlowId: uuid!, $activeUserId: Int) {
insert_published_flows(objects: {data: "{}", flow_id: $team1FlowId, publisher_id: $activeUserId}) {
returning {
id
}
}
}
`
23 changes: 13 additions & 10 deletions e2e/tests/api-driven/src/permissions/teamAdmin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ Feature: Testing Permissions for teamAdmin Role
Then they have access

Examples:
| TABLE | ACTION |
| flows | insert |
| flows | update |
| flows | delete |
| users | select |
| TABLE | ACTION |
| flows | insert |
| flows | update |
| flows | delete |
| users | select |
# | opertations | select |
| published_flows | insert |

@regression @team-admin-permissions
Scenario Outline: teamAdmin permissions in a different team
Expand All @@ -20,8 +22,9 @@ Feature: Testing Permissions for teamAdmin Role
Then they do not have access

Examples:
| TABLE | ACTION |
| flows | insert |
| flows | update |
| flows | delete |
| users | select |
| TABLE | ACTION |
| flows | insert |
| flows | update |
| flows | delete |
| users | select |
| published_flows | insert |

0 comments on commit 3a2fc92

Please sign in to comment.