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

internal/fe-upgrade-clarin-dspace-7.6 #450

Merged
merged 3,260 commits into from
Jan 30, 2024
Merged
Changes from 250 commits
Commits
Show all changes
3260 commits
Select commit Hold shift + click to select a range
3cdcdaf
Fix accessibility of date sliders by adding aria-labels
tdonohue Aug 29, 2023
6df7651
Minor fixes to cypress tests
tdonohue Aug 29, 2023
63c752b
Fix heading order accessibility issue in search filters/facets
tdonohue Aug 29, 2023
02c47c3
Merge pull request #2469 from DSpace/backport-2468-to-dspace-7_x
tdonohue Aug 30, 2023
d1ebf07
Spanish translation updated to 7.6
sergius02 Aug 22, 2023
a4eaf02
Some lint errors fixed
sergius02 Aug 22, 2023
9afbd8d
🐛 fix when navbar expands on firefox
hugo-escire Aug 18, 2023
2987ad0
Merge pull request #2474 from DSpace/backport-2444-to-dspace-7_x
alanorth Sep 5, 2023
cd350dd
Merge pull request #2472 from DSpace/backport-2448-to-dspace-7_x
tdonohue Sep 5, 2023
f88638e
🐛 Fix Value of dropdown changes automatically on item submission page
hugo-escire Aug 13, 2023
eb38b58
✅change test event, click by mousedown on dynamic-scrollable-dropdown…
hugo-escire Aug 13, 2023
5f5d11c
Merge pull request #2476 from DSpace/backport-2432-to-dspace-7_x
alanorth Sep 5, 2023
8363273
config/config.example.yml: fix example syntax
alanorth Aug 24, 2023
5b646af
Merge pull request #2477 from DSpace/backport-2457-to-dspace-7_x
tdonohue Sep 5, 2023
92e0b6d
Fix VocabularyTreeview not updating + i18n for nsi
nona-luypaert Jul 7, 2023
162cf94
Merge pull request #2478 from DSpace/backport-2361-to-dspace-7_x
tdonohue Sep 6, 2023
c279058
104189: Allow CSV export on related entity search
Atmire-Kristof Jul 12, 2023
4918ff2
104189: CSV export add fixedFilter
Atmire-Kristof Jul 12, 2023
d95fa43
Merge pull request #2479 from DSpace/backport-2366-to-dspace-7_x
tdonohue Sep 6, 2023
1622b25
Minor pt-PT translation fixes
Aug 30, 2023
d14e258
Merge pull request #2483 from DSpace/backport-2470-to-dspace-7_x
tdonohue Sep 7, 2023
b46390c
Merge pull request #2396 from alexandrevryghem/w2p-104312_pass-query-…
tdonohue Sep 7, 2023
97b2eb7
Merge pull request #2404 from alexandrevryghem/fix-setStaleByHrefSubt…
tdonohue Sep 7, 2023
3a465ac
remove redundant cache default values from server.ts
saschaszott Aug 2, 2023
a0a8607
Merge pull request #2484 from DSpace/backport-2412-to-dspace-7_x
tdonohue Sep 8, 2023
b7b3db5
🚸remove thumbnail from file-upload section and show bitstream format …
hugo-escire Aug 4, 2023
5daf993
🎨revert unnecessary format
hugo-escire Sep 8, 2023
22538f3
Update workspaceitem-section-upload-file.model.ts
tdonohue Sep 8, 2023
8d29541
♻️ refactor chain of observables to avoid async issues
hugo-escire Aug 19, 2023
e3ea2cb
🐛 fix bug of caching when add new schema
hugo-escire Aug 19, 2023
161d7e0
🎨 revert format
hugo-escire Sep 8, 2023
cd93c6e
Merge pull request #2487 from DSpace/backport-2445-to-dspace-7_x
alanorth Sep 8, 2023
0905a53
Fix innerText still being undefined in ssr mode
alexandrevryghem Sep 8, 2023
459a431
Merge pull request #2486 from DSpace/backport-2421-to-dspace-7_x
tdonohue Sep 8, 2023
bdf7414
Merge pull request #2488 from alexandrevryghem/fix-display-order-auth…
tdonohue Sep 11, 2023
b423b49
Correct text of help info on edit group page
tdonohue Sep 12, 2023
a37e0f2
Merge pull request #2497 from DSpace/backport-2493-to-dspace-7_x
tdonohue Sep 14, 2023
15c2af5
Graceful shutdown on SIGINT (e.g. from 'pm2 stop').
mwoodiupui Aug 22, 2023
46e2f4e
Properly await termination.
mwoodiupui Aug 22, 2023
d6cabd1
Document a modified method as required by PR guidelines.
mwoodiupui Aug 22, 2023
2d73373
Merge pull request #2498 from DSpace/backport-2451-to-dspace-7_x
tdonohue Sep 14, 2023
3e8d180
106974: Angular SSR menu issues
YanaDePauw Sep 18, 2023
5a5f71a
Merge remote-tracking branch 'upstream/dspace-7_x' into Angular-SRR-m…
YanaDePauw Sep 18, 2023
47029c0
src/app/shared/search: don't capitalize metadata values
alanorth Sep 18, 2023
5ad621b
fix issue where more than one api call was made on every route change
artlowel Sep 22, 2023
0104f81
Merge branch 'fix-mutliple-api-calls-on-route-change-7.6' into fix-mu…
artlowel Sep 22, 2023
8fbe8c1
fix issue where invalidateRootCache didn't happen when the page first…
artlowel Sep 22, 2023
7a8e220
Merge branch 'fix-mutliple-api-calls-on-route-change-7.6' into fix-mu…
artlowel Sep 22, 2023
742b2d9
remove obsolete label element in metadata-schema.component.html
saschaszott Sep 19, 2023
c7fe310
removed trailing whitespaces as suggested by reviewer
saschaszott Sep 22, 2023
fd3f162
Merge pull request #2514 from DSpace/backport-2505-to-dspace-7_x
tdonohue Sep 22, 2023
f77d01c
[Port dspace-7_x] Update fi.json5 (#2516)
dspace-bot Sep 25, 2023
abd6c01
Merge pull request #2502 from alanorth/undo-text-capitalize
J4bbi Sep 25, 2023
d6d5a28
Fix routes not working with baseHref
alexandrevryghem Sep 1, 2023
1c38d92
[Port dspace-7_x] Serbian (Latin) translation (#2520)
dspace-bot Sep 26, 2023
83beb54
Merge pull request #2521 from DSpace/backport-2473-to-dspace-7_x
alanorth Sep 26, 2023
77efe52
[Port dspace-7_x] Fix missing or wrong Italian translations (#2522)
dspace-bot Sep 26, 2023
32fc28e
fix dev mode issue where retrieving the login options fails
artlowel Sep 26, 2023
d02c539
Merge branch 'fix-mutliple-api-calls-on-route-change-7.6' into fix-mu…
artlowel Sep 26, 2023
6a99185
roll back unintended change to the responseMsToLive for RootDataservice
artlowel Sep 26, 2023
67a6f58
Merge branch 'fix-mutliple-api-calls-on-route-change-7.6' into fix-mu…
artlowel Sep 26, 2023
2aab426
[DURACOM-185] Fix pointer on language dropdown menu
davide-negretti Sep 25, 2023
19eec6a
Merge pull request #2526 from DSpace/backport-2525-to-dspace-7_x
alanorth Sep 26, 2023
506579c
Merge pull request #2510 from atmire/fix-mutliple-api-calls-on-route-…
alanorth Sep 27, 2023
578a427
Move subscription button to DSO edit menu
ybnd Jul 20, 2023
6d195f5
Update DSO edit menu resolver tests
ybnd Jul 31, 2023
980e254
Merge pull request #2528 from DSpace/backport-2385-to-dspace-7_x
alanorth Sep 27, 2023
709848e
Issue#2535: Hide add more button in submission if no disabled sections
MarieVerdonck Oct 4, 2023
77dd72b
Merge branch 'issue-2535_hide-add-more-button-submission-if-no-disabl…
MarieVerdonck Oct 4, 2023
ec86bc1
translate community as 'Bereich' in de.json5
mugraph Oct 7, 2023
c03cd03
Merge pull request #2541 from DSpace/backport-2537-to-dspace-7_x
pnbecker Oct 11, 2023
15d2880
Fix browse by visual bug
Sep 29, 2023
59be2ae
Merge pull request #2543 from DSpace/backport-2531-to-dspace-7_x
alanorth Oct 12, 2023
3cb23c1
Merge pull request #2536 from atmire/issue-2535_hide-add-more-button-…
alanorth Oct 12, 2023
a419956
Merge remote-tracking branch 'upstream/dspace-7_x' into split-eperson…
alexandrevryghem Oct 14, 2023
8f881db
Bump postcss from 8.4.23 to 8.4.31
dependabot[bot] Oct 4, 2023
fd85016
Merge pull request #2546 from DSpace/backport-2534-to-dspace-7_x
alanorth Oct 16, 2023
c4a60ab
check cssRules existence before css variables are get from stylesheet
floriangantner Aug 23, 2023
21dcef0
checkstyle remove unused extra lines
floriangantner Oct 17, 2023
b5f942b
Merge pull request #2547 from DSpace/backport-2454-to-dspace-7_x
alanorth Oct 17, 2023
c25b80a
Merge pull request #2504 from atmire/Angular-SRR-menu-issues
tdonohue Oct 19, 2023
2e57176
107664: Normalized ePerson & group edit url and moved error message t…
alexandrevryghem Oct 19, 2023
d473fcd
Merge branch 'split-eperson-administration-page_contribute-7.6' into …
alexandrevryghem Oct 19, 2023
bc0629e
Bump @babel/traverse from 7.21.4 to 7.23.2
dependabot[bot] Oct 19, 2023
1eeed36
Merge pull request #2552 from DSpace/backport-2549-to-dspace-7_x
tdonohue Oct 20, 2023
2834ac3
Revert "Check cssRules before css variables are read from stylesheet …
tdonohue Oct 20, 2023
c3ee2ca
Merge pull request #2559 from DSpace/backport-2558-to-dspace-7_x
tdonohue Oct 20, 2023
e9b70e3
Update email-request-copy.component.html
amgciadev Aug 15, 2023
33c2c98
Merge pull request #2560 from DSpace/backport-2439-to-dspace-7_x
tdonohue Oct 20, 2023
8428b05
Fix RequestService test failing because of different lastUpdated time
alexandrevryghem Oct 21, 2023
7dd9156
Merge pull request #2564 from DSpace/backport-2561-to-dspace-7_x
tdonohue Oct 23, 2023
d6de6fe
Use gap instead of individual paddings for header icons
alexandrevryghem Sep 26, 2023
d7f1d37
Themed LangSwitchComponent
alexandrevryghem Sep 26, 2023
e82a1eb
Applied same gap between header icons in the dspace theme and made th…
alexandrevryghem Sep 26, 2023
d7dba4b
Fixed invalid html structure the ExpandableNavbarSectionComponent had…
alexandrevryghem Sep 28, 2023
a92aa05
Merge pull request #2566 from DSpace/backport-2527-to-dspace-7_x
alanorth Oct 23, 2023
884e113
Added Serbian cyrilic translation and corrected Serbian latin transla…
imilos Oct 20, 2023
5ab69af
Added Serbian cyrilic translation and corrected Serbian latin transla…
imilos Oct 20, 2023
73f21f2
Merge pull request #2571 from DSpace/backport-2553-to-dspace-7_x
alanorth Oct 24, 2023
8665710
Merge branch 'fix-display-order-authentication-methods_contribute-7.4…
alexandrevryghem Oct 21, 2023
d04d9fd
Added themed-user-menu component.
Leano1998 Jul 10, 2023
de82663
Corrected missing semicolon.
Leano1998 Jul 10, 2023
a4aecce
Replaced tags for ds-user-menu.
Leano1998 Jul 10, 2023
2ec90b8
Included user-menu component in custom theme.
Leano1998 Jul 10, 2023
4945460
Removed default value from inExpandableNavbar.
Leano1998 Sep 14, 2023
1d2cdf7
Merge pull request #2575 from tdonohue/port_2530_to_7x
tdonohue Oct 25, 2023
d6951dc
Merge pull request #2576 from tdonohue/port_2362_to_7x
tdonohue Oct 25, 2023
3b6dd66
Merge pull request #2458 from atmire/backport-2423-to-dspace-7_x
tdonohue Oct 25, 2023
00eb24c
[DURACOM-190] Fix i18n labels in vocabulary-treeview
davide-negretti Oct 11, 2023
e10a08e
[DURACOM-190] Fix alignment in vocabulary-treeview
davide-negretti Oct 13, 2023
673f817
Merge pull request #2464 from alexandrevryghem/i18n-cache-busting_con…
tdonohue Oct 26, 2023
f8671e7
Merge pull request #2581 from DSpace/backport-2542-to-dspace-7_x
tdonohue Oct 26, 2023
163661a
allow to insert multi-line scope notes in MD field registry
saschaszott Sep 19, 2023
97b22c6
Merge pull request #2391 from alexandrevryghem/split-eperson-administ…
tdonohue Oct 26, 2023
b9f60fa
Merge pull request #2583 from DSpace/backport-2506-to-dspace-7_x
tdonohue Oct 26, 2023
72dcfdd
Added support for changing the color of the navbar
alexandrevryghem Aug 16, 2023
a40e269
Fixed header bg color not being set in default (no) theme
alexandrevryghem Aug 16, 2023
166444f
Fixed breadcrumb padding using incorrect syntax
alexandrevryghem Aug 17, 2023
e548ebc
Added new variables for the expandable navbar section
alexandrevryghem Sep 29, 2023
3e9f3ab
Merge pull request #2584 from DSpace/backport-2441-to-dspace-7_x
tdonohue Oct 26, 2023
b8079a3
New themed components & minor CSS fixes (#2442)
alexandrevryghem Oct 26, 2023
6a182c3
Merge pull request #2585 from tdonohue/port_2442_to_7x
tdonohue Oct 26, 2023
c6b66b6
more error-prone check of cssRules existence before css variables are…
floriangantner Oct 26, 2023
701c6e3
Merge pull request #2589 from DSpace/backport-2580-to-dspace-7_x
tdonohue Oct 27, 2023
e1494c0
fix(pt-BR.json5): fix and update the language file
marcoaureliocardoso Oct 29, 2023
8b48a0b
fix(pt-BR.json5): fix and update the language file and previous errors
marcoaureliocardoso Oct 29, 2023
e54723a
Merged in DSC-106 (pull request #643)
alisaismailati Oct 12, 2023
c99487b
[DURACOM-194] fixed year input value on input type date
alisaismailati Oct 30, 2023
4a10d37
Merge pull request #2598 from DSpace/backport-2593-to-dspace-7_x
tdonohue Nov 3, 2023
f3f87dc
Ensure e2e tests run in production mode
tdonohue Nov 6, 2023
042c0f0
Specify user agent to avoid being detected as a "bot" by backend
tdonohue Nov 8, 2023
5bb451a
Merge pull request #2604 from DSpace/backport-2603-to-dspace-7_x
tdonohue Nov 8, 2023
75e45cc
[DURACOM-177] gap-* classes
davide-negretti Jul 11, 2023
c5f22ab
[DURACOM-177] Use gap-* classes on navbar buttons
davide-negretti Nov 6, 2023
fbe4732
Merge pull request #2590 from marcoaureliocardoso/dspace-7_x
tdonohue Nov 8, 2023
5eb62e2
Merge pull request #2605 from DSpace/backport-2364-to-dspace-7_x
tdonohue Nov 8, 2023
4b4c1dc
[DURACOM-197] Fix cache issue when depositing a submission
atarix83 Nov 2, 2023
fba3078
Add UI nameSpace context path to Mirador viewer path
wwelling Nov 1, 2023
a758848
108055: fix issue 8686: unable to enter freetext values in the submis…
Nov 8, 2023
e815b1d
108055: add user input to tag list
Nov 8, 2023
31ee580
Merge pull request #2615 from DSpace/backport-2602-to-dspace-7_x
alanorth Nov 9, 2023
137a83e
Merge pull request #2614 from DSpace/backport-2595-to-dspace-7_x
tdonohue Nov 9, 2023
bc21085
Support type-bind of elements based on repeatable list type-bound ele…
Oct 25, 2023
0d0c2da
[DURACOM-195] Simplify vertical spacing in header and breadcrumbs
davide-negretti Oct 30, 2023
5f46b63
[DURACOM-180] Prevent header from covering media viewer controls (dsp…
davide-negretti Oct 31, 2023
c6ade09
[DURACOM-180] Prevent header from covering media viewer controls (bas…
davide-negretti Nov 9, 2023
203dcbe
Merge pull request #2612 from DSpace/backport-2596-to-dspace-7_x
tdonohue Nov 9, 2023
34b91a7
Merge pull request #2617 from DSpace/backport-2594-to-dspace-7_x
tdonohue Nov 10, 2023
1d0ca04
Update condition to render show more node
wwelling Nov 3, 2023
b6d8c7d
Filter expanded nodes by id
wwelling Nov 9, 2023
61ded72
Merge pull request #2616 from DSpace/backport-2574-to-dspace-7_x
tdonohue Nov 10, 2023
d166b5e
Merge pull request #2623 from DSpace/backport-2611-to-dspace-7_x
tdonohue Nov 10, 2023
e545c42
Added skip to main content button
alexandrevryghem Nov 8, 2023
787feae
Merge pull request #2626 from tdonohue/port_2607_to_dspace-7_x
tdonohue Nov 10, 2023
1394461
Limit getMembers() and getSubgroups() to only fetching one object. Th…
tdonohue Sep 20, 2023
d7ccce1
Remove isSubgroupOfGroup() functionality as it loads every subgroup a…
tdonohue Sep 20, 2023
c02cfff
Fix bug where linked Community/Collection info was sometimes listed m…
tdonohue Sep 20, 2023
ac6a7be
Remove "isMemberOfGroup()" from members-list component.
tdonohue Sep 22, 2023
753a31f
Remove unnecessary EpersonDtoModel. Rework code and tests to use EPer…
tdonohue Sep 25, 2023
f0b4239
Also remove unnecessary EpersonDtoModel from extending ReviewersListC…
tdonohue Sep 26, 2023
1f1dc59
Fix subgroups-list specs so they align with new members-list specs
tdonohue Oct 2, 2023
4a1f2a1
Refactor members-list and subgroups-list components to use new isNotM…
tdonohue Oct 13, 2023
8cc36d7
Refactor subgroups-list component's "search()" to act same as member-…
tdonohue Oct 13, 2023
37ae09a
Remove seemingly unnecessary page reload after new search.
tdonohue Oct 13, 2023
d305e60
Address feedback. Run empty search on init. Reorder sections to list …
tdonohue Nov 9, 2023
6975fd1
Merge pull request #2627 from DSpace/backport-2545-to-dspace-7_x
tdonohue Nov 10, 2023
c8d98ec
Bump axios from 0.27.2 to 1.6.0
dependabot[bot] Nov 10, 2023
30ce844
108045: Fix for repeatable date field labels
LotteHofstede Nov 9, 2023
8458d58
Fixed test
LotteHofstede Nov 10, 2023
755e89d
Merge pull request #2628 from DSpace/backport-2625-to-dspace-7_x
tdonohue Nov 10, 2023
7d5c456
Merge pull request #2629 from tdonohue/port_2620_to_dspace-7_x
tdonohue Nov 10, 2023
68cdd12
Fix handle redirect not working with custom nameSpace
alexandrevryghem Nov 11, 2023
116bfbd
adding new access-status-list-element-badge css classes
paulo-graca Oct 26, 2023
ff03243
Create new access-status-badge.component.scss
paulo-graca Nov 10, 2023
a12488c
new accessStatusClass atribute
paulo-graca Nov 10, 2023
59c4d59
remove replaceAll and use an object property
paulo-graca Nov 10, 2023
a276f41
adding ngOnDestroy for dealing with unsubscribe
paulo-graca Nov 10, 2023
64364c9
Merge pull request #2634 from DSpace/backport-2630-to-dspace-7_x
tdonohue Nov 13, 2023
626cc30
Merge pull request #2635 from DSpace/backport-2579-to-dspace-7_x
tdonohue Nov 13, 2023
d3fdfeb
107671: Fix handle theme not working with canonical prefix https://hd…
alexandrevryghem Oct 16, 2023
27f3fc3
107671: Split Theme model & ThemeConfig classes in separate files to …
alexandrevryghem Oct 30, 2023
1222ed4
107671: Fixed bug where config property would still sometimes be unde…
alexandrevryghem Oct 31, 2023
0cd72e4
107671: Fixed theme matching by handle not working in production mode
alexandrevryghem Nov 11, 2023
8f9a358
[DURACOM-202] feature: item edit pages are accessible by administrator
vNovski Nov 10, 2023
a5a59dc
[DURACOM-202] refactor: code
vNovski Nov 10, 2023
94866ca
[DURACOM-202] refactor: code
vNovski Nov 10, 2023
0a3502e
Merge pull request #2636 from DSpace/backport-2562-to-dspace-7_x
tdonohue Nov 13, 2023
dd55459
fix: random order of buttons in status tab
vNovski Oct 31, 2023
651b6a7
refactor: code
vNovski Nov 13, 2023
e293f3d
107685: menu-component re-render section on store update
Atmire-Kristof Oct 25, 2023
c98e8f6
107902: Created test case for 2f26e686cc
alexandrevryghem Nov 8, 2023
959d592
Merge pull request #2637 from DSpace/backport-2632-to-dspace-7_x
tdonohue Nov 13, 2023
8872fd3
Merge pull request #2638 from DSpace/backport-2633-to-dspace-7_x
tdonohue Nov 13, 2023
fdcaeb5
Merge pull request #2639 from tdonohue/port_2610_to_dspace-7_x
tdonohue Nov 13, 2023
d8ed267
Update version tag for release
tdonohue Nov 15, 2023
1371538
Resolved all conflicts
milanmajchrak Jan 15, 2024
bf6efbc
Fixed lint errors
milanmajchrak Jan 16, 2024
d4348b8
Fixed compilation errors which were created by mistakes from upgrade
milanmajchrak Jan 16, 2024
210e60d
Fixed wrong resolved conlicts for test files and copied yarn.lock fro…
milanmajchrak Jan 16, 2024
24b894c
Update charts, toggle dependencies in the package.json
milanmajchrak Jan 19, 2024
2dabb71
updated yarn.lock - from 7.6.1 and run yarn install
milanmajchrak Jan 19, 2024
1d4238b
Revert "updated yarn.lock - from 7.6.1 and run yarn install"
milanmajchrak Jan 19, 2024
2f90198
updated yarn.lock - from 7.6.1 and run yarn install
milanmajchrak Jan 19, 2024
2d533d5
Fixed lint errors
milanmajchrak Jan 19, 2024
9b0149a
Fixed semicolon lint error.
milanmajchrak Jan 19, 2024
24b699a
update clarin item statistics
milanmajchrak Jan 19, 2024
38319ac
After deleting `.browserlistrc` the errors are gone.. that file is to…
milanmajchrak Jan 19, 2024
1fe023c
Fixed clarin-zip-download-page.component.spec.ts tests - if payload w…
milanmajchrak Jan 19, 2024
788a6a9
Fixed section-form.component.spec.ts tests - delay was missing in tes…
milanmajchrak Jan 19, 2024
14ac42a
Checkout vocabulary-treeview.component.html file because it was remov…
milanmajchrak Jan 19, 2024
3498214
Updated router.mock.ts - one method was missing from clarin routerstub
milanmajchrak Jan 19, 2024
4ce2ffa
Fixed log-in-password.component.spec.ts - authService was used in the…
milanmajchrak Jan 22, 2024
99764ce
Removed set timeout in tests `section-form.component.spec.ts`
milanmajchrak Jan 22, 2024
71b0c82
Removed duplicate cypress config file
milanmajchrak Jan 22, 2024
3ca583e
Updated complex input field test
milanmajchrak Jan 22, 2024
7f4fd1e
spy on reinitializeForm method
milanmajchrak Jan 22, 2024
f519a2e
Fixed warn in the `bypassSecurityTrustResourceUrl` when the url conta…
milanmajchrak Jan 22, 2024
dfc2671
Removed `id` - it doesn't help in the failing tests.
milanmajchrak Jan 22, 2024
ffa5ffe
Commented out failing tests.
milanmajchrak Jan 22, 2024
3e48f33
Renamed integration test names following a new cypress version.
milanmajchrak Jan 22, 2024
db61561
WorkspaceitemsEditPage resolver was missing.
milanmajchrak Jan 23, 2024
ec7689c
Removed green line from the navbar.
milanmajchrak Jan 23, 2024
b23b9f6
Fixed crossing home page into nav and footer.
milanmajchrak Jan 23, 2024
9626d71
Fixed home page to the navbar and footer
milanmajchrak Jan 23, 2024
194c288
Added missing messages into en.json
milanmajchrak Jan 23, 2024
769c68a
`my-cs` main content must be used, I updated margin of home page
milanmajchrak Jan 23, 2024
d803760
Updated padding between language flags
milanmajchrak Jan 23, 2024
c2bba47
Show license type in the default grey color in the item view box
milanmajchrak Jan 23, 2024
935851d
Updated license selector padding and colors
milanmajchrak Jan 23, 2024
785ad40
Do not show empty item type box in the item view box
milanmajchrak Jan 23, 2024
3f994f0
The sponsor values are showed in the Item View.
milanmajchrak Jan 24, 2024
459f419
Added unit tests for testing showing of the Acknowledgement
milanmajchrak Jan 26, 2024
b63daf4
Added messages for the acknowledgement component.
milanmajchrak Jan 26, 2024
319a377
Fixed lint errors from the `cs.json5`
milanmajchrak Jan 26, 2024
d4f82da
Added translate module into clarin-sponsor-item-field.component.spec.…
milanmajchrak Jan 27, 2024
d05ac42
Updated IT database dump - a DB was updated by Vanilla
milanmajchrak Jan 29, 2024
dda0913
Fixed `collection-statistics.cy.ts` test, it wanted to see `menu` opt…
milanmajchrak Jan 30, 2024
db22ead
Call index-discovery in the docker-compose-ci.yml instead of `cli.ass…
milanmajchrak Jan 30, 2024
6690f03
Commented out the `login-modal.cy.ts` because the CLARIN-DSpace has d…
milanmajchrak Jan 30, 2024
4f8d859
Commented out the accessibility violations in the `my-dspace.cy.ts`
milanmajchrak Jan 30, 2024
24f7e0e
Fixed calling indexing of the solr
milanmajchrak Jan 30, 2024
8bfef8a
Commented community statistics menu from the `community-statistics.cy…
milanmajchrak Jan 30, 2024
9ffe5aa
Commented out the search navbar tests
milanmajchrak Jan 30, 2024
67d7d6a
Login and language flags was covered by the menu navbar - I updated z…
milanmajchrak Jan 30, 2024
969de2f
Commented out item-page accessibility tests
milanmajchrak Jan 30, 2024
ae56200
Updated submission.cy.ts process - license granting
milanmajchrak Jan 30, 2024
67977e6
Commented out the item statistics menu test
milanmajchrak Jan 30, 2024
a556b67
Commented out the accessibility tests
milanmajchrak Jan 30, 2024
77faabb
Added missing .env properties into `cypress`
milanmajchrak Jan 30, 2024
118de3b
Fixed failing IT
milanmajchrak Jan 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 0 additions & 17 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,17 +0,0 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -15,3 +15,6 @@ trim_trailing_whitespace = false

[*.ts]
quote_type = single

[*.json5]
ij_json_keep_blank_lines_in_code = 3
39 changes: 38 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@
"eslint-plugin-jsdoc",
"eslint-plugin-deprecation",
"unused-imports",
"eslint-plugin-lodash"
"eslint-plugin-lodash",
"eslint-plugin-jsonc"
],
"overrides": [
{
@@ -224,6 +225,42 @@
"@angular-eslint/template/no-negated-async": "off",
"@angular-eslint/template/eqeqeq": "off"
}
},
{
"files": [
"*.json5"
],
"extends": [
"plugin:jsonc/recommended-with-jsonc"
],
"rules": {
"no-irregular-whitespace": "error",
"no-trailing-spaces": "error",
"jsonc/comma-dangle": [
"error",
"always-multiline"
],
"jsonc/indent": [
"error",
2
],
"jsonc/key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}
],
"jsonc/no-dupe-keys": "off",
"jsonc/quotes": [
"error",
"double",
{
"avoidEscape": false
}
]
}
}
]
}
6 changes: 3 additions & 3 deletions .github/disabled-workflows/issue_opened.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow runs whenever a new issue is created
name: Issue opened

on:
on:
issues:
types: [opened]

@@ -16,8 +16,8 @@ jobs:
# Only add to project board if issue is flagged as "needs triage" or has no labels
# NOTE: By default we flag new issues as "needs triage" in our issue template
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
uses: actions/add-to-project@v0.3.0
# Note, the authentication token below is an ORG level Secret.
uses: actions/add-to-project@v0.5.0
# Note, the authentication token below is an ORG level Secret.
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token
# This is necessary because the "DSpace Backlog" project is an org level project (i.e. not repo specific)
26 changes: 0 additions & 26 deletions .github/disabled-workflows/pull_request_opened.yml

This file was deleted.

58 changes: 49 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -25,11 +25,19 @@ jobs:
DSPACE_REST_PORT: 8080
DSPACE_REST_NAMESPACE: '/server'
DSPACE_REST_SSL: false
# Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 18+
DSPACE_UI_HOST: 127.0.0.1
DSPACE_UI_PORT: 4000
# Ensure all SSR caching is disabled in test environment
DSPACE_CACHE_SERVERSIDE_BOTCACHE_MAX: 0
DSPACE_CACHE_SERVERSIDE_ANONYMOUSCACHE_MAX: 0
# Tell Cypress to run e2e tests using the same UI URL
CYPRESS_BASE_URL: http://127.0.0.1:4000
# When Chrome version is specified, we pin to a specific version of Chrome
# Comment this out to use the latest release
#CHROME_VERSION: "90.0.4430.212-1"
# Bump Node heap size (OOM in CI after upgrading to Angular 15)
NODE_OPTIONS: '--max-old-space-size=4096'
strategy:
# Create a matrix of Node versions to test against (in parallel)
matrix:
@@ -67,7 +75,7 @@ jobs:
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
@@ -92,12 +100,16 @@ jobs:
- name: Run specs (unit tests)
run: yarn run test:headless

# Upload code coverage report to artifact (for one version of Node only),
# so that it can be shared with the 'codecov' job (see below)
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
# Upload coverage reports to Codecov (for one version of Node only)
# https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov.io
uses: codecov/codecov-action@v3
if: matrix.node-version == '16.x'
- name: Upload code coverage report to Artifact
uses: actions/upload-artifact@v3
if: matrix.node-version == '18.x'
with:
name: dspace-angular coverage report
path: 'coverage/dspace-angular/lcov.info'
retention-days: 14

# Using docker-compose start backend using CI configuration
# and load assetstore from a cached copy
@@ -111,11 +123,10 @@ jobs:
# https://github.com/cypress-io/github-action
# (NOTE: to run these e2e tests locally, just use 'ng e2e')
- name: Run e2e tests (integration tests)
uses: cypress-io/github-action@v4
uses: cypress-io/github-action@v5
with:
# Run tests in Chrome, headless mode
# Run tests in Chrome, headless mode (default)
browser: chrome
headless: true
# Start app before running tests (will be stopped automatically after tests finish)
start: yarn run serve:ssr
# Wait for backend & frontend to be available
@@ -175,3 +186,32 @@ jobs:

- name: Shutdown Docker containers
run: docker-compose -f ./docker/docker-compose-ci.yml down

# Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
# job above. This is necessary because Codecov uploads seem to randomly fail at times.
# See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
codecov:
# Must run after 'tests' job above
needs: tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

# Download artifacts from previous 'tests' job
- name: Download coverage artifacts
uses: actions/download-artifact@v3

# Now attempt upload to Codecov using its action.
# NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
#
# Retry action: https://github.com/marketplace/actions/retry-action
# Codecov action: https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov.io
uses: Wandalen/[email protected]
with:
action: codecov/codecov-action@v3
# Try upload 5 times max
attempt_limit: 5
# Run again in 30 seconds
attempt_delay: 30000
12 changes: 8 additions & 4 deletions .github/workflows/codescan.yml
Original file line number Diff line number Diff line change
@@ -5,12 +5,16 @@
# because CodeQL requires a fresh build with all tests *disabled*.
name: "Code Scanning"

# Run this code scan for all pushes / PRs to main branch. Also run once a week.
# Run this code scan for all pushes / PRs to main or maintenance branches. Also run once a week.
on:
push:
branches: [ main ]
branches:
- main
- 'dspace-**'
pull_request:
branches: [ main ]
branches:
- main
- 'dspace-**'
# Don't run if PR is only updating static documentation
paths-ignore:
- '**/*.md'
@@ -46,4 +50,4 @@ jobs:

# Perform GitHub Code Scanning.
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v2
70 changes: 60 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@ permissions:

jobs:
docker:
# Ensure this job never runs on forked repos. It's only executed for our repo
if: github.repository == 'dataquest-dev/dspace-angular'
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
if: github.repository == 'dspace/dspace-angular'
runs-on: ubuntu-latest
env:
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
@@ -32,10 +32,6 @@ jobs:
# We turn off 'latest' tag by default.
TAGS_FLAVOR: |
latest=false
# Architectures / Platforms for which we will build Docker images
# If this is a PR, we ONLY build for AMD64. For PRs we only do a sanity check test to ensure Docker builds work.
# If this is NOT a PR (e.g. a tag or merge commit), also build for ARM64.
PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }}
steps:
# https://github.com/actions/checkout
@@ -59,16 +55,13 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

###############################################
# Build/Push the 'dspace/dspace-angular' image
###############################################
# https://github.com/docker/metadata-action
# Get Metadata for docker_build step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular' image
id: meta_build
uses: docker/metadata-action@v4
with:
images: dataquest/dspace-angular
images: dspace/dspace-angular
tags: ${{ env.IMAGE_TAGS }}
flavor: ${{ env.TAGS_FLAVOR }}

@@ -87,6 +80,63 @@ jobs:
tags: ${{ steps.meta_build.outputs.tags }}
labels: ${{ steps.meta_build.outputs.labels }}

#############################################################
# Build/Push the 'dspace/dspace-angular' image ('-dist' tag)
#############################################################
dspace-angular-dist:
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
if: github.repository == 'dspace/dspace-angular'
runs-on: ubuntu-latest

steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v3

# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

# https://github.com/docker/setup-qemu-action
- name: Set up QEMU emulation to build for multiple architectures
uses: docker/setup-qemu-action@v2

# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

# https://github.com/docker/metadata-action
# Get Metadata for docker_build_dist step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular-dist' image
id: meta_build_dist
uses: docker/metadata-action@v4
with:
images: dspace/dspace-angular
tags: ${{ env.IMAGE_TAGS }}
# As this is a "dist" image, its tags are all suffixed with "-dist". Otherwise, it uses the same
# tagging logic as the primary 'dspace/dspace-angular' image above.
flavor: ${{ env.TAGS_FLAVOR }}
suffix=-dist

- name: Build and push 'dspace-angular-dist' image
id: docker_build_dist
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.dist
platforms: ${{ env.PLATFORMS }}
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
# Use tags / labels provided by 'docker/metadata-action' above
tags: ${{ steps.meta_build_dist.outputs.tags }}
labels: ${{ steps.meta_build_dist.outputs.labels }}

deploy:
needs: docker
uses: dataquest-dev/dspace-angular/.github/workflows/deploy.yml@dtq-dev
39 changes: 39 additions & 0 deletions .github/workflows/label_merge_conflicts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow checks open PRs for merge conflicts and labels them when conflicts are found
name: Check for merge conflicts

# Run this for all pushes (i.e. merges) to 'main' or maintenance branches
on:
push:
branches:
- main
- 'dspace-**'
# So that the `conflict_label_name` is removed if conflicts are resolved,
# we allow this to run for `pull_request_target` so that github secrets are available.
pull_request_target:
types: [ synchronize ]

permissions: {}

jobs:
triage:
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
if: github.repository == 'dspace/dspace-angular'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
# See: https://github.com/prince-chrismc/label-merge-conflicts-action
- name: Auto-label PRs with merge conflicts
uses: prince-chrismc/label-merge-conflicts-action@v3
# Ignore any failures -- may occur (randomly?) for older, outdated PRs.
continue-on-error: true
# Add "merge conflict" label if a merge conflict is detected. Remove it when resolved.
# Note, the authentication token is created automatically
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
with:
conflict_label_name: 'merge conflict'
github_token: ${{ secrets.GITHUB_TOKEN }}
conflict_comment: |
Hi @${author},
Conflicts have been detected against the base branch.
Please [resolve these conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts) as soon as you can. Thanks!
46 changes: 46 additions & 0 deletions .github/workflows/port_merged_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will attempt to port a merged pull request to
# the branch specified in a "port to" label (if exists)
name: Port merged Pull Request

# Only run for merged PRs against the "main" or maintenance branches
# We allow this to run for `pull_request_target` so that github secrets are available
# (This is required when the PR comes from a forked repo)
on:
pull_request_target:
types: [ closed ]
branches:
- main
- 'dspace-**'

permissions:
contents: write # so action can add comments
pull-requests: write # so action can create pull requests

jobs:
port_pr:
runs-on: ubuntu-latest
# Don't run on closed *unmerged* pull requests
if: github.event.pull_request.merged
steps:
# Checkout code
- uses: actions/checkout@v3
# Port PR to other branch (ONLY if labeled with "port to")
# See https://github.com/korthout/backport-action
- name: Create backport pull requests
uses: korthout/backport-action@v1
with:
# Trigger based on a "port to [branch]" label on PR
# (This label must specify the branch name to port to)
label_pattern: '^port to ([^ ]+)$'
# Title to add to the (newly created) port PR
pull_title: '[Port ${target_branch}] ${pull_title}'
# Description to add to the (newly created) port PR
pull_description: 'Port of #${pull_number} by @${pull_author} to `${target_branch}`.'
# Copy all labels from original PR to (newly created) port PR
# NOTE: The labels matching 'label_pattern' are automatically excluded
copy_labels_pattern: '.*'
# Skip any merge commits in the ported PR. This means only non-merge commits are cherry-picked to the new PR
merge_commits: 'skip'
# Use a personal access token (PAT) to create PR as 'dspace-bot' user.
# A PAT is required in order for the new PR to trigger its own actions (for CI checks)
github_token: ${{ secrets.PR_PORT_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/pull_request_opened.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This workflow runs whenever a new pull request is created
name: Pull Request opened

# Only run for newly opened PRs against the "main" or maintenance branches
# We allow this to run for `pull_request_target` so that github secrets are available
# (This is required to assign a PR back to the creator when the PR comes from a forked repo)
on:
pull_request_target:
types: [ opened ]
branches:
- main
- 'dspace-**'

permissions:
pull-requests: write

jobs:
automation:
runs-on: ubuntu-latest
steps:
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
# See https://github.com/toshimaru/auto-author-assign
- name: Assign PR to creator
uses: toshimaru/auto-author-assign@v1.6.2
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -38,10 +38,12 @@ package-lock.json
.env
/nbproject/

junit.xml

/src/mirador-viewer/config.local.js

# import data python module
python_data_import/debug.log.txt
python_data_import/logs.txt
python_data_import/date.txt
*/__pycache__/

junit.xml
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -13,13 +13,20 @@ EXPOSE 4000

# We run yarn install with an increased network timeout (5min) to avoid "ESOCKETTIMEDOUT" errors from hub.docker.com
# See, for example https://github.com/yarnpkg/yarn/issues/5540
RUN yarn install --network-timeout 2000000
RUN yarn install --network-timeout 300000

# When running in dev mode, 4GB of memory is required to build & launch the app.
# This default setting can be overridden as needed in your shell, via an env file or in docker-compose.
# See Docker environment var precedence: https://docs.docker.com/compose/environment-variables/envvars-precedence/
ENV NODE_OPTIONS="--max_old_space_size=4096"

# On startup, run in DEVELOPMENT mode (this defaults to live reloading enabled, etc).
# Listen / accept connections from all IP addresses.
# NOTE: At this time it is only possible to run Docker container in Production mode
# if you have a public IP. See https://github.com/DSpace/dspace-angular/issues/1485
# if you have a public URL. See https://github.com/DSpace/dspace-angular/issues/1485
ENV NODE_ENV development
RUN apk add tzdata
RUN yarn build:prod
RUN npm install pm2 -g
CMD /bin/sh -c "pm2-runtime start dspace-ui.json > /dev/null 2> /dev/null"

31 changes: 31 additions & 0 deletions Dockerfile.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This image will be published as dspace/dspace-angular:$DSPACE_VERSION-dist
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details

# Test build:
# docker build -f Dockerfile.dist -t dspace/dspace-angular:dspace-7_x-dist .

FROM node:18-alpine as build

# Ensure Python and other build tools are available
# These are needed to install some node modules, especially on linux/arm64
RUN apk add --update python3 make g++ && rm -rf /var/cache/apk/*

WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --network-timeout 300000

ADD . /app/
RUN yarn build:prod

FROM node:18-alpine
RUN npm install --global pm2

COPY --chown=node:node --from=build /app/dist /app/dist
COPY --chown=node:node config /app/config
COPY --chown=node:node docker/dspace-ui.json /app/dspace-ui.json

WORKDIR /app
USER node
ENV NODE_ENV production
EXPOSE 4000
CMD pm2-runtime start dspace-ui.json --json
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -157,8 +157,8 @@ DSPACE_UI_SSL => DSPACE_SSL

The same settings can also be overwritten by setting system environment variables instead, E.g.:
```bash
export DSPACE_HOST=api7.dspace.org
export DSPACE_UI_PORT=4200
export DSPACE_HOST=demo.dspace.org
export DSPACE_UI_PORT=4000
```

The priority works as follows: **environment variable** overrides **variable in `.env` file** overrides external config set by `DSPACE_APP_CONFIG_PATH` overrides **`config.(prod or dev).yml`**
@@ -288,7 +288,7 @@ E2E tests (aka integration tests) use [Cypress.io](https://www.cypress.io/). Con
The test files can be found in the `./cypress/integration/` folder.

Before you can run e2e tests, two things are REQUIRED:
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo REST API (https://api7.dspace.org/server/), as that server is uncontrolled and may have content added/removed at any time.
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo/sandbox REST API (https://demo.dspace.org/server/ or https://sandbox.dspace.org/server/), as those sites may have content added/removed at any time.
* After starting up your backend on localhost, make sure either your `config.prod.yml` or `config.dev.yml` has its `rest` settings defined to use that localhost backend.
* If you'd prefer, you may instead use environment variables as described at [Configuring](#configuring). For example:
```
@@ -413,8 +413,7 @@ dspace-angular
│ ├── merge-i18n-files.ts *
│ ├── serve.ts *
│ ├── sync-i18n-files.ts *
│ ├── test-rest.ts *
│ └── webpack.js *
│ └── test-rest.ts *
├── src * The source of the application
│ ├── app * The source code of the application, subdivided by module/page.
│ ├── assets * Folder for static resources
16 changes: 13 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
@@ -272,16 +272,26 @@
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
"src/**/*.html",
"src/**/*.json5"
]
}
}
}
}
},
"defaultProject": "dspace-angular",
"cli": {
"analytics": false,
"defaultCollection": "@angular-eslint/schematics"
"schematicCollections": [
"@angular-eslint/schematics"
]
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
47 changes: 32 additions & 15 deletions config/config.example.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ ui:
# 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
rest:
ssl: true
host: api7.dspace.org
host: demo.dspace.org
port: 443
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: /server
@@ -75,7 +75,7 @@ cache:
anonymousCache:
# Maximum number of pages to cache. Default is zero (0) which means anonymous user cache is disabled.
# As all pages are cached in server memory, increasing this value will increase memory needs.
# Individual cached pages are usually small (<100KB), so a value of max=1000 would only require ~100MB of memory.
# Individual cached pages are usually small (<100KB), so a value of max=1000 would only require ~100MB of memory.
max: 0
# Amount of time after which cached pages are considered stale (in ms). After becoming stale, the cached
# copy is automatically refreshed on the next request.
@@ -187,6 +187,9 @@ languages:
- code: gd
label: Gàidhlig
active: true
- code: it
label: Italiano
active: true
- code: lv
label: Latviešu
active: true
@@ -205,6 +208,9 @@ languages:
- code: pt-BR
label: Português do Brasil
active: true
- code: sr-lat
label: Srpski (lat)
active: true
- code: fi
label: Suomi
active: true
@@ -214,6 +220,9 @@ languages:
- code: tr
label: Türkçe
active: true
- code: vi
label: Tiếng Việt
active: true
- code: kk
label: Қазақ
active: true
@@ -226,6 +235,9 @@ languages:
- code: el
label: Ελληνικά
active: true
- code: sr-cyr
label: Српски
active: true
- code: uk
label: Yкраї́нська
active: true
@@ -286,33 +298,33 @@ themes:
#
# # A theme with a handle property will match the community, collection or item with the given
# # handle, and all collections and/or items within it
# - name: 'custom',
# handle: '10673/1233'
# - name: custom
# handle: 10673/1233
#
# # A theme with a regex property will match the route using a regular expression. If it
# # matches the route for a community or collection it will also apply to all collections
# # and/or items within it
# - name: 'custom',
# regex: 'collections\/e8043bc2.*'
# - name: custom
# regex: collections\/e8043bc2.*
#
# # A theme with a uuid property will match the community, collection or item with the given
# # ID, and all collections and/or items within it
# - name: 'custom',
# uuid: '0958c910-2037-42a9-81c7-dca80e3892b4'
# - name: custom
# uuid: 0958c910-2037-42a9-81c7-dca80e3892b4
#
# # The extends property specifies an ancestor theme (by name). Whenever a themed component is not found
# # in the current theme, its ancestor theme(s) will be checked recursively before falling back to default.
# - name: 'custom-A',
# extends: 'custom-B',
# - name: custom-A
# extends: custom-B
# # Any of the matching properties above can be used
# handle: '10673/34'
# handle: 10673/34
#
# - name: 'custom-B',
# extends: 'custom',
# handle: '10673/12'
# - name: custom-B
# extends: custom
# handle: 10673/12
#
# # A theme with only a name will match every route
# name: 'custom'
# name: custom
#
# # This theme will use the default bootstrap styling for DSpace components
# - name: BASE_THEME_NAME
@@ -369,3 +381,8 @@ vocabularies:
- filter: 'subject'
vocabulary: 'srsc'
enabled: true

# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
comcolSelectionSort:
sortField: 'dc.title'
sortDirection: 'ASC'
44 changes: 44 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { defineConfig } from 'cypress';

export default defineConfig({
videosFolder: 'cypress/videos',
screenshotsFolder: 'cypress/screenshots',
fixturesFolder: 'cypress/fixtures',
retries: {
runMode: 2,
openMode: 0,
},
env: {
// Global constants used in DSpace e2e tests (see also ./cypress/support/e2e.ts)
// May be overridden in our cypress.json config file using specified environment variables.
// Default values listed here are all valid for the Demo Entities Data set available at
// https://github.com/DSpace-Labs/AIP-Files/releases/tag/demo-entities-data
// (This is the data set used in our CI environment)

// Admin account used for administrative tests
DSPACE_TEST_ADMIN_USER: 'dspacedemo+admin@gmail.com',
DSPACE_TEST_ADMIN_PASSWORD: 'dspace',
// Community/collection/publication used for view/edit tests
DSPACE_TEST_COMMUNITY: '0958c910-2037-42a9-81c7-dca80e3892b4',
DSPACE_TEST_COLLECTION: '282164f5-d325-4740-8dd1-fa4d6d3e7200',
DSPACE_TEST_ENTITY_PUBLICATION: 'e98b0f27-5c19-49a0-960d-eb6ad5287067',
// Search term (should return results) used in search tests
DSPACE_TEST_SEARCH_TERM: 'test',
// Collection used for submission tests
DSPACE_TEST_SUBMIT_COLLECTION_NAME: 'Sample Collection',
DSPACE_TEST_SUBMIT_COLLECTION_UUID: '9d8334e9-25d3-4a67-9cea-3dffdef80144',
// Account used to test basic submission process
DSPACE_TEST_SUBMIT_USER: 'dspacedemo+submit@gmail.com',
DSPACE_TEST_SUBMIT_USER_PASSWORD: 'dspace',
},
e2e: {
// Setup our plugins for e2e tests
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.ts')(on, config);
},
// This is the base URL that Cypress will run all tests against
// It can be overridden via the CYPRESS_BASE_URL environment variable
// (By default we set this to a value which should work in most development environments)
baseUrl: 'http://localhost:4000',
},
});
34 changes: 0 additions & 34 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -1,34 +0,0 @@
{
"integrationFolder": "cypress/integration",
"supportFile": "cypress/support/index.ts",
"videosFolder": "cypress/videos",
"screenshotsFolder": "cypress/screenshots",
"pluginsFile": "cypress/plugins/index.ts",
"fixturesFolder": "cypress/fixtures",
"baseUrl": "http://127.0.0.1:4000",
"retries": {
"runMode": 2,
"openMode": 0
},
"env": {
"DSPACE_TEST_ADMIN_USER": "dspacedemo+admin@gmail.com",
"DSPACE_TEST_ADMIN_PASSWORD": "dspace",
"DSPACE_TEST_COMMUNITY": "c4c8da3d-8105-49a1-94fa-f89ad3e9a887",
"DSPACE_TEST_COLLECTION": "c6579e21-4d9b-44c7-a557-186c5e3471eb",
"DSPACE_TEST_ENTITY_PUBLICATION": "e98b0f27-5c19-49a0-960d-eb6ad5287067",
"DSPACE_TEST_SEARCH_TERM": "test",
"DSPACE_TEST_SUBMIT_COLLECTION_NAME": "Sample Collection",
"DSPACE_TEST_SUBMIT_COLLECTION_UUID": "9d8334e9-25d3-4a67-9cea-3dffdef80144",
"DSPACE_TEST_SUBMIT_CLARIAH_COLLECTION_UUID": "7eb3562b-27f5-445f-8303-db771969cbff",
"DSPACE_TEST_SUBMIT_USER": "dspacedemo+submit@gmail.com",
"DSPACE_TEST_SUBMIT_USER_PASSWORD": "dspace",
"CLARIN_TEST_WITHDRAWN_ITEM": "7282fc76-0941-4055-a5a3-1f582c638050",
"CLARIN_TEST_WITHDRAWN_ITEM_WITH_REASON": "8ae76fcf-b26b-42f2-84d3-9a85e0517bca",
"CLARIN_TEST_WITHDRAWN_ITEM_WITH_REASON_AND_AUTHORS": "cd368b6a-0019-4813-bad9-5050e50ba36d",
"CLARIN_TEST_WITHDRAWN_REPLACED_ITEM": "566b1b8b-840d-476c-9fb0-b92fb92d4aad",
"CLARIN_TEST_WITHDRAWN_REPLACED_ITEM_WITH_AUTHORS": "600a9e09-dd31-428e-9328-2ed6631aa50a",
"CLARIN_TEST_WITHDRAWN_REASON": "reason",
"CLARIN_TEST_WITHDRAWN_REPLACEMENT": "new URL",
"CLARIN_TEST_WITHDRAWN_AUTHORS": "author1, author2"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { TEST_ENTITY_PUBLICATION } from 'cypress/support';
import { TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Breadcrumbs', () => {
it('should pass accessibility tests', () => {
// Visit an Item, as those have more breadcrumbs
cy.visit('/entities/publication/' + TEST_ENTITY_PUBLICATION);
cy.visit('/entities/publication/'.concat(TEST_ENTITY_PUBLICATION));

// Wait for breadcrumbs to be visible
cy.get('ds-breadcrumbs').should('be.visible');
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { TEST_COLLECTION } from 'cypress/support';
import { TEST_COLLECTION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Collection Page', () => {

it('should pass accessibility tests', () => {
cy.visit('/collections/' + TEST_COLLECTION);
cy.visit('/collections/'.concat(TEST_COLLECTION));

// <ds-collection-page> tag must be loaded
cy.get('ds-collection-page').should('exist');
cy.get('ds-collection-page').should('be.visible');

// TODO accessibility tests are failing because the UI has been changed
// Analyze <ds-collection-page> for accessibility issues
37 changes: 37 additions & 0 deletions cypress/e2e/collection-statistics.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { REGEX_MATCH_NON_EMPTY_TEXT, TEST_COLLECTION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Collection Statistics Page', () => {
const COLLECTIONSTATISTICSPAGE = '/statistics/collections/'.concat(TEST_COLLECTION);

it('should load if you click on "Statistics" from a Collection page', () => {
cy.visit('/collections/'.concat(TEST_COLLECTION));
cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
cy.location('pathname').should('eq', COLLECTIONSTATISTICSPAGE);
});

it('should contain a "Total visits" section', () => {
cy.visit(COLLECTIONSTATISTICSPAGE);
cy.get('table[data-test="TotalVisits"]').should('be.visible');
});

it('should contain a "Total visits per month" section', () => {
cy.visit(COLLECTIONSTATISTICSPAGE);
// Check just for existence because this table is empty in CI environment as it's historical data
cy.get('.'.concat(TEST_COLLECTION).concat('_TotalVisitsPerMonth')).should('exist');
});

it('should pass accessibility tests', () => {
cy.visit(COLLECTIONSTATISTICSPAGE);

// <ds-collection-statistics-page> tag must be loaded
cy.get('ds-collection-statistics-page').should('be.visible');

// Verify / wait until "Total Visits" table's label is non-empty
// (This table loads these labels asynchronously, so we want to wait for them before analyzing page)
cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').contains(REGEX_MATCH_NON_EMPTY_TEXT);

// Analyze <ds-collection-statistics-page> for accessibility issues
testA11y('ds-collection-statistics-page');
});
});
17 changes: 17 additions & 0 deletions cypress/e2e/community-list.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { testA11y } from 'cypress/support/utils';

describe('Community List Page', () => {

it('should pass accessibility tests', () => {
cy.visit('/community-list');

// <ds-community-list-page> tag must be loaded
cy.get('ds-community-list-page').should('be.visible');

// Open every expand button on page, so that we can scan sub-elements as well
cy.get('[data-test="expand-button"]').click({ multiple: true });

// Analyze <ds-community-list-page> for accessibility issues
testA11y('ds-community-list-page');
});
});
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { TEST_COMMUNITY } from 'cypress/support';
import { TEST_COMMUNITY } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Community Page', () => {

it('should pass accessibility tests', () => {
cy.visit('/communities/' + TEST_COMMUNITY);
cy.visit('/communities/'.concat(TEST_COMMUNITY));

// <ds-community-page> tag must be loaded
cy.get('ds-community-page').should('exist');
cy.get('ds-community-page').should('be.visible');

// TODO accessibility tests are failing because the UI has been changed
// Analyze <ds-community-page> for accessibility issues
37 changes: 37 additions & 0 deletions cypress/e2e/community-statistics.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { REGEX_MATCH_NON_EMPTY_TEXT, TEST_COMMUNITY } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Community Statistics Page', () => {
const COMMUNITYSTATISTICSPAGE = '/statistics/communities/'.concat(TEST_COMMUNITY);

it('should load if you click on "Statistics" from a Community page', () => {
cy.visit('/communities/'.concat(TEST_COMMUNITY));
cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
cy.location('pathname').should('eq', COMMUNITYSTATISTICSPAGE);
});

it('should contain a "Total visits" section', () => {
cy.visit(COMMUNITYSTATISTICSPAGE);
cy.get('table[data-test="TotalVisits"]').should('be.visible');
});

it('should contain a "Total visits per month" section', () => {
cy.visit(COMMUNITYSTATISTICSPAGE);
// Check just for existence because this table is empty in CI environment as it's historical data
cy.get('.'.concat(TEST_COMMUNITY).concat('_TotalVisitsPerMonth')).should('exist');
});

it('should pass accessibility tests', () => {
cy.visit(COMMUNITYSTATISTICSPAGE);

// <ds-community-statistics-page> tag must be loaded
cy.get('ds-community-statistics-page').should('be.visible');

// Verify / wait until "Total Visits" table's label is non-empty
// (This table loads these labels asynchronously, so we want to wait for them before analyzing page)
cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').contains(REGEX_MATCH_NON_EMPTY_TEXT);

// Analyze <ds-community-statistics-page> for accessibility issues
testA11y('ds-community-statistics-page');
});
});
File renamed without changes.
Empty file added cypress/e2e/handle-page.ts
Empty file.
File renamed without changes.
31 changes: 31 additions & 0 deletions cypress/e2e/homepage-statistics.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { REGEX_MATCH_NON_EMPTY_TEXT, TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';
import '../support/commands';

describe('Site Statistics Page', () => {
it('should load if you click on "Statistics" from homepage', () => {
cy.visit('/');
cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
cy.location('pathname').should('eq', '/statistics');
});

it('should pass accessibility tests', () => {
// generate 2 view events on an Item's page
cy.generateViewEvent(TEST_ENTITY_PUBLICATION, 'item');
cy.generateViewEvent(TEST_ENTITY_PUBLICATION, 'item');

cy.visit('/statistics');

// <ds-site-statistics-page> tag must be visable
cy.get('ds-site-statistics-page').should('be.visible');

// Verify / wait until "Total Visits" table's *last* label is non-empty
// (This table loads these labels asynchronously, so we want to wait for them before analyzing page)
cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').last().contains(REGEX_MATCH_NON_EMPTY_TEXT);
// Wait an extra 500ms, just so all entries in Total Visits have loaded.
cy.wait(500);

// Analyze <ds-site-statistics-page> for accessibility issues
testA11y('ds-site-statistics-page');
});
});
File renamed without changes.
33 changes: 33 additions & 0 deletions cypress/e2e/item-page.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Item Page', () => {
const ITEMPAGE = '/items/'.concat(TEST_ENTITY_PUBLICATION);
const ENTITYPAGE = '/entities/publication/'.concat(TEST_ENTITY_PUBLICATION);

// Test that entities will redirect to /entities/[type]/[uuid] when accessed via /items/[uuid]
it('should redirect to the entity page when navigating to an item page', () => {
cy.visit(ITEMPAGE);
cy.location('pathname').should('eq', ENTITYPAGE);
});

it('should pass accessibility tests', () => {
cy.visit(ENTITYPAGE);

// <ds-item-page> tag must be loaded
cy.get('ds-item-page').should('be.visible');

// Analyze <ds-item-page> for accessibility issues
testA11y('ds-item-page');
});

it('should pass accessibility tests on full item page', () => {
cy.visit(ENTITYPAGE + '/full');

// <ds-full-item-page> tag must be loaded
cy.get('ds-full-item-page').should('be.visible');

// Analyze <ds-full-item-page> for accessibility issues
testA11y('ds-full-item-page');
});
});
44 changes: 44 additions & 0 deletions cypress/e2e/item-statistics.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { REGEX_MATCH_NON_EMPTY_TEXT, TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Item Statistics Page', () => {
const ITEMSTATISTICSPAGE = '/statistics/items/'.concat(TEST_ENTITY_PUBLICATION);

it('should load if you click on "Statistics" from an Item/Entity page', () => {
cy.visit('/entities/publication/'.concat(TEST_ENTITY_PUBLICATION));
cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
cy.location('pathname').should('eq', ITEMSTATISTICSPAGE);
});

it('should contain element ds-item-statistics-page when navigating to an item statistics page', () => {
cy.visit(ITEMSTATISTICSPAGE);
cy.get('ds-item-statistics-page').should('be.visible');
cy.get('ds-item-page').should('not.exist');
});

it('should contain a "Total visits" section', () => {
cy.visit(ITEMSTATISTICSPAGE);
cy.get('table[data-test="TotalVisits"]').should('be.visible');
});

it('should contain a "Total visits per month" section', () => {
cy.visit(ITEMSTATISTICSPAGE);
// Check just for existence because this table is empty in CI environment as it's historical data
cy.get('.'.concat(TEST_ENTITY_PUBLICATION).concat('_TotalVisitsPerMonth')).should('exist');
});

it('should pass accessibility tests', () => {
cy.visit(ITEMSTATISTICSPAGE);

// <ds-item-statistics-page> tag must be loaded
cy.get('ds-item-statistics-page').should('be.visible');

// Verify / wait until "Total Visits" table's label is non-empty
// (This table loads these labels asynchronously, so we want to wait for them before analyzing page)
cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').contains(REGEX_MATCH_NON_EMPTY_TEXT);

// TODO accessibility tests are failing because the UI has been changed
// Analyze <ds-item-statistics-page> for accessibility issues
// testA11y('ds-item-statistics-page');
});
});
138 changes: 138 additions & 0 deletions cypress/e2e/login-modal.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

const page = {
openLoginMenu() {
// Click the "Log In" dropdown menu in header
cy.get('ds-themed-navbar [data-test="login-menu"]').click();
},
openUserMenu() {
// Once logged in, click the User menu in header
cy.get('ds-themed-navbar [data-test="user-menu"]').click();
},
submitLoginAndPasswordByPressingButton(email, password) {
// Enter email
cy.get('ds-themed-navbar [data-test="email"]').type(email);
// Enter password
cy.get('ds-themed-navbar [data-test="password"]').type(password);
// Click login button
cy.get('ds-themed-navbar [data-test="login-button"]').click();
},
submitLoginAndPasswordByPressingEnter(email, password) {
// In opened Login modal, fill out email & password, then click Enter
cy.get('ds-themed-navbar [data-test="email"]').type(email);
cy.get('ds-themed-navbar [data-test="password"]').type(password);
cy.get('ds-themed-navbar [data-test="password"]').type('{enter}');
},
submitLogoutByPressingButton() {
// This is the POST command that will actually log us out
cy.intercept('POST', '/server/api/authn/logout').as('logout');
// Click logout button
cy.get('ds-themed-navbar [data-test="logout-button"]').click();
// Wait until above POST command responds before continuing
// (This ensures next action waits until logout completes)
cy.wait('@logout');
}
};

describe('Login Modal', () => {
it('should login when clicking button & stay on same page', () => {
const ENTITYPAGE = '/entities/publication/'.concat(TEST_ENTITY_PUBLICATION);
cy.visit(ENTITYPAGE);

// Login menu should exist
cy.get('ds-log-in').should('exist');

// Login, and the <ds-log-in> tag should no longer exist
page.openLoginMenu();
cy.get('.form-login').should('be.visible');

page.submitLoginAndPasswordByPressingButton(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD);
cy.get('ds-log-in').should('not.exist');

// Verify we are still on the same page
cy.url().should('include', ENTITYPAGE);

// Open user menu, verify user menu & logout button now available
page.openUserMenu();
cy.get('ds-user-menu').should('be.visible');
cy.get('ds-log-out').should('be.visible');
});

it('should login when clicking enter key & stay on same page', () => {
cy.visit('/home');

// Open login menu in header & verify <ds-log-in> tag is visible
page.openLoginMenu();
cy.get('.form-login').should('be.visible');

// Login, and the <ds-log-in> tag should no longer exist
page.submitLoginAndPasswordByPressingEnter(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD);
cy.get('.form-login').should('not.exist');

// Verify we are still on homepage
cy.url().should('include', '/home');

// Open user menu, verify user menu & logout button now available
page.openUserMenu();
cy.get('ds-user-menu').should('be.visible');
cy.get('ds-log-out').should('be.visible');
});

it('should support logout', () => {
// First authenticate & access homepage
cy.login(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD);
cy.visit('/');

// Verify ds-log-in tag doesn't exist, but ds-log-out tag does exist
cy.get('ds-log-in').should('not.exist');
cy.get('ds-log-out').should('exist');

// Click logout button
page.openUserMenu();
page.submitLogoutByPressingButton();

// Verify ds-log-in tag now exists
cy.get('ds-log-in').should('exist');
cy.get('ds-log-out').should('not.exist');
});

it('should allow new user registration', () => {
cy.visit('/');

page.openLoginMenu();

// Registration link should be visible
cy.get('ds-themed-navbar [data-test="register"]').should('be.visible');

// Click registration link & you should go to registration page
cy.get('ds-themed-navbar [data-test="register"]').click();
cy.location('pathname').should('eq', '/register');
cy.get('ds-register-email').should('exist');
});

it('should allow forgot password', () => {
cy.visit('/');

page.openLoginMenu();

// Forgot password link should be visible
cy.get('ds-themed-navbar [data-test="forgot"]').should('be.visible');

// Click link & you should go to Forgot Password page
cy.get('ds-themed-navbar [data-test="forgot"]').click();
cy.location('pathname').should('eq', '/forgot');
cy.get('ds-forgot-email').should('exist');
});

it('should pass accessibility tests', () => {
cy.visit('/');

page.openLoginMenu();

cy.get('ds-log-in').should('exist');

// Analyze <ds-log-in> for accessibility issues
testA11y('ds-log-in');
});
});
Empty file added cypress/e2e/login-modal.spec.ts
Empty file.
141 changes: 141 additions & 0 deletions cypress/e2e/my-dspace.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
import { Options } from 'cypress-axe';
import { TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD, TEST_SUBMIT_COLLECTION_NAME } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('My DSpace page', () => {
it('should display recent submissions and pass accessibility tests', () => {
cy.visit('/mydspace');

// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);

cy.get('ds-my-dspace-page').should('be.visible');

// At least one recent submission should be displayed
cy.get('[data-test="list-object"]').should('be.visible');

// Click each filter toggle to open *every* filter
// (As we want to scan filter section for accessibility issues as well)
cy.get('.filter-toggle').click({ multiple: true });

// Analyze <ds-my-dspace-page> for accessibility issues
testA11y('ds-my-dspace-page');
});

it('should have a working detailed view that passes accessibility tests', () => {
cy.visit('/mydspace');

// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);

cy.get('ds-my-dspace-page').should('be.visible');

// Click button in sidebar to display detailed view
cy.get('ds-search-sidebar [data-test="detail-view"]').click();

cy.get('ds-object-detail').should('be.visible');

// Analyze <ds-search-page> for accessibility issues
testA11y('ds-my-dspace-page',
{
rules: {
// Search filters fail these two "moderate" impact rules
'heading-order': { enabled: false },
'landmark-unique': { enabled: false }
}
} as Options
);
});

// NOTE: Deleting existing submissions is exercised by submission.spec.ts
it('should let you start a new submission & edit in-progress submissions', () => {
cy.visit('/mydspace');

// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);

// Open the New Submission dropdown
cy.get('button[data-test="submission-dropdown"]').click();
// Click on the "Item" type in that dropdown
cy.get('#entityControlsDropdownMenu button[title="none"]').click();

// This should display the <ds-create-item-parent-selector> (popup window)
cy.get('ds-create-item-parent-selector').should('be.visible');

// Type in a known Collection name in the search box
cy.get('ds-authorized-collection-selector input[type="search"]').type(TEST_SUBMIT_COLLECTION_NAME);

// Click on the button matching that known Collection name
cy.get('ds-authorized-collection-selector button[title="'.concat(TEST_SUBMIT_COLLECTION_NAME).concat('"]')).click();

// New URL should include /workspaceitems, as we've started a new submission
cy.url().should('include', '/workspaceitems');

// The Submission edit form tag should be visible
cy.get('ds-submission-edit').should('be.visible');

// A Collection menu button should exist & its value should be the selected collection
cy.get('#collectionControlsMenuButton span').should('have.text', TEST_SUBMIT_COLLECTION_NAME);

// Now that we've created a submission, we'll test that we can go back and Edit it.
// Get our Submission URL, to parse out the ID of this new submission
cy.location().then(fullUrl => {
// This will be the full path (/workspaceitems/[id]/edit)
const path = fullUrl.pathname;
// Split on the slashes
const subpaths = path.split('/');
// Part 2 will be the [id] of the submission
const id = subpaths[2];

// Click the "Save for Later" button to save this submission
cy.get('ds-submission-form-footer [data-test="save-for-later"]').click();

// "Save for Later" should send us to MyDSpace
cy.url().should('include', '/mydspace');

// Close any open notifications, to make sure they don't get in the way of next steps
cy.get('[data-dismiss="alert"]').click({multiple: true});

// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// On MyDSpace, find the submission we just created via its ID
cy.get('[data-test="search-box"]').type(id);
cy.get('[data-test="search-button"]').click();

// Wait for search results to come back from the above GET command
cy.wait('@search-results');

// Click the Edit button for this in-progress submission
cy.get('#edit_' + id).click();

// Should send us back to the submission form
cy.url().should('include', '/workspaceitems/' + id + '/edit');

// Discard our new submission by clicking Discard in Submission form & confirming
cy.get('ds-submission-form-footer [data-test="discard"]').click();
cy.get('button#discard_submit').click();

// Discarding should send us back to MyDSpace
cy.url().should('include', '/mydspace');
});
});

it('should let you import from external sources', () => {
cy.visit('/mydspace');

// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);

// Open the New Import dropdown
cy.get('button[data-test="import-dropdown"]').click();
// Click on the "Item" type in that dropdown
cy.get('#importControlsDropdownMenu button[title="none"]').click();

// New URL should include /import-external, as we've moved to the import page
cy.url().should('include', '/import-external');

// The external import searchbox should be visible
cy.get('ds-submission-import-external-searchbar').should('be.visible');
});

});
Empty file added cypress/e2e/my-dspace.spec.ts
Empty file.
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { testA11y } from 'cypress/support/utils';

describe('PageNotFound', () => {
it('should contain element ds-pagenotfound when navigating to page that doesnt exist', () => {
// request an invalid page (UUIDs at root path aren't valid)
cy.visit('/e9019a69-d4f1-4773-b6a3-bd362caa46f2', { failOnStatusCode: false });
cy.get('ds-pagenotfound').should('exist');
cy.get('ds-pagenotfound').should('be.visible');

// Analyze <ds-pagenotfound> for accessibility issues
testA11y('ds-pagenotfound');
});

it('should not contain element ds-pagenotfound when navigating to existing page', () => {
66 changes: 66 additions & 0 deletions cypress/e2e/search-navbar.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { TEST_SEARCH_TERM } from 'cypress/support/e2e';

const page = {
fillOutQueryInNavBar(query) {
// Click the magnifying glass
cy.get('ds-themed-navbar [data-test="header-search-icon"]').click();
// Fill out a query in input that appears
cy.get('ds-themed-navbar [data-test="header-search-box"]').type(query);
},
submitQueryByPressingEnter() {
cy.get('ds-themed-navbar [data-test="header-search-box"]').type('{enter}');
},
submitQueryByPressingIcon() {
cy.get('ds-themed-navbar [data-test="header-search-icon"]').click();
}
};

describe('Search from Navigation Bar', () => {
// NOTE: these tests currently assume this query will return results!
const query = TEST_SEARCH_TERM;

it('should go to search page with correct query if submitted (from home)', () => {
cy.visit('/');
// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// Run the search
page.fillOutQueryInNavBar(query);
page.submitQueryByPressingEnter();
// New URL should include query param
cy.url().should('include', 'query='.concat(query));
// Wait for search results to come back from the above GET command
cy.wait('@search-results');
// At least one search result should be displayed
cy.get('[data-test="list-object"]').should('be.visible');
});

it('should go to search page with correct query if submitted (from search)', () => {
cy.visit('/search');
// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// Run the search
page.fillOutQueryInNavBar(query);
page.submitQueryByPressingEnter();
// New URL should include query param
cy.url().should('include', 'query='.concat(query));
// Wait for search results to come back from the above GET command
cy.wait('@search-results');
// At least one search result should be displayed
cy.get('[data-test="list-object"]').should('be.visible');
});

it('should allow user to also submit query by clicking icon', () => {
cy.visit('/');
// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// Run the search
page.fillOutQueryInNavBar(query);
page.submitQueryByPressingIcon();
// New URL should include query param
cy.url().should('include', 'query='.concat(query));
// Wait for search results to come back from the above GET command
cy.wait('@search-results');
// At least one search result should be displayed
cy.get('[data-test="list-object"]').should('be.visible');
});
});
56 changes: 56 additions & 0 deletions cypress/e2e/search-page.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { Options } from 'cypress-axe';
import { TEST_SEARCH_TERM } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

describe('Search Page', () => {
it('should redirect to the correct url when query was set and submit button was triggered', () => {
const queryString = 'Another interesting query string';
cy.visit('/search');
// Type query in searchbox & click search button
cy.get('[data-test="search-box"]').type(queryString);
cy.get('[data-test="search-button"]').click();
cy.url().should('include', 'query=' + encodeURI(queryString));
});

it('should load results and pass accessibility tests', () => {
cy.visit('/search?query='.concat(TEST_SEARCH_TERM));
cy.get('[data-test="search-box"]').should('have.value', TEST_SEARCH_TERM);

// <ds-search-page> tag must be loaded
cy.get('ds-search-page').should('be.visible');

// At least one search result should be displayed
cy.get('[data-test="list-object"]').should('be.visible');

// Click each filter toggle to open *every* filter
// (As we want to scan filter section for accessibility issues as well)
cy.get('[data-test="filter-toggle"]').click({ multiple: true });

// Analyze <ds-search-page> for accessibility issues
testA11y('ds-search-page');
});

it('should have a working grid view that passes accessibility tests', () => {
cy.visit('/search?query='.concat(TEST_SEARCH_TERM));

// Click button in sidebar to display grid view
cy.get('ds-search-sidebar [data-test="grid-view"]').click();

// <ds-search-page> tag must be loaded
cy.get('ds-search-page').should('be.visible');

// At least one grid object (card) should be displayed
cy.get('[data-test="grid-object"]').should('be.visible');

// Analyze <ds-search-page> for accessibility issues
testA11y('ds-search-page',
{
rules: {
// Search filters fail these two "moderate" impact rules
'heading-order': { enabled: false },
'landmark-unique': { enabled: false }
}
} as Options
);
});
});
Empty file.
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import {
TEST_SUBMIT_USER,
TEST_SUBMIT_USER_PASSWORD,
TEST_SUBMIT_COLLECTION_NAME,
TEST_SUBMIT_COLLECTION_UUID,
TEST_ADMIN_USER, TEST_ADMIN_PASSWORD
}
from 'cypress/support';
import { createItemProcess } from '../support/commands';
import { TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD, TEST_SUBMIT_COLLECTION_NAME, TEST_SUBMIT_COLLECTION_UUID } from 'cypress/support/e2e';

describe('New Submission page', () => {
// NOTE: We already test that new submissions can be started from MyDSpace in my-dspace.spec.ts

it('should create a new submission when using /submit path & pass accessibility', () => {
// Test that calling /submit with collection & entityType will create a new submission
cy.visit('/submit?collection=' + TEST_SUBMIT_COLLECTION_UUID + '&entityType=none');
cy.visit('/submit?collection='.concat(TEST_SUBMIT_COLLECTION_UUID).concat('&entityType=none'));

// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);
@@ -39,12 +31,12 @@ describe('New Submission page', () => {
cy.get('button#discard_submit').click();
});

it('should block submission & show errors if required fields are missing',() => {
it('should block submission & show errors if required fields are missing', () => {
// Create a new submission
cy.visit('/submit?collection='.concat(TEST_SUBMIT_COLLECTION_UUID).concat('&entityType=none'));

// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(TEST_ADMIN_USER, TEST_ADMIN_PASSWORD);
cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);

// Attempt an immediate deposit without filling out any fields
cy.get('button#deposit').click();
@@ -79,34 +71,29 @@ describe('New Submission page', () => {
// "Save for Later" should send us to MyDSpace
cy.url().should('include', '/mydspace');

// CLARIN - When the user is redirected into /mydspace the default search configuration is for
// supervisedItems and the yourSubmission is missing. TODO fix this
// locally this test are passed

// Locally this tests are passed
// // A success alert should be visible
// cy.get('ds-notification div.alert-success').should('be.visible');
// // Now, dismiss any open alert boxes (may be multiple, as tests run quickly)
// cy.get('[data-dismiss="alert"]').click({multiple: true});
//
// // This is the GET command that will actually run the search
// cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// // On MyDSpace, find the submission we just saved via its ID
// cy.get('[data-test="search-box"]').type(id);
// cy.get('[data-test="search-button"]').click();
//
// // Wait for search results to come back from the above GET command
// cy.wait('@search-results');
//
// // Delete our created submission & confirm deletion
// cy.get('button#delete_' + id).click();
// cy.get('button#delete_confirm').click();
// A success alert should be visible
cy.get('ds-notification div.alert-success').should('be.visible');
// Now, dismiss any open alert boxes (may be multiple, as tests run quickly)
cy.get('[data-dismiss="alert"]').click({multiple: true});

// This is the GET command that will actually run the search
cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// On MyDSpace, find the submission we just saved via its ID
cy.get('[data-test="search-box"]').type(id);
cy.get('[data-test="search-button"]').click();

// Wait for search results to come back from the above GET command
cy.wait('@search-results');

// Delete our created submission & confirm deletion
cy.get('button#delete_' + id).click();
cy.get('button#delete_confirm').click();
});
});

it('should allow for deposit if all required fields completed & file uploaded',() => {
it('should allow for deposit if all required fields completed & file uploaded', () => {
// Create a new submission
cy.visit('/submit?collection=' + TEST_SUBMIT_COLLECTION_UUID + '&entityType=none');
cy.visit('/submit?collection='.concat(TEST_SUBMIT_COLLECTION_UUID).concat('&entityType=none'));

// This page is restricted, so we will be shown the login form. Fill it out & submit.
cy.loginViaForm(TEST_SUBMIT_USER, TEST_SUBMIT_USER_PASSWORD);
@@ -117,16 +104,7 @@ describe('New Submission page', () => {

// Confirm the required license by checking checkbox
// (NOTE: requires "force:true" cause Cypress claims this checkbox is covered by its own <span>)
// cy.get('input#granted').check( {force: true} );
// CLARIN
createItemProcess.clickOnDistributionLicenseToggle();
// click on the dropdown button to list options
createItemProcess.clickOnLicenseSelectionButton();
// select `Public Domain Mark (PD)` from the selection
createItemProcess.selectValueFromLicenseSelection(2);
// // selected value should be seen as selected value in the selection
createItemProcess.checkLicenseSelectionValue('GNU General Public License, version 2');
// CLARIN
cy.get('input#granted').check( {force: true} );

// Before using Cypress drag & drop, we have to manually trigger the "dragover" event.
// This ensures our UI displays the dropzone that covers the entire submission page.
@@ -144,19 +122,13 @@ describe('New Submission page', () => {

// Wait for upload to complete before proceeding
cy.wait('@upload');
// Check the upload success notice
cy.get('ds-notification').contains('Upload successful');
// Close the upload success notice
cy.get('[data-dismiss="alert"]').click({multiple: true});

// Commented by CLARIN
// Wait for deposit button to not be disabled & click it.
// cy.get('button#deposit').should('not.be.disabled').click();
//
// // No warnings should exist. Instead, just successful deposit alert is displayed
// cy.get('ds-notification div.alert-warning').should('not.exist');
// cy.get('ds-notification div.alert-success').should('be.visible');
// Commented by CLARIN
cy.get('button#deposit').should('not.be.disabled').click();

// No warnings should exist. Instead, just successful deposit alert is displayed
cy.get('ds-notification div.alert-warning').should('not.exist');
cy.get('ds-notification div.alert-success').should('be.visible');
});

});
Empty file added cypress/e2e/submission.spec.ts
Empty file.
File renamed without changes.
26 changes: 0 additions & 26 deletions cypress/integration/admin-menu.spec.ts

This file was deleted.

34 changes: 0 additions & 34 deletions cypress/integration/collection-statistics.spec.ts
Original file line number Diff line number Diff line change
@@ -1,34 +0,0 @@
import { TEST_COLLECTION } from 'cypress/support';
import { testA11y } from 'cypress/support/utils';

describe('Collection Statistics Page', () => {
const COLLECTIONSTATISTICSPAGE = '/statistics/collections/' + TEST_COLLECTION;

// TODO the statistics option was removed from the navbar - add it there in the future and uncomment this test
// it('should load if you click on "Statistics" from a Collection page', () => {
// cy.visit('/collections/' + TEST_COLLECTION);
// cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
// cy.location('pathname').should('eq', COLLECTIONSTATISTICSPAGE);
// });

it('should contain a "Total visits" section', () => {
cy.visit(COLLECTIONSTATISTICSPAGE);
cy.get('.' + TEST_COLLECTION + '_TotalVisits').should('exist');
});

it('should contain a "Total visits per month" section', () => {
cy.visit(COLLECTIONSTATISTICSPAGE);
cy.get('.' + TEST_COLLECTION + '_TotalVisitsPerMonth').should('exist');
});

it('should pass accessibility tests', () => {
cy.visit(COLLECTIONSTATISTICSPAGE);

// <ds-collection-statistics-page> tag must be loaded
cy.get('ds-collection-statistics-page').should('exist');

// TODO accessibility tests are failing because the UI has been changed
// Analyze <ds-collection-statistics-page> for accessibility issues
// testA11y('ds-collection-statistics-page');
});
});
26 changes: 0 additions & 26 deletions cypress/integration/community-list.spec.ts
Original file line number Diff line number Diff line change
@@ -1,26 +0,0 @@
import { Options } from 'cypress-axe';
import { testA11y } from 'cypress/support/utils';

describe('Community List Page', () => {

// NOTE: This test was commented out because it was failing on github, but locally it works.
// it('should pass accessibility tests', () => {
// cy.visit('/community-list');
//
// // <ds-community-list-page> tag must be loaded
// cy.get('ds-community-list-page').should('exist');
//
// // Open first Community (to show Collections)...that way we scan sub-elements as well
// cy.get('ds-community-list :nth-child(3) > .btn-group > .btn').click();
//
// // Analyze <ds-community-list-page> for accessibility issues
// // Disable heading-order checks until it is fixed
// testA11y('ds-community-list-page',
// {
// rules: {
// 'heading-order': { enabled: false }
// }
// } as Options
// );
// });
});
34 changes: 0 additions & 34 deletions cypress/integration/community-statistics.spec.ts
Original file line number Diff line number Diff line change
@@ -1,34 +0,0 @@
import { TEST_COMMUNITY } from 'cypress/support';
import { testA11y } from 'cypress/support/utils';

describe('Community Statistics Page', () => {
const COMMUNITYSTATISTICSPAGE = '/statistics/communities/' + TEST_COMMUNITY;

// NOTE: Statistics option was removed from the navbar
// it('should load if you click on "Statistics" from a Community page', () => {
// cy.visit('/communities/' + TEST_COMMUNITY);
// cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
// cy.location('pathname').should('eq', COMMUNITYSTATISTICSPAGE);
// });

it('should contain a "Total visits" section', () => {
cy.visit(COMMUNITYSTATISTICSPAGE);
cy.get('.' + TEST_COMMUNITY + '_TotalVisits').should('exist');
});

it('should contain a "Total visits per month" section', () => {
cy.visit(COMMUNITYSTATISTICSPAGE);
cy.get('.' + TEST_COMMUNITY + '_TotalVisitsPerMonth').should('exist');
});

it('should pass accessibility tests', () => {
cy.visit(COMMUNITYSTATISTICSPAGE);

// <ds-community-statistics-page> tag must be loaded
cy.get('ds-community-statistics-page').should('exist');

// TODO accessibility tests are failing because the UI has been changed
// Analyze <ds-community-statistics-page> for accessibility issues
// testA11y('ds-community-statistics-page');
});
});
31 changes: 0 additions & 31 deletions cypress/integration/handle-page.ts

This file was deleted.

21 changes: 0 additions & 21 deletions cypress/integration/homepage-statistics.spec.ts
Original file line number Diff line number Diff line change
@@ -1,21 +0,0 @@
import { testA11y } from 'cypress/support/utils';

describe('Site Statistics Page', () => {
// NOTE: statistics were removed from the navbar
// it('should load if you click on "Statistics" from homepage', () => {
// cy.visit('/');
// cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
// cy.location('pathname').should('eq', '/statistics');
// });

it('should pass accessibility tests', () => {
cy.visit('/statistics');

// <ds-site-statistics-page> tag must be loaded
cy.get('ds-site-statistics-page').should('exist');

// TODO accessibility tests are failing because the UI has been changed
// Analyze <ds-site-statistics-page> for accessibility issues
// testA11y('ds-site-statistics-page');
});
});
32 changes: 0 additions & 32 deletions cypress/integration/item-page.spec.ts
Original file line number Diff line number Diff line change
@@ -1,32 +0,0 @@
import { Options } from 'cypress-axe';
import { TEST_ENTITY_PUBLICATION } from 'cypress/support';
import { testA11y } from 'cypress/support/utils';

describe('Item Page', () => {
const ITEMPAGE = '/items/' + TEST_ENTITY_PUBLICATION;
const ENTITYPAGE = '/entities/publication/' + TEST_ENTITY_PUBLICATION;

// Test that entities will redirect to /entities/[type]/[uuid] when accessed via /items/[uuid]
// it('should redirect to the entity page when navigating to an item page', () => {
// cy.visit(ITEMPAGE);
// cy.location('pathname').should('eq', ENTITYPAGE);
// });

it('should pass accessibility tests', () => {
cy.visit(ENTITYPAGE);

// <ds-item-page> tag must be loaded
cy.get('ds-item-page').should('exist');

// TODO accessibility tests are failing because the UI has been changed
// Analyze <ds-item-page> for accessibility issues
// Disable heading-order checks until it is fixed
// testA11y('ds-item-page',
// {
// rules: {
// 'heading-order': { enabled: false }
// }
// } as Options
// );
});
});
40 changes: 0 additions & 40 deletions cypress/integration/item-statistics.spec.ts

This file was deleted.

127 changes: 0 additions & 127 deletions cypress/integration/login-modal.spec.ts

This file was deleted.

191 changes: 0 additions & 191 deletions cypress/integration/my-dspace.spec.ts

This file was deleted.

67 changes: 0 additions & 67 deletions cypress/integration/search-navbar.spec.ts
Original file line number Diff line number Diff line change
@@ -1,67 +0,0 @@
import { TEST_SEARCH_TERM } from 'cypress/support';

const page = {
fillOutQueryInNavBar(query) {
// Click the magnifying glass
cy.get('ds-themed-navbar [data-test="header-search-icon"]').click();
// Fill out a query in input that appears
cy.get('ds-themed-navbar [data-test="header-search-box"]').type(query);
},
submitQueryByPressingEnter() {
cy.get('ds-themed-navbar [data-test="header-search-box"]').type('{enter}');
},
submitQueryByPressingIcon() {
cy.get('ds-themed-navbar [data-test="header-search-icon"]').click();
}
};

// NOTE: search was removed from the navbar - these tests are not actual
// describe('Search from Navigation Bar', () => {
// // NOTE: these tests currently assume this query will return results!
// const query = TEST_SEARCH_TERM;
//
// it('should go to search page with correct query if submitted (from home)', () => {
// cy.visit('/');
// // This is the GET command that will actually run the search
// cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// // Run the search
// page.fillOutQueryInNavBar(query);
// page.submitQueryByPressingEnter();
// // New URL should include query param
// cy.url().should('include', 'query=' + query);
// // Wait for search results to come back from the above GET command
// cy.wait('@search-results');
// // At least one search result should be displayed
// cy.get('[data-test="list-object"]').should('be.visible');
// });
//
// it('should go to search page with correct query if submitted (from search)', () => {
// cy.visit('/search');
// // This is the GET command that will actually run the search
// cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// // Run the search
// page.fillOutQueryInNavBar(query);
// page.submitQueryByPressingEnter();
// // New URL should include query param
// cy.url().should('include', 'query=' + query);
// // Wait for search results to come back from the above GET command
// cy.wait('@search-results');
// // At least one search result should be displayed
// cy.get('[data-test="list-object"]').should('be.visible');
// });
//
// it('should allow user to also submit query by clicking icon', () => {
// cy.visit('/');
// // This is the GET command that will actually run the search
// cy.intercept('GET', '/server/api/discover/search/objects*').as('search-results');
// // Run the search
// page.fillOutQueryInNavBar(query);
// page.submitQueryByPressingIcon();
// // New URL should include query param
// cy.url().should('include', 'query=' + query);
// // Wait for search results to come back from the above GET command
// cy.wait('@search-results');
// // At least one search result should be displayed
// cy.get('[data-test="list-object"]').should('be.visible');
// });
// });
67 changes: 0 additions & 67 deletions cypress/integration/search-page.spec.ts
Original file line number Diff line number Diff line change
@@ -1,67 +0,0 @@
describe('Search Page', () => {
it('should redirect to the correct url when query was set and submit button was triggered', () => {
const queryString = 'Another interesting query string';
cy.visit('/search');
// Type query in searchbox & click search button
cy.get('[data-test="search-box"]').type(queryString);
cy.get('[data-test="search-button"]').click();
cy.url().should('include', 'query=' + encodeURI(queryString));
});

// // TODO accessibility tests are failing because the UI has been changed
// it('should load results and pass accessibility tests', () => {
// cy.visit('/search?query=' + TEST_SEARCH_TERM);
// cy.get('[data-test="search-box"]').should('have.value', TEST_SEARCH_TERM);
//
// // <ds-search-page> tag must be loaded
// cy.get('ds-search-page').should('exist');
//
// // At least one search result should be displayed
// cy.get('[data-test="list-object"]').should('be.visible');
//
// // Click each filter toggle to open *every* filter
// // (As we want to scan filter section for accessibility issues as well)
// cy.get('[data-test="filter-toggle"]').click({ multiple: true });
//
// // Analyze <ds-search-page> for accessibility issues
// testA11y(
// {
// include: ['ds-search-page'],
// exclude: [
// ['nouislider'] // Date filter slider is missing ARIA labels. Will be fixed by #1175
// ],
// },
// {
// rules: {
// // Search filters fail these two "moderate" impact rules
// 'heading-order': { enabled: false },
// 'landmark-unique': { enabled: false }
// }
// } as Options
// );
// });
//
// it('should have a working grid view that passes accessibility tests', () => {
// cy.visit('/search?query=' + TEST_SEARCH_TERM);
//
// // Click button in sidebar to display grid view
// cy.get('ds-search-sidebar [data-test="grid-view"]').click();
//
// // <ds-search-page> tag must be loaded
// cy.get('ds-search-page').should('exist');
//
// // At least one grid object (card) should be displayed
// cy.get('[data-test="grid-object"]').should('be.visible');
//
// // Analyze <ds-search-page> for accessibility issues
// testA11y('ds-search-page',
// {
// rules: {
// // Search filters fail these two "moderate" impact rules
// 'heading-order': { enabled: false },
// 'landmark-unique': { enabled: false }
// }
// } as Options
// );
// });
});
291 changes: 0 additions & 291 deletions cypress/integration/submission-ui.spec.ts

This file was deleted.

Loading