Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cypress/e2e/AutomationCalculator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ describe('Automation Calculator page', () => {
}
});

it('applies default manual time to unreviewed templates on confirm', () => {
it('applies default manual time to all templates on confirm', () => {
const { markApplied } = visitWithStubbedTemplates();

cy.intercept('POST', '**/roi_templates_apply_default/', (req) => {
Expand All @@ -417,7 +417,9 @@ describe('Automation Calculator page', () => {
// paginated client, is the source of truth for how many get updated).
cy.getByCy('apply_default_modal').should(
'contain.text',
"This will set 30 minutes as the manual time for all templates you haven't individually reviewed.",
'This will overwrite the manual time for every template with the ' +
"current default of 30 minutes, including templates you've already " +
'reviewed. Do you want to apply this default value to all templates?',
);

cy.getByCy('current_page_savings')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ const AutomationCalculator: FC<AutmationCalculatorProps> = ({
const applyDefaultToAll = async () => {
let count = 0;
try {
// backend applies to all unreviewed templates tenant-wide; no params needed
// backend applies to all templates tenant-wide; no params needed
const res = (await applyDefaultROITemplates()) as {
updated_count?: number;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const CalculationCost: FunctionComponent<Props> = ({
isDisabled={readOnly}
onClick={() => setIsOpen(true)}
>
Apply default to all unreviewed
Apply default to all templates
</Button>
<AlertModal
isOpen={isOpen}
Expand Down Expand Up @@ -172,8 +172,10 @@ const CalculationCost: FunctionComponent<Props> = ({
</Button>,
]}
>
{`This will set ${defaultManualEffort || 0} minutes as the manual time ` +
`for all templates you haven't individually reviewed. Continue?`}
{`This will overwrite the manual time for every template with the ` +
`current default of ${defaultManualEffort || 0} minutes, including ` +
`templates you've already reviewed. Do you want to apply this ` +
`default value to all templates?`}
</AlertModal>
</CardBody>
</Card>
Expand Down
Loading