diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab03cb3885..e13d8f75d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -190,12 +190,84 @@ jobs: # Get homepage and verify that the tag includes "DSpace". # If it does, then SSR is working, as this tag is created by our MetadataService. # This step also prints entire HTML of homepage for easier debugging if grep fails. - - name: Verify SSR (server-side rendering) + - name: Verify SSR (server-side rendering) on Homepage run: | result=$(wget -O- -q http://127.0.0.1:4000/home) echo "$result" echo "$result" | grep -oE "]*>" | grep DSpace + # Get a specific community in our test data and verify that the "

" tag includes "Publications" (the community name). + # If it does, then SSR is working. + - name: Verify SSR on a Community page + run: | + result=$(wget -O- -q http://127.0.0.1:4000/communities/0958c910-2037-42a9-81c7-dca80e3892b4) + echo "$result" + echo "$result" | grep -oE "

]*>[^><]*

" | grep Publications + + # Get a specific collection in our test data and verify that the "

" tag includes "Articles" (the collection name). + # If it does, then SSR is working. + - name: Verify SSR on a Collection page + run: | + result=$(wget -O- -q http://127.0.0.1:4000/collections/282164f5-d325-4740-8dd1-fa4d6d3e7200) + echo "$result" + echo "$result" | grep -oE "

]*>[^><]*

" | grep Articles + + # Get a specific publication in our test data and verify that the tag includes + # the title of this publication. If it does, then SSR is working. + - name: Verify SSR on a Publication page + run: | + result=$(wget -O- -q http://127.0.0.1:4000/entities/publication/6160810f-1e53-40db-81ef-f6621a727398) + echo "$result" + echo "$result" | grep -oE "]*>" | grep "An Economic Model of Mortality Salience" + + # Get a specific person in our test data and verify that the tag includes + # the name of the person. If it does, then SSR is working. + - name: Verify SSR on a Person page + run: | + result=$(wget -O- -q http://127.0.0.1:4000/entities/person/b1b2c768-bda1-448a-a073-fc541e8b24d9) + echo "$result" + echo "$result" | grep -oE "]*>" | grep "Simmons, Cameron" + + # Get a specific project in our test data and verify that the tag includes + # the name of the project. If it does, then SSR is working. + - name: Verify SSR on a Project page + run: | + result=$(wget -O- -q http://127.0.0.1:4000/entities/project/46ccb608-a74c-4bf6-bc7a-e29cc7defea9) + echo "$result" + echo "$result" | grep -oE "]*>" | grep "University Research Fellowship" + + # Get a specific orgunit in our test data and verify that the tag includes + # the name of the orgunit. If it does, then SSR is working. + - name: Verify SSR on an OrgUnit page + run: | + result=$(wget -O- -q http://127.0.0.1:4000/entities/orgunit/9851674d-bd9a-467b-8d84-068deb568ccf) + echo "$result" + echo "$result" | grep -oE "]*>" | grep "Law and Development" + + # Get a specific journal in our test data and verify that the tag includes + # the name of the journal. If it does, then SSR is working. + - name: Verify SSR on a Journal page + run: | + result=$(wget -O- -q http://127.0.0.1:4000/entities/journal/d4af6c3e-53d0-4757-81eb-566f3b45d63a) + echo "$result" + echo "$result" | grep -oE "]*>" | grep "Environmental & Architectural Phenomenology" + + # Get a specific journal volume in our test data and verify that the tag includes + # the name of the volume. If it does, then SSR is working. + - name: Verify SSR on a Journal Volume page + run: | + result=$(wget -O- -q http://127.0.0.1:4000/entities/journalvolume/07c6249f-4bf7-494d-9ce3-6ffdb2aed538) + echo "$result" + echo "$result" | grep -oE "]*>" | grep "Environmental & Architectural Phenomenology Volume 28 (2017)" + + # Get a specific journal issue in our test data and verify that the tag includes + # the name of the issue. If it does, then SSR is working. + - name: Verify SSR on a Journal Issue page + run: | + result=$(wget -O- -q http://127.0.0.1:4000/entities/journalissue/44c29473-5de2-48fa-b005-e5029aa1a50b) + echo "$result" + echo "$result" | grep -oE "]*>" | grep "Environmental & Architectural Phenomenology Vol. 28, No. 1" + - name: Stop running app run: kill -9 $(lsof -t -i:4000)