@@ -190,12 +190,84 @@ jobs:
190190 # Get homepage and verify that the <meta name="title"> tag includes "DSpace".
191191 # If it does, then SSR is working, as this tag is created by our MetadataService.
192192 # This step also prints entire HTML of homepage for easier debugging if grep fails.
193- - name : Verify SSR (server-side rendering)
193+ - name : Verify SSR (server-side rendering) on Homepage
194194 run : |
195195 result=$(wget -O- -q http://127.0.0.1:4000/home)
196196 echo "$result"
197197 echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep DSpace
198198
199+ # Get a specific community in our test data and verify that the "<h1>" tag includes "Publications" (the community name).
200+ # If it does, then SSR is working.
201+ - name : Verify SSR on a Community page
202+ run : |
203+ result=$(wget -O- -q http://127.0.0.1:4000/communities/0958c910-2037-42a9-81c7-dca80e3892b4)
204+ echo "$result"
205+ echo "$result" | grep -oE "<h1 [^>]*>[^><]*</h1>" | grep Publications
206+
207+ # Get a specific collection in our test data and verify that the "<h1>" tag includes "Articles" (the collection name).
208+ # If it does, then SSR is working.
209+ - name : Verify SSR on a Collection page
210+ run : |
211+ result=$(wget -O- -q http://127.0.0.1:4000/collections/282164f5-d325-4740-8dd1-fa4d6d3e7200)
212+ echo "$result"
213+ echo "$result" | grep -oE "<h1 [^>]*>[^><]*</h1>" | grep Articles
214+
215+ # Get a specific publication in our test data and verify that the <meta name="title"> tag includes
216+ # the title of this publication. If it does, then SSR is working.
217+ - name : Verify SSR on a Publication page
218+ run : |
219+ result=$(wget -O- -q http://127.0.0.1:4000/entities/publication/6160810f-1e53-40db-81ef-f6621a727398)
220+ echo "$result"
221+ echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "An Economic Model of Mortality Salience"
222+
223+ # Get a specific person in our test data and verify that the <meta name="title"> tag includes
224+ # the name of the person. If it does, then SSR is working.
225+ - name : Verify SSR on a Person page
226+ run : |
227+ result=$(wget -O- -q http://127.0.0.1:4000/entities/person/b1b2c768-bda1-448a-a073-fc541e8b24d9)
228+ echo "$result"
229+ echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Simmons, Cameron"
230+
231+ # Get a specific project in our test data and verify that the <meta name="title"> tag includes
232+ # the name of the project. If it does, then SSR is working.
233+ - name : Verify SSR on a Project page
234+ run : |
235+ result=$(wget -O- -q http://127.0.0.1:4000/entities/project/46ccb608-a74c-4bf6-bc7a-e29cc7defea9)
236+ echo "$result"
237+ echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "University Research Fellowship"
238+
239+ # Get a specific orgunit in our test data and verify that the <meta name="title"> tag includes
240+ # the name of the orgunit. If it does, then SSR is working.
241+ - name : Verify SSR on an OrgUnit page
242+ run : |
243+ result=$(wget -O- -q http://127.0.0.1:4000/entities/orgunit/9851674d-bd9a-467b-8d84-068deb568ccf)
244+ echo "$result"
245+ echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Law and Development"
246+
247+ # Get a specific journal in our test data and verify that the <meta name="title"> tag includes
248+ # the name of the journal. If it does, then SSR is working.
249+ - name : Verify SSR on a Journal page
250+ run : |
251+ result=$(wget -O- -q http://127.0.0.1:4000/entities/journal/d4af6c3e-53d0-4757-81eb-566f3b45d63a)
252+ echo "$result"
253+ echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental & Architectural Phenomenology"
254+
255+ # Get a specific journal volume in our test data and verify that the <meta name="title"> tag includes
256+ # the name of the volume. If it does, then SSR is working.
257+ - name : Verify SSR on a Journal Volume page
258+ run : |
259+ result=$(wget -O- -q http://127.0.0.1:4000/entities/journalvolume/07c6249f-4bf7-494d-9ce3-6ffdb2aed538)
260+ echo "$result"
261+ echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental & Architectural Phenomenology Volume 28 (2017)"
262+
263+ # Get a specific journal issue in our test data and verify that the <meta name="title"> tag includes
264+ # the name of the issue. If it does, then SSR is working.
265+ - name : Verify SSR on a Journal Issue page
266+ run : |
267+ result=$(wget -O- -q http://127.0.0.1:4000/entities/journalissue/44c29473-5de2-48fa-b005-e5029aa1a50b)
268+ echo "$result"
269+ echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental & Architectural Phenomenology Vol. 28, No. 1"
270+
199271 - name : Stop running app
200272 run : kill -9 $(lsof -t -i:4000)
201273
0 commit comments