Skip to content

Commit

Permalink
Add Bootstrap support to Vue Component Tests (#654)
Browse files Browse the repository at this point in the history
__Pull Request Description__

Builds on #649.  See that PR for a fuller description.

Closes #649.

---
__Licensing Certification__

FarmData2 is a [Free Cultural
Work](https://freedomdefined.org/Definition) and all accepted
contributions are licensed as described in the LICENSE.md file. This
requires that the contributor holds the rights to do so. By submitting
this pull request __I certify that I satisfy the terms of the [Developer
Certificate of Origin](https://developercertificate.org/)__ for its
contents.

---------

Co-authored-by: futzmonitor <cgonzalez.smdc@gmail.com>
  • Loading branch information
braughtg and FutzMonitor authored Apr 30, 2023
1 parent 5cd18e5 commit e0000e4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ RUN npm install -d \
@cypress/webpack-dev-server@2.5.0 \
@cypress/vue2@1.1.2 \
path@0.12.7 \
axios@0.24.0
axios@0.24.0 \
bootstrap@3.3.7

WORKDIR /home/$USERNAME

# Configure the VNC server so that it allows fd2dev to connect without
Expand Down
2 changes: 1 addition & 1 deletion docker/dev/repo.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dev:fd2.3
dev:fd2.4
10 changes: 5 additions & 5 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ services:
# Necessary to mount /var/run/docker.sock due to
# absolute path syntax on windows.
fd2dev-unix:
image: farmdata2/dev:fd2.3
image: farmdata2/dev:fd2.4
container_name: fd2_dev
init: true
networks:
Expand All @@ -77,7 +77,7 @@ services:
- ../farmdata2/cypress:/home/fd2dev/fd2test/cypress
- ../farmdata2/cypress/cypress.config.js:/home/fd2dev/fd2test/cypress.config.js
- /var/run/docker.sock:/var/run/docker.sock
- farmdev_home_fd2.2:/home/fd2dev # preserve home dir on volume.
- farmdev_home_fd2.4:/home/fd2dev # preserve home dir on volume.
- farmos_db:/home/fd2dev/FarmData2/docker/db # use volume for performance.
- ~/.fd2gids:/home/fd2dev/.fd2/gids # mount GID information.
ports:
Expand All @@ -88,7 +88,7 @@ services:
- linux

fd2dev-win:
image: farmdata2/dev:fd2.3
image: farmdata2/dev:fd2.4
container_name: fd2_dev
init: true
networks:
Expand All @@ -100,7 +100,7 @@ services:
- ../farmdata2/cypress:/home/fd2dev/fd2test/cypress
- ../farmdata2/cypress/cypress.config.js:/home/fd2dev/fd2test/cypress.config.js
- //var/run/docker.sock:/var/run/docker.sock
- farmdev_home_fd2.2:/home/fd2dev # preserve home dir on volume.
- farmdev_home_fd2.4:/home/fd2dev # preserve home dir on volume.
- farmos_db:/home/fd2dev/FarmData2/docker/db # use volume for performance.
- ~/.fd2gids:/home/fd2dev/.fd2/gids # mount GID information.
ports:
Expand All @@ -110,7 +110,7 @@ services:
- windows

volumes:
farmdev_home_fd2.2:
farmdev_home_fd2.4:
farmos_db:

networks:
Expand Down
6 changes: 6 additions & 0 deletions farmdata2/cypress/support/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
// Import commands.js using ES2015 syntax:
import './commands'

// Import specific FD2 style sheet
import '/home/fd2dev/fd2test/farmdata2/farmdata2_modules/resources/fd2.css'

// Import Bootstrap style sheet
import 'bootstrap/dist/css/bootstrap.css'

// Alternatively you can use CommonJS syntax:
// require('./commands')

Expand Down

0 comments on commit e0000e4

Please sign in to comment.