Skip to content

Commit

Permalink
Unify URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZitaNemeckova committed May 23, 2024
1 parent 339ff3e commit f5881c5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
16 changes: 13 additions & 3 deletions cypress/e2e/awx/resources/projects.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,26 @@ describe('Projects', () => {
});
});

describe('Projects: Access Tab', () => {
//More testing will be needed here- add later
describe('Projects: Users Tab', () => {
it('can navigate to project access tab', function () {
cy.navigateTo('awx', 'projects');
cy.filterTableByMultiSelect('name', [(this.globalProject as Project).name]);
cy.clickTableRowLink('name', `${(this.globalProject as Project).name}`, {
disableFilter: true,
});
cy.verifyPageTitle(`${(this.globalProject as Project).name}`);
cy.clickTab(/^Access$/, true);
cy.clickTab(/^Users$/, true);
});
});
describe('Projects: Teams Tab', () => {
it('can navigate to project access tab', function () {
cy.navigateTo('awx', 'projects');
cy.filterTableByMultiSelect('name', [(this.globalProject as Project).name]);
cy.clickTableRowLink('name', `${(this.globalProject as Project).name}`, {
disableFilter: true,
});
cy.verifyPageTitle(`${(this.globalProject as Project).name}`);
cy.clickTab(/^Teams$/, true);
});
});

Expand Down
8 changes: 4 additions & 4 deletions frontend/awx/main/routes/useAwxProjectRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ export function useAwxProjectRoutes() {
},
{
id: AwxRoute.ProjectUsers,
path: 'users',
path: 'user-access',
element: <ProjectUsers />,
},
{
id: AwxRoute.ProjectTeams,
path: 'teams',
path: 'team-access',
element: <ProjectTeams />,
},
{
Expand All @@ -119,12 +119,12 @@ export function useAwxProjectRoutes() {
},
{
id: AwxRoute.ProjectAddUsers,
path: ':id/users/add-users',
path: ':id/user-access/add-users',
element: <AwxProjectAddUsers />,
},
{
id: AwxRoute.ProjectAddTeams,
path: ':id/users/add-teams',
path: ':id/team-access/add-teams',
element: <AwxProjectAddTeams />,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ import { AwxSelectTeamsStep } from '../../../access/common/AwxRolesWizardSteps/A
import { awxAPI } from '../../../common/api/awx-utils';
import { AwxRoute } from '../../../main/AwxRoutes';
import { AwxSelectRolesStep } from '../../../access/common/AwxRolesWizardSteps/AwxSelectRolesStep';
import { AwxRole } from '../../../access/roles/AwxRoles';

interface AwxRole {
id: string;
name: string;
}

interface WizardFormValues {
teams: Team[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ import { RoleAssignmentsReviewStep } from '../../../../common/access/RolesWizard
import { useAwxBulkActionDialog } from '../../../common/useAwxBulkActionDialog';
import { AwxSelectUsersStep } from '../../../access/common/AwxRolesWizardSteps/AwxSelectUsersStep';
import { AwxSelectRolesStep } from '../../../access/common/AwxRolesWizardSteps/AwxSelectRolesStep';
import { AwxRole } from '../../../access/roles/AwxRoles';

interface AwxRole {
id: string;
name: string;
}
interface WizardFormValues {
users: AwxUser[];
awxRoles: AwxRole[];
Expand Down

0 comments on commit f5881c5

Please sign in to comment.