forked from solidcouch/solidcouch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.ts
40 lines (38 loc) · 1.2 KB
/
cypress.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from 'cypress'
import vitePreprocessor from 'cypress-vite'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const viteConfigPath = path.resolve(
path.dirname(fileURLToPath(import.meta.url)),
'./vite.cypress.config.ts',
)
// eslint-disable-next-line import/no-default-export
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:4173',
defaultCommandTimeout: 15000,
// set mobile viewport as default, because we make mobile-first interface
// this is screen size of iPhone 11, apparently a popular phone
viewportWidth: 375,
viewportHeight: 812,
setupNodeEvents(on) {
on('task', {
log(message) {
// eslint-disable-next-line no-console
console.log(message)
return null
},
})
on('file:preprocessor', vitePreprocessor(viteConfigPath))
},
},
env: {
CSS_URL: 'http://localhost:4000',
COMMUNITY: 'http://localhost:4000/test-community/community#us',
OTHER_COMMUNITY: 'http://localhost:4000/other-community/community#us',
EMAIL_NOTIFICATIONS_IDENTITY:
'http://localhost:4000/mailbot/profile/card#me',
},
screenshotOnRunFailure: false,
video: false,
})