Skip to content

Commit 770774b

Browse files
committed
Merge branch 'develop' into systems-tree-test-#1272
2 parents 58e1005 + 4d250ae commit 770774b

File tree

81 files changed

+17886
-3177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+17886
-3177
lines changed

.github/workflows/ci-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ jobs:
121121
--env API__ALLOWED_CORS_HEADERS='["*"]' \
122122
--env API__ALLOWED_CORS_ORIGINS='["*"]' \
123123
--env API__ALLOWED_CORS_METHODS='["*"]' \
124+
--env OBJECT_STORAGE__ENABLED=false \
125+
--env OBJECT_STORAGE__API_REQUEST_TIMEOUT_SECONDS=10 \
126+
--env OBJECT_STORAGE__API_URL=http://localhost:8002 \
124127
harbor.stfc.ac.uk/inventory-management-system/ims-api:develop
125128
126129
- name: Checkout repo

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Specify a base image
2-
FROM node:22.13.0-alpine3.20@sha256:db8dcb90326a0116375414e9a7c068a6b87a4422b7da37b5c6cd026f7c7835d3
2+
FROM node:22.14.0-alpine3.20@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944
33

44
# Set the working directory
55
WORKDIR /inventory-management-system-run

Dockerfile.prod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dockerfile to build and serve inventory management system
22

33
# Build stage
4-
FROM node:22.13.0-alpine3.20@sha256:db8dcb90326a0116375414e9a7c068a6b87a4422b7da37b5c6cd026f7c7835d3 as builder
4+
FROM node:22.14.0-alpine3.20@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944 as builder
55

66
WORKDIR /inventory-management-system-build
77

@@ -30,7 +30,7 @@ RUN set -eux; \
3030
yarn build;
3131

3232
# Run stage
33-
FROM httpd:2.4.62-alpine3.20@sha256:b64b5734fbc0fbb8fb995d5cc29a2ff2d86ed4c83dfd4f4d82d183f2a66daed4
33+
FROM httpd:2.4.63-alpine3.21@sha256:4aec2953509e2d3aa5a8d73c580a381be44803fd2481875b15d9ad7d2810d7ca
3434

3535
WORKDIR /usr/local/apache2/htdocs
3636

