Skip to content

Commit

Permalink
e2e test for organization teams page
Browse files Browse the repository at this point in the history
  • Loading branch information
avzz-19 committed Oct 21, 2024
1 parent ba7ea17 commit fbf4be3
Show file tree
Hide file tree
Showing 8 changed files with 514 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]
containers: [1, 2, 3, 4, 5]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion app/components/organization-team/add-team-member/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<AkTable @dense={{true}} as |t|>
<t.head data-test-addUserList-thead @columns={{this.columns}} />
<t.body @rows={{pgc.currentPageResults}} as |b|>
<b.row data-test-addUserList-row as |r|>
<b.row data-test-cy='userList-row' data-test-addUserList-row as |r|>
<r.cell data-test-addUserList-cell as |value|>
{{#if r.columnValue.component}}
{{#let (component r.columnValue.component) as |CheckBox|}}
Expand Down
6 changes: 5 additions & 1 deletion app/components/organization-team/add-team-project/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
<AkTable @dense={{true}} as |t|>
<t.head data-test-addProjectList-thead @columns={{this.columns}} />
<t.body @rows={{pgc.currentPageResults}} as |b|>
<b.row data-test-addProjectList-row as |r|>
<b.row
data-test-cy='addProjectList-row'
data-test-addProjectList-row
as |r|
>
<r.cell data-test-addProjectList-cell>
{{#if r.columnValue.component}}
{{#let (component r.columnValue.component) as |Component|}}
Expand Down
1 change: 1 addition & 0 deletions app/components/organization-team/create-team/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

<AkButton
data-test-orgCreateTeam-submitBtn
data-test-cy='create-team-submit-btn'
class='mt-3'
@type='submit'
@loading={{this.isCreatingTeam}}
Expand Down
1 change: 1 addition & 0 deletions app/components/organization-team/details/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</AkTypography>

<AkIconButton
data-test-cy='teamDetail-closeBtn'
class={{ab.classes.defaultIconBtn}}
{{on 'click' dr.closeHandler}}
>
Expand Down
2 changes: 2 additions & 0 deletions app/components/organization-team/overview/index.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<AkStack
data-test-orgTeamOverview
data-test-cy='org-team-overview'
@direction='column'
role='button'
local-class='org-team-overview-container'
{{on 'click' this.showTeamDetails}}
>
<AkTypography
data-test-orgTeamOverview-name
data-test-cy='org-team-overview-name'
@variant='h5'
@color='primary'
@gutterBottom={{true}}
Expand Down
32 changes: 28 additions & 4 deletions cypress/support/api.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,26 @@ export const API_ROUTES = {
route: '/api/service_accounts/*',
alias: 'serviceAccount',
},
teamsList: {
route: '/api/organizations/*/teams*',
alias: 'teamsList',
},
teamMembers: {
route: '/api/organizations/*/teams/*/members/*',
alias: 'teamMembers',
},
teamMembersList: {
route: '/api/organizations/*/teams/*/members*',
alias: 'teamMembersList',
},
teamProject: {
route: '/api/organizations/*/teams/*/projects/*',
alias: 'teamProject',
},
organization: {
route: '/api/organizations/*',
alias: 'organization',
},
editUserInfo: {
route: '/api/organizations/*/users/*',
alias: 'editUser',
Expand All @@ -113,12 +133,16 @@ export const API_ROUTES = {
route: '/api/organizations/*/teams?include_user=*',
alias: 'teamIncludesUser',
},
teamMembers: {
route: '/api/organizations/*/teams/*/members/*',
alias: 'teamMembers',
},
inviteUser: {
route: '/api/organizations/*/invitations',
alias: 'inviteUser',
},
usersList: {
route: '/api/organizations/*/users*',
alias: 'usersList',
},
inviteTeam: {
route: '/api/organizations/*/teams/*/invitations*',
alias: 'inviteTeam',
},
} as const;
Loading

0 comments on commit fbf4be3

Please sign in to comment.