From 6e083a806bc7b7c63acf61ab7fc44bf35ea4fcaa Mon Sep 17 00:00:00 2001
From: Tina Yip <98424339+tiyiprh@users.noreply.github.com>
Date: Mon, 12 Aug 2024 14:19:35 -0400
Subject: [PATCH] [UXD][AAP-25027] AWX - updates to Projects section
breadcrumbs & headers (#2721)
---
.../awx/resources/projects/project-details.cy.ts | 2 +-
.../projects/project-edit-copy-sync.cy.ts | 4 ++--
.../projects/ProjectPage/ProjectForm.cy.tsx | 4 ++--
.../resources/projects/ProjectPage/ProjectForm.tsx | 14 ++++++++++----
.../resources/projects/ProjectPage/ProjectPage.tsx | 2 +-
5 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/cypress/e2e/awx/resources/projects/project-details.cy.ts b/cypress/e2e/awx/resources/projects/project-details.cy.ts
index 8cff71b680..f97ca683c5 100644
--- a/cypress/e2e/awx/resources/projects/project-details.cy.ts
+++ b/cypress/e2e/awx/resources/projects/project-details.cy.ts
@@ -338,7 +338,7 @@ describe('Projects', () => {
cy.get(`[data-cy="row-id-${thisProject.id}"]`).within(() => {
cy.get('[data-cy="name-column-cell"]').click();
});
- cy.clickTab('Job templates', true);
+ cy.clickTab('Job Templates', true);
cy.url().should(
'contain',
`/projects/${thisProject.id}/job-templates?page=1&perPage=10&sort=name`
diff --git a/cypress/e2e/awx/resources/projects/project-edit-copy-sync.cy.ts b/cypress/e2e/awx/resources/projects/project-edit-copy-sync.cy.ts
index 8c6ccb53e9..bcf96fdb52 100644
--- a/cypress/e2e/awx/resources/projects/project-edit-copy-sync.cy.ts
+++ b/cypress/e2e/awx/resources/projects/project-edit-copy-sync.cy.ts
@@ -31,7 +31,7 @@ describe('Project Edit, Copy, Sync', () => {
cy.get(`[data-cy="row-id-${project.id}"]`).within(() => {
cy.get('[data-cy="edit-project"]').click();
});
- cy.verifyPageTitle('Edit Project');
+ cy.verifyPageTitle(`Edit ${project.name}`);
cy.get('[data-cy="name"]').should('have.value', `${project.name}`);
cy.get('[data-cy="name"]').clear().type(`${project.name} - edited`);
cy.intercept('PATCH', awxAPI`/projects/${project.id.toString()}/`).as('edited');
@@ -52,7 +52,7 @@ describe('Project Edit, Copy, Sync', () => {
cy.clickTableRowLink('name', project.name, { disableFilter: true });
cy.verifyPageTitle(project.name);
cy.clickButton(/^Edit project$/);
- cy.verifyPageTitle('Edit Project');
+ cy.verifyPageTitle(`Edit ${project.name}`);
cy.get('[data-cy="name"]').clear().type(`${project.name} - edited`);
cy.intercept('PATCH', awxAPI`/projects/${project.id.toString()}/`).as('edited');
cy.clickButton(/^Save project$/);
diff --git a/frontend/awx/resources/projects/ProjectPage/ProjectForm.cy.tsx b/frontend/awx/resources/projects/ProjectPage/ProjectForm.cy.tsx
index 718c199d07..abc94928bf 100644
--- a/frontend/awx/resources/projects/ProjectPage/ProjectForm.cy.tsx
+++ b/frontend/awx/resources/projects/ProjectPage/ProjectForm.cy.tsx
@@ -41,7 +41,7 @@ describe('ProjectForm.cy.ts', () => {
cy.contains('Name is required.').should('be.visible');
cy.contains('Organization is required.').should('be.visible');
cy.contains('Source control type is required.').should('be.visible');
- cy.verifyPageTitle('Create Project');
+ cy.verifyPageTitle('Create project');
});
it('validates required field for source control types', () => {
@@ -140,7 +140,7 @@ describe('ProjectForm.cy.ts', () => {
);
cy.intercept('PATCH', 'api/v2/projects/*', { statusCode: 201 }).as('editProject');
cy.mount();
- cy.verifyPageTitle('Edit Project');
+ cy.verifyPageTitle('Edit Demo Project @ 10:44:51');
cy.getByDataCy('name').should('have.value', 'Demo Project @ 10:44:51');
cy.getByDataCy('organization').should('have.text', 'Default');
cy.getByDataCy('signature_validation_credential').should('have.text', 'Select credential');
diff --git a/frontend/awx/resources/projects/ProjectPage/ProjectForm.tsx b/frontend/awx/resources/projects/ProjectPage/ProjectForm.tsx
index 57cd147f00..5babf9b629 100644
--- a/frontend/awx/resources/projects/ProjectPage/ProjectForm.tsx
+++ b/frontend/awx/resources/projects/ProjectPage/ProjectForm.tsx
@@ -66,10 +66,10 @@ export function CreateProject() {
return (
diff --git a/frontend/awx/resources/projects/ProjectPage/ProjectPage.tsx b/frontend/awx/resources/projects/ProjectPage/ProjectPage.tsx
index d94bf650a0..11544ad575 100644
--- a/frontend/awx/resources/projects/ProjectPage/ProjectPage.tsx
+++ b/frontend/awx/resources/projects/ProjectPage/ProjectPage.tsx
@@ -50,7 +50,7 @@ export function ProjectPage() {
const tabs = [
{ label: t('Details'), page: AwxRoute.ProjectDetails },
{ label: t('Schedules'), page: AwxRoute.ProjectSchedules },
- { label: t('Job templates'), page: AwxRoute.ProjectJobTemplates },
+ { label: t('Job Templates'), page: AwxRoute.ProjectJobTemplates },
{ label: t('User Access'), page: AwxRoute.ProjectUsers },
{ label: t('Team Access'), page: AwxRoute.ProjectTeams },
];