This repository was archived by the owner on Mar 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +43
-19
lines changed
Expand file tree Collapse file tree 6 files changed +43
-19
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ variables:
1414 AWSAccessKeyId : $AWS_ACCESS_KEY_ID
1515 AWSSecretAccessKey : $AWS_SECRET_ACCESS_KEY
1616
17- Build Documentation :
17+ . Build Documentation :
1818 image : node:latest
1919 stage : documentation
2020 script :
@@ -105,6 +105,25 @@ Build Documentation:
105105 after_script :
106106 - echo "Build backend complete"
107107
108+ # gitlab-runner exec docker "e2e cypress tests without docker-compose"
109+ e2e cypress tests without docker-compose :
110+ stage : integration
111+ image : localhost:5000/backend:latest
112+ services :
113+ - postgres:latest
114+ - redis:latest
115+ before_script :
116+ - /start_asgi.sh &
117+ - sleep 10
118+ script :
119+ - $(npm bin)/cypress run
120+ - exit 0
121+ artifacts :
122+ paths :
123+ - cypress/videos/
124+ - tests/screenshots/
125+ expire_in : 7 days
126+
108127.e2e cypress tests with docker-compose :
109128 stage : integration
110129 image : docker:stable
Original file line number Diff line number Diff line change 1616from django .conf import settings
1717from django .conf .urls .static import static
1818from django .contrib import admin
19- from django .urls import include , path
19+ from django .urls import include , path , re_path
2020
2121from core .views import index_view
2222
3232 urlpatterns = urlpatterns + [
3333 path ('' , index_view , name = 'index' ),
3434 path ('admin/__debug__/' , include (debug_toolbar .urls )),
35+ # catch all rule so that we can navigate to
36+ # routes in vue app other than "/"
37+ re_path (r'^(?!js)(?!css)(?!statics)(?!fonts)(?!service\-worker\.js)(?!manifest\.json)(?!precache).*' , index_view , name = 'index' ) # noqa
3538 ] + static (settings .STATIC_URL , document_root = settings .STATIC_ROOT )
Original file line number Diff line number Diff line change @@ -28,14 +28,22 @@ ADD backend /code/
2828
2929# this stage is used for integration testing
3030FROM production as gitlab-ci
31- # cypress dependencies
32- # RUN apt-get -qq update
33- # RUN apt-get -qq install -y xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
34- # add static files from build
31+ # update and install nodejs
3532COPY --from=build-stage /app/dist/pwa/index.html /code/templates/
36- # COPY --from=build-stage /app/dist/pwa /code/static
3733COPY --from=build-stage /app/dist/pwa /static
38- # index.html is listed here
39- RUN ls /code/templates/ -al
40- # also tried this, but still nothing in the templates directory when the container is started
41- RUN cp /static/index.html /code/templates/index.html
34+
35+ COPY cypress.json /code
36+
37+ RUN mkdir /code/cypress
38+ COPY cypress/ /code/cypress/
39+
40+ RUN apt-get -qq update && apt-get -y install nodejs npm
41+ RUN node -v
42+
43+ # npm installs automatically
44+ RUN npm -v
45+ # cypress dependencies
46+ RUN apt-get -qq install -y xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
47+
48+ RUN npm install cypress
49+
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ services:
3030 context : ../
3131 dockerfile : backend/scripts/prod/Dockerfile
3232 ports :
33- - " 8000:8000"
3433 - " 9000:9000"
3534 command : /start_asgi.sh
3635 volumes :
@@ -52,11 +51,6 @@ services:
5251 - GITHUB_SECRET=${GITHUB_SECRET}
5352 - GOOGLE_OAUTH2_KEY=${GOOGLE_OAUTH2_KEY}
5453 - GOOGLE_OAUTH2_SECRET=${GOOGLE_OAUTH2_SECRET}
55-
56- # # for Quasar
57- # - HTTP_PROTOCOL=http
58- # - WS_PROTOCOL=ws
59- # - DOMAIN_NAME=${DOMAIN_NAME}
6054 depends_on :
6155 - postgres
6256 - redis
Original file line number Diff line number Diff line change 11{
2- "baseUrl" : " http://0.0.0.0 "
2+ "baseUrl" : " http://localhost:9000 "
33}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ describe('Test Login', function() {
77 cy . get ( "#password" ) . clear ( ) ;
88 cy . get ( "#password" ) . type ( "password" ) ;
99 cy . get ( "#login-btn" ) . click ( ) ;
10- cy . wait ( 1000 ) ; // wait for 1 second
10+ // cy.wait(1000); // wait for 1 second
1111 cy . getCookie ( 'user-token' ) . should ( 'exist' ) ;
1212 } ) ;
1313} ) ;
You can’t perform that action at this time.
0 commit comments