Skip to content

Commit

Permalink
build(deps): Bump @mui/material from 5.14.8 to 5.14.14 (#1225)
Browse files Browse the repository at this point in the history
* build(deps): Bump @mui/material from 5.14.8 to 5.14.14

Bumps [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) from 5.14.8 to 5.14.14.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.14.14/packages/mui-material)

---
updated-dependencies:
- dependency-name: "@mui/material"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: (WIP) mui upgrade

* fix: Added label to member role combobox

* fix: Fixed account profile tests

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Jose Buitron <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2023
1 parent 13157dd commit 94ab3de
Show file tree
Hide file tree
Showing 18 changed files with 108 additions and 89 deletions.
91 changes: 45 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@mapbox/mapbox-gl-geocoder": "^5.0.1",
"@mui/icons-material": "^5.14.15",
"@mui/lab": "^5.0.0-alpha.150",
"@mui/material": "5.14.8",
"@mui/material": "^5.14.14",
"@mui/x-data-grid": "^6.17.0",
"@reduxjs/toolkit": "^1.9.7",
"@turf/bbox": "^6.5.0",
Expand Down
4 changes: 3 additions & 1 deletion src/account/components/AccountLogin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,7 @@ test('AccountLogin: Display locale picker', async () => {
})
);
await render(<AccountLogin />);
expect(screen.getByRole('button', { name: /English/i })).toBeInTheDocument();
expect(
screen.getByRole('combobox', { name: /English/i })
).toBeInTheDocument();
});
6 changes: 4 additions & 2 deletions src/account/components/AccountProfile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,15 @@ test('AccountProfile: Save language', async () => {

expect(screen.getByText('English')).toBeInTheDocument();
await act(async () =>
fireEvent.mouseDown(screen.getByRole('button', { name: /English/i }))
fireEvent.mouseDown(screen.getByRole('combobox', { name: /English/i }))
);
const listbox = within(screen.getByRole('listbox'));
await act(async () =>
fireEvent.click(listbox.getByRole('option', { name: /Español/i }))
);
expect(screen.getByRole('button', { name: /Español/i })).toBeInTheDocument();
expect(
screen.getByRole('combobox', { name: /Español/i })
).toBeInTheDocument();

await act(async () =>
fireEvent.click(screen.getByRole('button', { name: 'Save Profile' }))
Expand Down
21 changes: 13 additions & 8 deletions src/group/membership/components/GroupMembers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ test('GroupMembers: Display list manager', async () => {
).toHaveAttribute('data-field', 'name');
expect(
within(rows[9])
.getByRole('button', { name: 'Member' })
.getByRole('combobox', { name: 'Role' })
.closest('[role="cell"]')
).toHaveAttribute('data-field', 'role');
expect(
within(rows[9]).getByRole('button', { name: 'Member' })
).toBeInTheDocument();
within(rows[9]).getByRole('combobox', { name: 'Role' })
).toHaveTextContent('Member');
expect(
within(rows[2])
.getByRole('button', { name: 'Remove' })
Expand Down Expand Up @@ -352,11 +352,11 @@ test('GroupMembers: Manager actions', async () => {
).toHaveAttribute('data-field', 'name');
expect(
within(rows[3])
.getByRole('button', { name: 'Member' })
.getByRole('combobox', { name: 'Role' })
.closest('[role="cell"]')
).toHaveAttribute('data-field', 'role');
const roleButton = within(rows[3]).getByRole('button', { name: 'Member' });
expect(roleButton).toBeInTheDocument();
const roleButton = within(rows[3]).getByRole('combobox', { name: 'Role' });
expect(within(roleButton).getByText('Member')).toBeInTheDocument();
await act(async () => fireEvent.mouseDown(roleButton));
expect(screen.getByRole('option', { name: 'Manager' })).toBeInTheDocument();
await act(
Expand All @@ -372,12 +372,17 @@ test('GroupMembers: Manager actions', async () => {
await waitFor(() =>
expect(
within(screen.getAllByRole('row')[3])
.getByRole('button', {
name: 'Manager',
.getByRole('combobox', {
name: 'Role',
})
.closest('[role="cell"]')
).toHaveAttribute('data-field', 'role')
);
expect(
within(screen.getAllByRole('row')[3]).getByRole('combobox', {
name: 'Role',
})
).toHaveTextContent('Manager');

// Remove member
expect(rows.length).toBe(4);
Expand Down
1 change: 1 addition & 0 deletions src/group/membership/components/GroupMembersList.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const RoleSelect = ({ member, tabIndex }) => {
disabled={member.fetching}
inputProps={{
tabIndex,
'aria-label': t('group.members_list_role_select_label'),
}}
disableUnderline
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ const setup = async () => {
};

const changeYear = async newYear => {
const yearSelect = screen.getByRole('button', {
name: 'Year of landscape partnership inception Select a year',
const yearSelect = screen.getByRole('combobox', {
name: 'Year of landscape partnership inception',
});
await act(async () => fireEvent.mouseDown(yearSelect));
const listbox = within(screen.getByRole('listbox'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const setup = async () => {
name: 'Description (required)',
});
const website = screen.getByRole('textbox', { name: 'Website' });
const location = screen.getByRole('button', {
name: 'Country or region (required) Landscape location',
const location = screen.getByRole('combobox', {
name: 'Country or region (required)',
});

const changeLocation = async newLocation => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ const setup = async () => {
name: 'Description (required)',
});
const website = screen.getByRole('textbox', { name: 'Website' });
const location = screen.getByRole('button', {
name: 'Country or region (required) Landscape location',
const location = screen.getByRole('combobox', {
name: 'Country or region (required)',
});

const changeLocation = async newLocation => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ const setup = async () => {
name: 'Description (required)',
});
const website = screen.getByRole('textbox', { name: 'Website' });
const location = screen.getByRole('button', {
name: 'Country or region (required) Landscape location',
const location = screen.getByRole('combobox', {
name: 'Country or region (required)',
});

const changeLocation = async newLocation => {
Expand Down
4 changes: 2 additions & 2 deletions src/landscape/components/LandscapeForm/KeyInfoNew.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const setup = async () => {
});
const email = screen.getByRole('textbox', { name: 'Email address' });
const website = screen.getByRole('textbox', { name: 'Website' });
const location = screen.getByRole('button', {
name: 'Country or region (required) Landscape location',
const location = screen.getByRole('combobox', {
name: 'Country or region (required)',
});

const changeLocation = async newLocation => {
Expand Down
5 changes: 3 additions & 2 deletions src/landscape/components/LandscapeForm/KeyInfoUpdate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ const setup = async (countryName = 'Landscape location') => {
});
const email = screen.getByRole('textbox', { name: 'Email address' });
const website = screen.getByRole('textbox', { name: 'Website' });
const location = screen.getByRole('button', {
name: `Country or region (required) ${countryName}`,
const location = screen.getByRole('combobox', {
name: `Country or region (required)`,
});
expect(within(location).getByText(countryName)).toBeInTheDocument();

const changeLocation = async newLocation => {
await act(async () => fireEvent.mouseDown(location));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const testSelectDataFileStep = async () => {
};

const validateSelectValue = async (name, value) => {
const select = screen.getByRole('button', { name });
const select = screen.getByRole('combobox', { name });
await act(async () => fireEvent.mouseDown(select));
expect(
within(screen.getByRole('listbox', { name })).getByRole('option', {
Expand All @@ -99,8 +99,8 @@ const validateSelectValue = async (name, value) => {
);
};
const changeSelectOption = async (name, newValue) => {
await screen.findByRole('button', { name });
const select = screen.getByRole('button', { name });
await screen.findByRole('combobox', { name });
const select = screen.getByRole('combobox', { name });

await act(async () => fireEvent.mouseDown(select));
await act(async () =>
Expand Down
15 changes: 9 additions & 6 deletions src/landscape/membership/components/LandscapeMembers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,13 @@ test('LandscapeMembers: Display list manager', async () => {
).toHaveAttribute('data-field', 'name');
expect(
within(rows[9])
.getByRole('button', { name: 'Member' })
.getByRole('combobox', { name: 'Role' })
.closest('[role="cell"]')
).toHaveAttribute('data-field', 'role');
expect(
within(rows[9]).getByRole('button', { name: 'Member' })
within(within(rows[9]).getByRole('combobox', { name: 'Role' })).getByText(
'Member'
)
).toBeInTheDocument();
expect(
within(rows[2])
Expand Down Expand Up @@ -397,10 +399,11 @@ test('LandscapeMembers: Manager actions', async () => {
).toHaveAttribute('data-field', 'name');
expect(
within(rows[3])
.getByRole('button', { name: 'Member' })
.getByRole('combobox', { name: 'Role' })
.closest('[role="cell"]')
).toHaveAttribute('data-field', 'role');
const roleButton = within(rows[3]).getByRole('button', { name: 'Member' });
const roleButton = within(rows[3]).getByRole('combobox', { name: 'Role' });
expect(within(roleButton).getByText('Member')).toBeInTheDocument();
expect(roleButton).toBeInTheDocument();
await act(async () => fireEvent.mouseDown(roleButton));
expect(screen.getByRole('option', { name: 'Manager' })).toBeInTheDocument();
Expand All @@ -417,8 +420,8 @@ test('LandscapeMembers: Manager actions', async () => {
await waitFor(() =>
expect(
within(screen.getAllByRole('row')[3])
.getByRole('button', {
name: 'Manager',
.getByRole('combobox', {
name: 'Role',
})
.closest('[role="cell"]')
).toHaveAttribute('data-field', 'role')
Expand Down
Loading

0 comments on commit 94ab3de

Please sign in to comment.