Skip to content

Commit faebbbe

Browse files
authored
Merge pull request #4197 from tdonohue/port_4189_to_7x
[Port dspace-7_x] Add additional automated server-side rendering (SSR) tests for all Entity Types
2 parents eee9897 + c4104be commit faebbbe

File tree

1 file changed

+73
-1
lines changed

1 file changed

+73
-1
lines changed

.github/workflows/build.yml

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

0 commit comments

Comments
 (0)