Skip to content

Commit 788f173

Browse files
authored
Merge branch 'main' into patch-4
2 parents c5d203b + daaa810 commit 788f173

224 files changed

Lines changed: 4950 additions & 3021 deletions

File tree

Some content is hidden

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

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,37 @@ jobs:
268268
echo "$result"
269269
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental &amp; Architectural Phenomenology Vol. 28, No. 1"
270270
271+
# Verify 301 Handle redirect behavior
272+
# Note: /handle/123456789/260 is the same test Publication used by our e2e tests
273+
- name: Verify 301 redirect from '/handle' URLs
274+
run: |
275+
result=$(wget --server-response --quiet http://127.0.0.1:4000/handle/123456789/260 2>&1 | head -1 | awk '{print $2}')
276+
echo "$result"
277+
[[ "$result" -eq "301" ]]
278+
279+
# Verify 403 error code behavior
280+
- name: Verify 403 error code from '/403'
281+
run: |
282+
result=$(wget --server-response --quiet http://127.0.0.1:4000/403 2>&1 | head -1 | awk '{print $2}')
283+
echo "$result"
284+
[[ "$result" -eq "403" ]]
285+
286+
# Verify 404 error code behavior
287+
- name: Verify 404 error code from '/404' and on invalid pages
288+
run: |
289+
result=$(wget --server-response --quiet http://127.0.0.1:4000/404 2>&1 | head -1 | awk '{print $2}')
290+
echo "$result"
291+
result2=$(wget --server-response --quiet http://127.0.0.1:4000/invalidurl 2>&1 | head -1 | awk '{print $2}')
292+
echo "$result2"
293+
[[ "$result" -eq "404" && "$result2" -eq "404" ]]
294+
295+
# Verify 500 error code behavior
296+
- name: Verify 500 error code from '/500'
297+
run: |
298+
result=$(wget --server-response --quiet http://127.0.0.1:4000/500 2>&1 | head -1 | awk '{print $2}')
299+
echo "$result"
300+
[[ "$result" -eq "500" ]]
301+
271302
- name: Stop running app
272303
run: kill -9 $(lsof -t -i:4000)
273304

config/config.example.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,24 @@ ssr:
2323
# Determining which styles are critical is a relatively expensive operation; this option is
2424
# disabled (false) by default to boost server performance at the expense of loading smoothness.
2525
inlineCriticalCss: false
26-
# Path prefixes to enable SSR for. By default these are limited to paths of primary DSpace objects.
27-
# NOTE: The "/handle/" path ensures Handle redirects work via SSR. The "/reload/" path ensures
28-
# hard refreshes (e.g. after login) trigger SSR while fully reloading the page.
29-
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ]
26+
# Patterns to be run as regexes against the path of the page to check if SSR is allowed.
27+
# If the path match any of the regexes it will be served directly in CSR.
28+
# By default, excludes community and collection browse, global browse, global search, community list, statistics and various administrative tools.
29+
excludePathPatterns:
30+
- pattern: "^/communities/[a-f0-9-]{36}/browse(/.*)?$",
31+
flag: "i"
32+
- pattern: "^/collections/[a-f0-9-]{36}/browse(/.*)?$"
33+
flag: "i"
34+
- pattern: "^/browse/"
35+
- pattern: "^/search$"
36+
- pattern: "^/community-list$"
37+
- pattern: "^/admin/"
38+
- pattern: "^/processes/?"
39+
- pattern: "^/notifications/"
40+
- pattern: "^/statistics/?"
41+
- pattern: "^/access-control/"
42+
- pattern: "^/health$"
43+
3044
# Whether to enable rendering of Search component on SSR.
3145
# If set to true the component will be included in the HTML returned from the server side rendering.
3246
# If set to false the component will not be included in the HTML returned from the server side rendering.

cypress/e2e/homepage.cy.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ describe('Homepage', () => {
2626
// Wait for homepage tag to appear
2727
cy.get('ds-home-page').should('be.visible');
2828

29+
// Wait for at least one loading component to show up
30+
cy.get('ds-loading').should('exist');
31+
32+
// Wait until all loading components have disappeared
33+
cy.get('ds-loading').should('not.exist');
34+
2935
// Analyze <ds-home-page> for accessibility issues
3036
testA11y('ds-home-page');
3137
});

0 commit comments

Comments
 (0)