Skip to content

Commit fb7eb19

Browse files
authored
Merge pull request #2404 from FAIRsharing/sustainability_2403
All changes for #2403.
2 parents 9275651 + 91d39ce commit fb7eb19

File tree

6 files changed

+69
-13
lines changed

6 files changed

+69
-13
lines changed

src/data/footerData.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@
112112
"urlType": "internal"
113113
},
114114
{
115-
"title": "Data Preservation Policy",
116-
"url": "/preservation_policy",
115+
"title": "Sustainability and Preservation",
116+
"url": "/sustainability_and_preservation",
117117
"urlType": "internal"
118118
}
119119
]

src/router/index.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {
2929
OntologyBrowser,
3030
Organisation,
3131
OrganisationsList,
32-
PreservationPolicy,
3332
Privacy,
3433
PublicProfile,
3534
Record,
@@ -42,6 +41,7 @@ import {
4241
Signup,
4342
Stakeholders,
4443
Stat,
44+
SustainabilityAndPreservation,
4545
Terms,
4646
Timeline,
4747
User,
@@ -517,9 +517,21 @@ let routes = [
517517
component: Privacy,
518518
},
519519
{
520-
name: "PreservationPolicy",
520+
name: "preservation_policy",
521521
path: "/preservation_policy",
522-
component: PreservationPolicy,
522+
redirect: () => {
523+
window.location.assign(
524+
[
525+
process.env.VUE_APP_API_HOSTNAME,
526+
"/sustainability_and_preservation",
527+
].join("")
528+
);
529+
},
530+
},
531+
{
532+
name: "SustainabilityAndPreservation",
533+
path: "/sustainability_and_preservation",
534+
component: SustainabilityAndPreservation,
523535
},
524536
{
525537
name: "API Documentation",

src/router/routes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ export const OrganisationsList = () =>
126126
import(
127127
/* webpackChunkName: "organisationsList-chunk" */ "@/views/Organisations/OrganisationsList"
128128
);
129-
export const PreservationPolicy = () =>
129+
export const SustainabilityAndPreservation = () =>
130130
import(
131-
/* webpackChunkName: "privacy-chunk" */ "@/views/Static/PreservationPolicy/PreservationPolicy"
131+
/* webpackChunkName: "privacy-chunk" */ "@/views/Static/SustainabilityAndPreservation/SustainabilityAndPreservation.vue"
132132
);
133133
export const AdvancedSearchRecords = () =>
134134
import(

src/views/Static/PreservationPolicy/PreservationPolicy.vue renamed to src/views/Static/SustainabilityAndPreservation/SustainabilityAndPreservation.vue

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
11
<template>
22
<main class="pa-15 mb-10">
33
<!-- main_title -->
4+
<h1 class="text-h4 text-xl-h3 mb-2 mb-xl-6">
5+
FAIRsharing Sustainability
6+
</h1>
7+
8+
<p
9+
:class="['mb-4 lato-font-medium lato-text-sm',{'lato-text-md':$vuetify.breakpoint.xlOnly }]"
10+
>
11+
Since 2011, FAIRsharing is a sustainable service operating with and for the international researcher community
12+
and other stakeholders involved in the research life cycle. The FAIRsharing resource, along its core operational
13+
team, are based at the University of Oxford, UK. As with the vast majority of the community resources,
14+
FAIRsharing is mainly funded by continuous and multiple R&D and infrastructure projects, but it is also supported
15+
by University-enabled access to DOI generation and the member-only ORCID API.
16+
</p>
17+
18+
<p
19+
:class="['mb-4 lato-font-medium lato-text-sm',{'lato-text-md':$vuetify.breakpoint.xlOnly }]"
20+
>
21+
Other key factors contributing to its sustainability are the extensive network of national and international
22+
collaborations and formal endorsements by organizations and research infrastructures in all disciplines,
23+
including RDA, EOSC, and ELIXIR. A key example is the flourishing
24+
<a href="/community_champions">FAIRsharing Community Champions Programme</a>
25+
that roots the growth and relevance of FAIRsharing into communities of practice.
26+
</p>
27+
428
<h1 class="text-h4 text-xl-h3 mb-2 mb-xl-6">
529
FAIRsharing Data Preservation Policy
630
</h1>
@@ -33,9 +57,9 @@
3357
</a>.
3458
</p>
3559

36-
<h2 class="text-h5 text-xl-h4 mb-2 mb-xl-6">
60+
<h1 class="text-h4 text-xl-h3 mb-2 mb-xl-6">
3761
Contact
38-
</h2>
62+
</h1>
3963

4064
<p
4165
:class="['mb-4 lato-font-medium lato-text-sm',{'lato-text-md':$vuetify.breakpoint.xlOnly }]"
@@ -49,7 +73,7 @@
4973
<script>
5074
5175
export default {
52-
name: "PreservationPolicy",
76+
name: "SustainabilityAndPreservation",
5377
data: () => {
5478
return {}
5579
}

tests/unit/router/routes.spec.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,26 @@ describe("Routes", () => {
242242
// eslint-enable no-promise-executor-return
243243
});
244244

245+
it("performs preservation policy redirections correctly", async () => {
246+
let link;
247+
let assignMock = jest.fn();
248+
delete window.location;
249+
window.location = {assign: assignMock};
250+
const redirections = {
251+
preservation_policy: '/sustainability_and_preservation',
252+
}
253+
254+
// eslint-disable no-promise-executor-return
255+
Object.keys(redirections).forEach(async (goto) => {
256+
link = router.options.routes.find((obj) => {
257+
return obj.name === goto;
258+
});
259+
await link.redirect();
260+
expect(window.location.assign).toHaveBeenCalledWith(redirections[goto]);
261+
});
262+
// eslint-enable no-promise-executor-return
263+
});
264+
245265

246266

247267
it("gets sitemap from the api", async () => {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { shallowMount } from "@vue/test-utils";
22
import Vuetify from "vuetify"
33

4-
import PreservationPolicy from "@/views/Static/PreservationPolicy/PreservationPolicy.vue"
4+
import PreservationPolicy from "@/views/Static/SustainabilityAndPreservation/SustainabilityAndPreservation.vue"
55

66
const vuetify = new Vuetify();
77

8-
describe("PreservationPolicy.vue", function(){
8+
describe("SustainabilityAndPreservation.vue", function(){
99
let wrapper;
1010

1111
beforeEach(() => {
@@ -15,7 +15,7 @@ describe("PreservationPolicy.vue", function(){
1515
});
1616

1717
it("can be instantiated", () => {
18-
expect(wrapper.vm.$options.name).toMatch("PreservationPolicy");
18+
expect(wrapper.vm.$options.name).toMatch("SustainabilityAndPreservation");
1919
});
2020

2121
});

0 commit comments

Comments
 (0)