Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DESENG-489: engagement core to engagement content #2371

Merged
merged 3 commits into from
Feb 1, 2024
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## February 01, 2024
- **Task** Change name from "Engagement Core" to "Engagement Content". [🎟️DESENG-489](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-489)

## January 29, 2024
- **Task** Updated Babel Traverse library. [🎟️DESENG-474](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-474)
- Run `npm audit fix` to update the vulnerable Babel traverse library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import EngagementAdditionalDetails from './AdditionalDetails';
import EngagementSettings from './Settings';

const FormTabs = () => {
const [value, setValue] = React.useState<EngagementFormTabValues>(ENGAGEMENT_FORM_TABS.CORE);
const [value, setValue] = React.useState<EngagementFormTabValues>(ENGAGEMENT_FORM_TABS.CONTENT);

return (
<Box sx={{ width: '100%', typography: 'body1' }}>
Expand All @@ -24,13 +24,13 @@ const FormTabs = () => {
}}
variant="scrollable"
>
<MetTab label="Engagement Core" value={ENGAGEMENT_FORM_TABS.CORE} />
<MetTab label="Engagement Content" value={ENGAGEMENT_FORM_TABS.CONTENT} />
<MetTab label="Additional Details" value={ENGAGEMENT_FORM_TABS.ADDITIONAL} />
<MetTab label="User Management" value={ENGAGEMENT_FORM_TABS.USER_MANAGEMENT} />
<MetTab label="Settings" value={ENGAGEMENT_FORM_TABS.SETTINGS} />
</MetTabList>
</Box>
<MetTabPanel value={ENGAGEMENT_FORM_TABS.CORE}>
<MetTabPanel value={ENGAGEMENT_FORM_TABS.CONTENT}>
<EngagementForm />
</MetTabPanel>
<MetTabPanel value={ENGAGEMENT_FORM_TABS.ADDITIONAL}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export type EngagementFormTabValues = 'core' | 'settings' | 'User Management' | 'additional';
export type EngagementFormTabValues = 'content' | 'settings' | 'User Management' | 'additional';

export const ENGAGEMENT_FORM_TABS: { [x: string]: EngagementFormTabValues } = {
CORE: 'core',
CONTENT: 'content',
ADDITIONAL: 'additional',
USER_MANAGEMENT: 'User Management',
SETTINGS: 'settings',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@ describe('Engagement form page tests', () => {
setupEnv();
});

test('Engagement form tabs and their titles should be populated correctly', async () => {
useParamsMock.mockReturnValue({ engagementId: '1' });
render(<EngagementForm />);

await waitFor(() => {
expect(screen.getByText('Engagement Content')).toBeInTheDocument();
});

expect(screen.getByText('Additional Details')).toBeInTheDocument();
expect(screen.getByText('User Management')).toBeInTheDocument();
expect(screen.getByText('Settings')).toBeInTheDocument();
});

test('Engagement form with saved engagement should display saved info', async () => {
useParamsMock.mockReturnValue({ engagementId: '1' });
render(<EngagementForm />);
Expand Down
Loading