Commits
Tim Donohue authored and GitHub committed 47302acf66b Merge
110 110 | timeout 30000 |
111 111 | |
112 112 | name Get DSpace REST Backend info/properties |
113 113 | run curl http //localhost 8080/server/api |
114 114 | |
115 115 | name Run e2e tests (integration tests) |
116 116 | run |
117 117 | chromedriver --url-base='/wd/hub' --port=4444 & |
118 118 | yarn run e2e:ci |
119 119 | |
120 + | # Start up the app with SSR enabled (run in background) |
121 + | name Start app in SSR (server-side rendering) mode |
122 + | run |
123 + | nohup yarn run serve:ssr & |
124 + | printf 'Waiting for app to start' |
125 + | until curl --output /dev/null --silent --head --fail http://localhost:4000/home; do |
126 + | printf '.' |
127 + | sleep 2 |
128 + | done |
129 + | echo "App started successfully." |
130 + | |
131 + | # Get homepage and verify that the <meta name="title"> tag includes "DSpace". |
132 + | # If it does, then SSR is working, as this tag is created by our MetadataService. |
133 + | # This step also prints entire HTML of homepage for easier debugging if grep fails. |
134 + | name Verify SSR (server-side rendering) |
135 + | run |
136 + | result=$(wget -O- -q http://localhost:4000/home) |
137 + | echo "$result" |
138 + | echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep DSpace |
139 + | |
140 + | name Stop running app |
141 + | run kill -9 $(lsof -t -i 4000) |
142 + | |
120 143 | name Shutdown Docker containers |
121 144 | run docker-compose -f ./docker/docker-compose-ci.yml down |