cypress/e2e/with_api/catalogueCategories/functions.ts

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const modifyCatalogueCategory = (
22
values: {
33
editCatalogueCategoryName?: string;
4+
actionsIndex?: number;
45
name: string;
56
newFormFields?: {
67
name: string;
@@ -13,10 +14,15 @@ const modifyCatalogueCategory = (
1314
},
1415
ignoreChecks?: boolean
1516
) => {
16-
if (values.editCatalogueCategoryName) {
17-
cy.findByRole('button', {
18-
name: `actions ${values.editCatalogueCategoryName} catalogue category button`,
19-
}).click();
17+
if (
18+
values.editCatalogueCategoryName &&
19+
typeof values.actionsIndex === 'number'
20+
) {
21+
cy.findAllByRole('button', {
22+
name: 'Card Actions',
23+
})
24+
.eq(values.actionsIndex)
25+
.click();
2026

2127
cy.findByRole('menuitem', {
2228
name: `edit ${values.editCatalogueCategoryName} catalogue category button`,
@@ -92,7 +98,10 @@ const modifyCatalogueCategory = (
9298
}
9399

94100
cy.findByRole('button', { name: 'Save' }).click();
95-
if (values.editCatalogueCategoryName)
101+
if (
102+
values.editCatalogueCategoryName &&
103+
typeof values.actionsIndex === 'number'
104+
)
96105
cy.findByRole('button', { name: 'Close' }).click();
97106
if (!ignoreChecks) {
98107
cy.findByText(values.name).should('exist');
@@ -116,10 +125,12 @@ const modifyCatalogueCategory = (
116125
}
117126
};
118127

119-
const deleteCatalogueCategory = (name: string) => {
120-
cy.findByRole('button', {
121-
name: `actions ${name} catalogue category button`,
122-
}).click();
128+
const deleteCatalogueCategory = (name: string, actionsIndex: number) => {
129+
cy.findAllByRole('button', {
130+
name: 'Card Actions',
131+
})
132+
.eq(actionsIndex)
133+
.click();
123134

124135
cy.findByRole('menuitem', {
125136
name: `delete ${name} catalogue category button`,
@@ -128,10 +139,15 @@ const deleteCatalogueCategory = (name: string) => {
128139
cy.findByRole('button', { name: 'Continue' }).click();
129140
};
130141

131-
export const duplicateCatalogueCategory = (name: string) => {
132-
cy.findByRole('button', {
133-
name: `actions ${name} catalogue category button`,
134-
}).click();
142+
export const duplicateCatalogueCategory = (
143+
name: string,
144+
actionsIndex: number
145+
) => {
146+
cy.findAllByRole('button', {
147+
name: 'Card Actions',
148+
})
149+
.eq(actionsIndex)
150+
.click();
135151

136152
cy.findByRole('menuitem', {
137153
name: `duplicate ${name} catalogue category button`,
@@ -141,9 +157,11 @@ export const duplicateCatalogueCategory = (name: string) => {
141157
cy.findByText(`${name}_copy_1`).should('exist');
142158
};
143159

144-
const copyToCatalogueCategory = (values: { checkedCategories: string[] }) => {
160+
const copyToCatalogueCategory = (values: {
161+
checkedCategories: { name: string; index: number }[];
162+
}) => {
145163
for (let i = 0; i < values.checkedCategories.length; i++) {
146-
cy.findByLabelText(`${values.checkedCategories[i]} checkbox`).click();
164+
cy.findAllByRole('checkbox', { name: 'Toggle select card' }).eq(i).click();
147165
}
148166
cy.findByRole('button', { name: 'Copy to' }).click();
149167
cy.findByRole('button', { name: 'navigate to catalogue home' }).click();
@@ -153,14 +171,17 @@ const copyToCatalogueCategory = (values: { checkedCategories: string[] }) => {
153171
cy.findByRole('button', { name: 'navigate to catalogue home' }).click();
154172

155173
for (let i = 0; i < values.checkedCategories.length; i++) {
156-
cy.findByText(`${values.checkedCategories[i]}`).should('exist');
157-
deleteCatalogueCategory(`${values.checkedCategories[i]}`);
174+
cy.findByText(`${values.checkedCategories[i].name}`).should('exist');
175+
deleteCatalogueCategory(
176+
`${values.checkedCategories[i].name}`,
177+
values.checkedCategories[i].index
178+
);
158179
}
159180
};
160181

161182
const moveToCatalogueCategory = (values: { checkedCategories: string[] }) => {
162183
for (let i = 0; i < values.checkedCategories.length; i++) {
163-
cy.findByLabelText(`${values.checkedCategories[i]} checkbox`).click();
184+
cy.findAllByRole('checkbox', { name: 'Toggle select card' }).eq(i).click();
164185
}
165186
cy.findByRole('button', { name: 'Move to' }).click();
166187
cy.findByRole('button', { name: 'navigate to catalogue home' }).click();
@@ -224,27 +245,32 @@ export const editCatalogueCategories = () => {
224245
cy.findByRole('button', { name: 'navigate to catalogue home' }).click();
225246
modifyCatalogueCategory({
226247
editCatalogueCategoryName: 'Lenses',
248+
actionsIndex: 0,
227249
name: 'Lenses 2',
228250
});
229251

230252
cy.findByText('Lenses 2').click();
231253

232254
modifyCatalogueCategory({
233255
editCatalogueCategoryName: 'Spherical Lenses',
256+
actionsIndex: 0,
234257
name: 'Spherical Lenses 2',
235258
});
236259
};
237260

238261
export const duplicateCatalogueCategories = () => {
239262
cy.findByRole('button', { name: 'navigate to catalogue home' }).click();
240-
duplicateCatalogueCategory('Lenses 2');
263+
duplicateCatalogueCategory('Lenses 2', 0);
241264
cy.findByText('Lenses 2').click();
242-
duplicateCatalogueCategory('Spherical Lenses 2');
265+
duplicateCatalogueCategory('Spherical Lenses 2', 0);
243266
};
244267

245268
export const copyToCatalogueCategories = () => {
246269
copyToCatalogueCategory({
247-
checkedCategories: ['Spherical Lenses 2', 'Spherical Lenses 2_copy_1'],
270+
checkedCategories: [
271+
{ name: 'Spherical Lenses 2', index: 2 },
272+
{ name: 'Spherical Lenses 2_copy_1', index: 2 },
273+
],
248274
});
249275
};
250276

@@ -258,8 +284,8 @@ export const moveToCatalogueCategories = () => {
258284

259285
export const deleteCatalogueCategories = () => {
260286
cy.findByRole('button', { name: 'navigate to catalogue home' }).click();
261-
deleteCatalogueCategory('Spherical Lenses 2');
262-
deleteCatalogueCategory('Spherical Lenses 2_copy_1');
263-
deleteCatalogueCategory('Lenses 2');
264-
deleteCatalogueCategory('Lenses 2_copy_1');
287+
deleteCatalogueCategory('Lenses 2', 0);
288+
deleteCatalogueCategory('Spherical Lenses 2', 0);
289+
deleteCatalogueCategory('Lenses 2_copy_1', 0);
290+
deleteCatalogueCategory('Spherical Lenses 2_copy_1', 0);
265291
};

cypress/e2e/with_api/catalogueItems/catalogueItems.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { addUnits } from '../units/functions';
77
import {
88
addCatalogueItem,
99
copyToCatalogueItems,
10+
duplicateCatalogueItem,
1011
editCatalogueItem,
1112
moveToCatalogueItems,
1213
obsoleteCatalogueItem,
13-
duplicateCatalogueItem,
1414
} from './functions';
1515

1616
describe('catalogue items', () => {
@@ -28,7 +28,7 @@ describe('catalogue items', () => {
2828
addUnits(['mm', 'nm'], true);
2929
cy.visit('/catalogue');
3030
addCatalogueCategories(true);
31-
duplicateCatalogueCategory('Spherical Lenses');
31+
duplicateCatalogueCategory('Spherical Lenses', 0);
3232
});
3333
afterEach(() => {
3434
cy.clearMocks();

cypress/e2e/with_api/items/functions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const editProperty = () => {
128128
cy.findByRole('button', { name: 'navigate to catalogue home' }).click();
129129
cy.findByText('Lenses').click();
130130
cy.findByRole('button', {
131-
name: `actions Spherical Lenses catalogue category button`,
131+
name: `Card Actions`,
132132
}).click();
133133

134134
cy.findByRole('menuitem', {
@@ -176,7 +176,7 @@ export const addProperty = () => {
176176
cy.findByRole('button', { name: 'navigate to catalogue home' }).click();
177177
cy.findByText('Lenses').click();
178178
cy.findByRole('button', {
179-
name: `actions Spherical Lenses catalogue category button`,
179+
name: `Card Actions`,
180180
}).click();
181181

182182
cy.findByRole('menuitem', {

0 commit comments

Comments
 (0)