Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

update vite to work with cypress #177

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions applications/client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default defineConfig(() => ({
},
server: {
port: 3500,
host: true,
hmr: {
overlay: false,
},
Expand Down
5 changes: 3 additions & 2 deletions applications/redeye-e2e/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const tasks = require('./src/support/tasks');
const path = require('path');

module.exports = defineConfig({
chromeWebSecurity: false,
fixturesFolder: path.join(__dirname, 'src', 'fixtures'),
modifyObstructiveCode: false,
videoUploadOnPasses: false,
experimentalModifyObstructiveThirdPartyCode: true,
videosFolder: path.join(__dirname, '../../dist/applications/redeye-e2e/videos'),
screenshotsFolder: path.join(__dirname, '../../dist/applications/redeye-e2e/screenshots'),
failOnStatusCode: false,
Expand All @@ -27,5 +27,6 @@ module.exports = defineConfig({
excludeSpecPattern: '*.skip.js',
defaultCommandTimeout: 15000,
trashAssetsBeforeRuns: true,
baseUrl: 'http://localhost:3500',
},
});
4 changes: 3 additions & 1 deletion applications/redeye-e2e/src/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable cypress/unsafe-to-chain-command */
/* eslint-disable cypress/no-unnecessary-waiting */
/// <reference types="cypress" />
import 'cypress-real-events';
Expand All @@ -21,14 +22,15 @@ Cypress.Commands.add('loginAPI', (user = 'cypress') => {
cy.session(
user,
() => {
window.localStorage.setItem('user', 'cypress');
cy.request({
url: 'http://localhost:4000/api/login',
method: 'POST',
headers: {
'content-type': 'multipart/form-data',
},
body: formData,
}).then(() => {
window.localStorage.setItem('user', 'cypress');
});
},
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"builder-util": "^23.0.2",
"concurrently": "^8.0.1",
"cross-env": "^7.0.3",
"cypress": "12.17.3",
"cypress": "^13.0.0",
"cypress-map": "^1.19.1",
"cypress-multi-reporters": "^1.6.1",
"cypress-real-events": "^1.7.6",
Expand Down
75 changes: 58 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1267,9 +1267,9 @@ __metadata:
languageName: node
linkType: hard

"@cypress/request@npm:^2.88.11":
version: 2.88.11
resolution: "@cypress/request@npm:2.88.11"
"@cypress/request@npm:^3.0.0":
version: 3.0.0
resolution: "@cypress/request@npm:3.0.0"
dependencies:
aws-sign2: ~0.7.0
aws4: ^1.8.0
Expand All @@ -1286,10 +1286,10 @@ __metadata:
performance-now: ^2.1.0
qs: ~6.10.3
safe-buffer: ^5.1.2
tough-cookie: ~2.5.0
tough-cookie: ^4.1.3
tunnel-agent: ^0.6.0
uuid: ^8.3.2
checksum: e4b3f62e0c41c4ccca6c942828461d8ea717e752fd918d685e9f74e2ebcfa8b7942427f7ce971e502635c3bf3d40011476db84dc753d3dc360c6d08350da6f93
checksum: 8ec81075b800b84df8a616dce820a194d562a35df251da234f849344022979f3675baa0b82988843f979a488e39bc1eec6204cfe660c75ace9bf4d2951edec43
languageName: node
linkType: hard

Expand Down Expand Up @@ -6638,11 +6638,11 @@ __metadata:
languageName: node
linkType: hard

"cypress@npm:12.17.3":
version: 12.17.3
resolution: "cypress@npm:12.17.3"
"cypress@npm:^13.0.0":
version: 13.0.0
resolution: "cypress@npm:13.0.0"
dependencies:
"@cypress/request": ^2.88.11
"@cypress/request": ^3.0.0
"@cypress/xvfb": ^1.2.4
"@types/node": ^16.18.39
"@types/sinonjs__fake-timers": 8.1.1
Expand Down Expand Up @@ -6677,6 +6677,7 @@ __metadata:
minimist: ^1.2.8
ospath: ^1.2.2
pretty-bytes: ^5.6.0
process: ^0.11.10
proxy-from-env: 1.0.0
request-progress: ^3.0.0
semver: ^7.5.3
Expand All @@ -6686,7 +6687,7 @@ __metadata:
yauzl: ^2.10.0
bin:
cypress: bin/cypress
checksum: 1da3922cac45c35ee282116fe2af2278e92cc08bd2d8586e0f2346cbe5c9f62129cec567bc9274c585e8c2e887341fa4e5c8623cfaa41dba87331cfb5a023721
checksum: 223dddfd85dbde5e3a915e87b6cb176b99a9e5bcc24baa40cd5b9ca4a93315a95cf53c5c6ac3a6984f59be55ffc8b58b93a713c0ddcb63a5f4996229cce70329
languageName: node
linkType: hard

Expand Down Expand Up @@ -14271,6 +14272,13 @@ __metadata:
languageName: node
linkType: hard

"process@npm:^0.11.10":
version: 0.11.10
resolution: "process@npm:0.11.10"
checksum: bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3
languageName: node
linkType: hard

"progress@npm:^2.0.3":
version: 2.0.3
resolution: "progress@npm:2.0.3"
Expand Down Expand Up @@ -14365,7 +14373,7 @@ __metadata:
languageName: node
linkType: hard

"psl@npm:^1.1.28":
"psl@npm:^1.1.33":
version: 1.9.0
resolution: "psl@npm:1.9.0"
checksum: 20c4277f640c93d393130673f392618e9a8044c6c7bf61c53917a0fddb4952790f5f362c6c730a9c32b124813e173733f9895add8d26f566ed0ea0654b2e711d
Expand Down Expand Up @@ -14428,6 +14436,13 @@ __metadata:
languageName: node
linkType: hard

"querystringify@npm:^2.1.1":
version: 2.2.0
resolution: "querystringify@npm:2.2.0"
checksum: 5641ea231bad7ef6d64d9998faca95611ed4b11c2591a8cae741e178a974f6a8e0ebde008475259abe1621cb15e692404e6b6626e927f7b849d5c09392604b15
languageName: node
linkType: hard

"queue-microtask@npm:^1.2.2":
version: 1.2.3
resolution: "queue-microtask@npm:1.2.3"
Expand Down Expand Up @@ -14864,7 +14879,7 @@ __metadata:
cors: ^2.8.5
cross-env: ^7.0.3
crypto-js: ^4.0.0
cypress: 12.17.3
cypress: ^13.0.0
cypress-map: ^1.19.1
cypress-multi-reporters: ^1.6.1
cypress-real-events: ^1.7.6
Expand Down Expand Up @@ -15125,6 +15140,13 @@ __metadata:
languageName: node
linkType: hard

"requires-port@npm:^1.0.0":
version: 1.0.0
resolution: "requires-port@npm:1.0.0"
checksum: eee0e303adffb69be55d1a214e415cf42b7441ae858c76dfc5353148644f6fd6e698926fc4643f510d5c126d12a705e7c8ed7e38061113bdf37547ab356797ff
languageName: node
linkType: hard

"resize-observer-polyfill@npm:^1.5.1":
version: 1.5.1
resolution: "resize-observer-polyfill@npm:1.5.1"
Expand Down Expand Up @@ -16772,13 +16794,15 @@ __metadata:
languageName: node
linkType: hard

"tough-cookie@npm:~2.5.0":
version: 2.5.0
resolution: "tough-cookie@npm:2.5.0"
"tough-cookie@npm:^4.1.3":
version: 4.1.3
resolution: "tough-cookie@npm:4.1.3"
dependencies:
psl: ^1.1.28
psl: ^1.1.33
punycode: ^2.1.1
checksum: 16a8cd090224dd176eee23837cbe7573ca0fa297d7e468ab5e1c02d49a4e9a97bb05fef11320605eac516f91d54c57838a25864e8680e27b069a5231d8264977
universalify: ^0.2.0
url-parse: ^1.5.3
checksum: c9226afff36492a52118432611af083d1d8493a53ff41ec4ea48e5b583aec744b989e4280bcf476c910ec1525a89a4a0f1cae81c08b18fb2ec3a9b3a72b91dcc
languageName: node
linkType: hard

Expand Down Expand Up @@ -17482,6 +17506,13 @@ __metadata:
languageName: node
linkType: hard

"universalify@npm:^0.2.0":
version: 0.2.0
resolution: "universalify@npm:0.2.0"
checksum: e86134cb12919d177c2353196a4cc09981524ee87abf621f7bc8d249dbbbebaec5e7d1314b96061497981350df786e4c5128dbf442eba104d6e765bc260678b5
languageName: node
linkType: hard

"universalify@npm:^2.0.0":
version: 2.0.0
resolution: "universalify@npm:2.0.0"
Expand Down Expand Up @@ -17551,6 +17582,16 @@ __metadata:
languageName: node
linkType: hard

"url-parse@npm:^1.5.3":
version: 1.5.10
resolution: "url-parse@npm:1.5.10"
dependencies:
querystringify: ^2.1.1
requires-port: ^1.0.0
checksum: fbdba6b1d83336aca2216bbdc38ba658d9cfb8fc7f665eb8b17852de638ff7d1a162c198a8e4ed66001ddbf6c9888d41e4798912c62b4fd777a31657989f7bdf
languageName: node
linkType: hard

"use-sync-external-store@npm:^1.2.0":
version: 1.2.0
resolution: "use-sync-external-store@npm:1.2.0"
Expand Down