Skip to content

Commit

Permalink
Merge branch 'upload-images-#1062' into gallery-view-#1081
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdimanteto committed Nov 2, 2024
2 parents 35408f8 + 3f131ee commit 5dc385e
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Login to Harbor
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Login to Harbor
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
Expand Down
10 changes: 2 additions & 8 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,9 @@ export default tseslint.config(
...jsxA11yPlugin.configs.recommended.rules,
},
},
// eslint-plugin-testing-library doesn't support flat config properly yet
// https://github.com/testing-library/eslint-plugin-testing-library/issues/899
{
files: ['**/?*test.{js,ts,jsx,tsx}'],
plugins: {
'testing-library': fixupPluginRules({
rules: reactTestingLibraryPlugin.rules,
}),
},
rules: reactTestingLibraryPlugin.configs.react.rules,
plugins: reactTestingLibraryPlugin.configs['flat/react'].plugins,
rules: reactTestingLibraryPlugin.configs['flat/react'].rules,
}
);
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inventory-management-system",
"version": "1.0.3",
"version": "1.0.4",
"type": "module",
"private": true,
"dependencies": {
Expand Down Expand Up @@ -103,7 +103,7 @@
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-testing-library": "6.3.0",
"eslint-plugin-testing-library": "6.4.0",
"express": "4.21.0",
"globals": "15.11.0",
"jsdom": "25.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/catalogue/items/catalogueItemsTable.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,10 @@ const CatalogueItemsTable = (props: CatalogueItemsTableProps) => {
filterVariant: 'range',
Cell: ({ row }) => {
// Logic to get the range slider to work with null values
return row.original.catalogueItem.cost_to_rework_gbp === 0
return row.original.catalogueItem.days_to_rework === 0
? 0
: row.original.catalogueItem.cost_to_rework_gbp !== null
? row.original.catalogueItem.cost_to_rework_gbp
: row.original.catalogueItem.days_to_rework !== null
? row.original.catalogueItem.days_to_rework
: '';
},
GroupedCell: TableGroupedCell,
Expand Down
14 changes: 14 additions & 0 deletions src/common/images/imageGallery.component.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ describe('Image Gallery', () => {
};
user = userEvent.setup();
axiosGetSpy = vi.spyOn(storageApi, 'get');

Object.defineProperty(window, 'matchMedia', {
writable: true,
value: vi.fn().mockImplementation((query) => ({
matches: false,
media: query,
onchange: null,
addListener: vi.fn(),
removeListener: vi.fn(),
addEventListener: vi.fn(),
removeEventListener: vi.fn(),
dispatchEvent: vi.fn(),
})),
});
});

afterEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ exports[`TabView Component > renders correctly 1`] = `
</div>
</div>
<div
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 css-1idn90j-MuiGrid-root"
class="MuiGrid-root MuiGrid-item MuiGrid-grid-xs-12 css-1ol5ri8-MuiGrid-root"
>
<div
aria-labelledby="tab1-tab"
Expand Down
14 changes: 0 additions & 14 deletions src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,3 @@ window.ResizeObserver = vi.fn().mockImplementation(() => ({
observe: vi.fn(),
unobserve: vi.fn(),
}));

Object.defineProperty(window, 'matchMedia', {
writable: true,
value: vi.fn().mockImplementation((query) => ({
matches: false,
media: query,
onchange: null,
addListener: vi.fn(),
removeListener: vi.fn(),
addEventListener: vi.fn(),
removeEventListener: vi.fn(),
dispatchEvent: vi.fn(),
})),
});
1 change: 0 additions & 1 deletion src/systems/systemDetails.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ function SystemDetails(props: SystemDetailsProps) {
</Grid>
{system !== undefined && <SystemDetailsActionMenu system={system} />}
</Grid>
<Grid></Grid>
<Divider role="presentation" />
{system === undefined ? (
<Box
Expand Down
Loading

0 comments on commit 5dc385e

Please sign in to comment.