Skip to content

Commit 29a6e24

Browse files
authored
Merge pull request #1790 from CruGlobal/MDX-9615
MPDX-9615 - Update formula in salary breakdown to specify geographic multiplier
2 parents f9b0c40 + 0a61001 commit 29a6e24

2 files changed

Lines changed: 9 additions & 14 deletions

File tree

src/components/HrTools/PdsGoalCalculator/SupportItem/salaryBreakdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const buildSalaryBreakdownRows = (
7676
{
7777
id: 'gross-monthly-pay',
7878
category: t('Gross Monthly Pay'),
79-
formula: t('Monthly Base × {{rate}}', {
79+
formula: t('Monthly Base × Geographic Multiplier ({{rate}})', {
8080
rate: percentageFormat(1 + geographicMultiplier, locale),
8181
}),
8282
amount: grossMonthlyPay,

src/components/Reports/StaffExpenseReport/StaffExpenseReport.test.tsx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -277,29 +277,26 @@ describe('StaffExpenseReport', () => {
277277
});
278278

279279
it('shows month title and navigation when only category filters are applied', async () => {
280-
const { getByRole, findByRole, findByLabelText, queryByText } = render(
280+
const { getByRole, findByLabelText, findByRole } = render(
281281
<TestComponent />,
282282
);
283283

284284
userEvent.click(getByRole('button', { name: 'Filter Settings' }));
285285

286286
userEvent.click(await findByLabelText('Assessment'));
287-
userEvent.click(await findByRole('button', { name: 'Apply Filters' }));
287+
await waitFor(() =>
288+
expect(getByRole('button', { name: 'Apply Filters' })).not.toBeDisabled(),
289+
);
290+
userEvent.click(getByRole('button', { name: 'Apply Filters' }));
288291

289292
expect(
290293
await findByRole('heading', { name: 'January 2020', level: 6 }),
291294
).toBeInTheDocument();
292-
expect(
293-
await findByRole('button', { name: 'Previous Month' }),
294-
).toBeInTheDocument();
295-
expect(
296-
await findByRole('button', { name: 'Next Month' }),
297-
).toBeInTheDocument();
298-
expect(queryByText('Clear Filters')).not.toBeInTheDocument();
299-
});
295+
expect(getByRole('button', { name: 'Previous Month' })).toBeInTheDocument();
296+
expect(getByRole('button', { name: 'Next Month' })).toBeInTheDocument();
297+
}, 10000);
300298

301299
it('shows filter date range title and hides month navigation when date filters are applied', async () => {
302-
const originalNow = Settings.now;
303300
Settings.now = () => new Date(2020, 0, 20).valueOf();
304301

305302
const { getByRole, findByRole, getByLabelText, queryByRole } = render(
@@ -330,7 +327,5 @@ describe('StaffExpenseReport', () => {
330327
expect(
331328
queryByRole('button', { name: 'Next Month' }),
332329
).not.toBeInTheDocument();
333-
334-
Settings.now = originalNow;
335330
}, 10000);
336331
});

0 commit comments

Comments
 (0)