diff --git a/cypress/e2e/awx/projects/project-details.cy.ts b/cypress/e2e/awx/projects/project-details.cy.ts index fc2bddf5c0..7440c61cc6 100644 --- a/cypress/e2e/awx/projects/project-details.cy.ts +++ b/cypress/e2e/awx/projects/project-details.cy.ts @@ -120,7 +120,9 @@ describe('Projects', () => { cy.get('[data-ouia-component-id="simple-table"]') .scrollIntoView() .within(() => { - cy.getByDataCy('rules-column-header').should('be.visible').and('contain', 'Rules'); + cy.getByDataCy('next-occurrence-timestamps-column-header') + .should('be.visible') + .and('contain', 'Rules'); cy.getByDataCy('rules-column-cell').should('have.descendants', 'ul'); cy.get('tbody tr').should('have.length', 1); //First, 1 rule is showing }); @@ -190,7 +192,7 @@ describe('Projects', () => { cy.clickButton(/^Next$/); cy.wait('@preview'); cy.getByDataCy('local-time-zone').should('contain', 'UTC'); - cy.get('[data-cy="exceptions-column-header"]') + cy.get('[data-cy="next-exclusion-timestamps-column-header"]') .should('be.visible') .and('contain', 'Exceptions'); cy.intercept('PATCH', awxAPI`/schedules/${schedule.id.toString()}/`).as('edited'); @@ -219,7 +221,7 @@ describe('Projects', () => { cy.intercept('PATCH', awxAPI`/schedules/${schedule.id.toString()}/`).as('editedAgain'); cy.getByDataCy('Submit').click(); cy.wait('@editedAgain'); - cy.get('[data-cy="exceptions-column-header"]').should('not.exist'); + cy.get('[data-cy="next-exclusion-timestamps-column-header"]').should('not.exist'); }); it('can toggle a schedule', () => { diff --git a/cypress/e2e/awx/schedules/schedules.cy.ts b/cypress/e2e/awx/schedules/schedules.cy.ts index 36b799f602..8b546e362b 100644 --- a/cypress/e2e/awx/schedules/schedules.cy.ts +++ b/cypress/e2e/awx/schedules/schedules.cy.ts @@ -417,7 +417,9 @@ describe('Schedules - Create and Delete', () => { ); }); cy.get('[data-ouia-component-id="simple-table"]').within(() => { - cy.getByDataCy('rules-column-header').should('be.visible').and('contain', 'Rules'); + cy.getByDataCy('next-occurrence-timestamps-column-header') + .should('be.visible') + .and('contain', 'Rules'); cy.getByDataCy('rules-column-cell').should('have.descendants', 'ul'); cy.get('tbody tr').should('have.length', 1); }); @@ -439,7 +441,7 @@ describe('Schedules - Create and Delete', () => { ); }); cy.get('[data-ouia-component-id="simple-table"]').within(() => { - cy.getByDataCy('exceptions-column-header') + cy.getByDataCy('next-exclusion-timestamps-column-header') .should('be.visible') .and('contain', 'Exceptions'); cy.getByDataCy('exceptions-column-cell').should('have.descendants', 'ul'); @@ -489,7 +491,9 @@ describe('Schedules - Create and Delete', () => { .first() .scrollIntoView() .within(() => { - cy.getByDataCy('rules-column-header').should('be.visible').and('contain', 'Rules'); + cy.getByDataCy('next-occurrence-timestamps-column-header') + .should('be.visible') + .and('contain', 'Rules'); cy.getByDataCy('rules-column-cell').should('have.descendants', 'ul'); cy.get('tbody tr').should('have.length', 1); }); @@ -498,7 +502,7 @@ describe('Schedules - Create and Delete', () => { .last() .scrollIntoView() .within(() => { - cy.getByDataCy('exceptions-column-header') + cy.getByDataCy('next-exclusion-timestamps-column-header') .should('be.visible') .and('contain', 'Exceptions'); cy.getByDataCy('exceptions-column-cell').should('have.descendants', 'ul'); @@ -677,7 +681,9 @@ describe('Schedules - Edit', () => { `RRULE:FREQ=MINUTELY;INTERVAL=1;WKST=SU;UNTIL=${date.replaceAll('-', '')}T` ); cy.get('[data-ouia-component-id="simple-table"]').within(() => { - cy.getByDataCy('rules-column-header').should('be.visible').and('contain', 'Rules'); + cy.getByDataCy('next-occurrence-timestamps-column-header') + .should('be.visible') + .and('contain', 'Rules'); cy.getByDataCy('rules-column-cell').should('have.descendants', 'ul'); cy.get('tbody tr').should('have.length', 3); }); @@ -823,7 +829,7 @@ describe('Schedules - Edit', () => { 'RRULE:FREQ=MONTHLY' ); cy.get('[data-ouia-component-id="simple-table"]').within(() => { - cy.get('[data-cy="exceptions-column-header"]').should('not.exist'); + cy.getByDataCy('next-exclusion-timestamps-column-header').should('not.exist'); cy.get('tbody tr').should('have.length', 1); }); cy.intercept('PATCH', awxAPI`/schedules/*`).as('editedSchedule'); diff --git a/frontend/awx/views/schedules/SchedulePage/ScheduleDetails.tsx b/frontend/awx/views/schedules/SchedulePage/ScheduleDetails.tsx index be96dc68ed..cc4ab8799f 100644 --- a/frontend/awx/views/schedules/SchedulePage/ScheduleDetails.tsx +++ b/frontend/awx/views/schedules/SchedulePage/ScheduleDetails.tsx @@ -146,9 +146,19 @@ export function ScheduleDetails(props: { isSystemJobTemplateSchedule?: boolean } )} - + {exceptions.length ? ( - + ) : null} diff --git a/frontend/awx/views/schedules/components/RuleForm.tsx b/frontend/awx/views/schedules/components/RuleForm.tsx index 604383d627..ffe7688880 100644 --- a/frontend/awx/views/schedules/components/RuleForm.tsx +++ b/frontend/awx/views/schedules/components/RuleForm.tsx @@ -69,7 +69,7 @@ export function RuleForm( const rrulestring = `DTSTART;TZID=${timezone}:${dateString}`; const ruleStart = RRule.fromString(rrulestring); const rule = new RRule({ ...ruleStart.options, ...rest }); - if (endType === 'until') { + if (until !== null) { const untilTime = until?.time; const untilDate = until?.date; if (untilDate && untilTime) {