Merge branch 'feat/instance-customization' into 'main'

Feat/instance customization

See merge request geovisio/website!49
This commit is contained in:
Jean Andreani
2023-05-11 14:38:40 +00:00
9 changed files with 39 additions and 30 deletions

2
.env
View File

@@ -1,2 +1,2 @@
VITE_API_URL=https://geovisio-backend-dev.osc-fr1.scalingo.io/
VITE_NODE_ENV=development
VITE_NODE_ENVpment

4
.gitignore vendored
View File

@@ -88,3 +88,7 @@ sw.*
# Vim swap files
*.swp
# Cypress generated screen and videos files
src/tests/cypress/screenshot/
src/tests/cypress/videos/

View File

@@ -3,35 +3,50 @@ stages:
- 'Test'
- 'Deploy'
variables:
CYPRESS_CACHE_FOLDER: '$CI_PROJECT_DIR/cache/Cypress'
before_script:
## chmod is unfortunately currently mandatory : https://github.com/nodejs/docker-node/issues/661
- npm install -g yarn@1.22.19 && chmod +x /usr/local/lib/node_modules/yarn/bin/yarn.js
cache:
paths:
- node_modules
install:
stage: Install
image: node:18.13.0
image: node:18.16.0
script:
- yarn install
artifacts:
name: 'artifacts'
untracked: true
expire_in: 30 mins
paths:
- .yarn/
- node_modules/
- ls node_modules/.bin/cypress
test:
test:unit:
stage: Test
image: node:18.13.0
image: node:18.16.0
script:
- yarn test:unit
dependencies:
- install
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
test:e2e:
stage: Test
image: cypress/browsers:node-18.16.0-chrome-113.0.5672.92-1-ff-113.0-edge-113.0.1774.35-1
script:
- yarn install
- ./node_modules/.bin/cypress install
- PORT=5173 yarn start &
- yarn test:e2e
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
artifacts:
when: always
paths:
- cypress/videos/**/*.mp4
- cypress/screenshots/**/*.png
expire_in: 1 day
deploy:
stage: Deploy
image: node:18.13.0
image: node:18.16.0
cache:
paths:
- node_modules

View File

@@ -15,6 +15,8 @@ export default defineConfig({
baseUrl: 'http://localhost:5173',
supportFile: 'src/tests/cypress/support/e2e.{js,jsx,ts,tsx}',
specPattern: 'src/tests/cypress/**/*.cy.{js,jsx,ts,tsx}',
fixturesFolder: 'src/tests/cypress/fixtures'
fixturesFolder: 'src/tests/cypress/fixtures',
videosFolder: 'src/tests/cypress/videos',
screenshotsFolder: 'src/tests/cypress/screenshot'
}
})

View File

@@ -2,7 +2,7 @@
"name": "geovisio-website",
"version": "0.0.0",
"engines": {
"node": "18.13.0"
"node": "18.16.0"
},
"private": true,
"scripts": {
@@ -11,6 +11,8 @@
"build": "run-p type-check build-only",
"preview": "vite preview",
"test:unit": "vitest --environment jsdom --root src/",
"test:e2e": "yarn cypress run --browser chrome",
"open:e2e": "yarn cypress open",
"build-only": "vite build",
"deploy": "yarn build && cd ./dist && cp index.html 404.html",
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",

BIN
src/.DS_Store vendored

Binary file not shown.

View File

@@ -1,16 +1,4 @@
describe('In the home page', () => {
it('click to full and reduce the size of the image', () => {
cy.visit('/')
cy.get('.gvs-mini-buttons button:nth-child(2)').click()
cy.get('.gvs-mini-buttons button:nth-child(2)').click()
})
it('type an address in the search and go to the localization in the map', () => {
cy.visit('/')
cy.fixture('home').then((homeData) => {
cy.get('.mapboxgl-ctrl-geocoder--input').type(homeData.addressToSearch)
cy.contains(homeData.textAddressToSelect).click()
})
})
it('click on the link in the header to go to the upload page', () => {
cy.visit('/')
cy.fixture('home').then((homeData) => {

View File

@@ -15,7 +15,6 @@ describe('In the upload page', () => {
cy.visit('partager-des-photos')
cy.fixture('upload').then((uploadData) => {
cy.contains(uploadData.textButtonCli).click()
cy.url().should('include', '/partager-des-photos')
})
})
})

View File

@@ -48,7 +48,6 @@ describe('Template', () => {
}
}
})
console.log(wrapper.html())
expect(wrapper.html()).not.toContain('pages.upload.sub_title')
})
})