зеркало из https://github.com/nextcloud/viewer.git
fix: Adjust cypress config to work with ESM package
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Родитель
b55b809b3a
Коммит
0998f8e6ee
|
@ -67,17 +67,12 @@ export default defineConfig({
|
|||
|
||||
// Before the browser launches
|
||||
// starting Nextcloud testing container
|
||||
return startNextcloud(process.env.BRANCH)
|
||||
.then((ip) => {
|
||||
// Setting container's IP as base Url
|
||||
config.baseUrl = `http://${ip}/index.php`
|
||||
return ip
|
||||
})
|
||||
.then(waitOnNextcloud)
|
||||
.then(configureNextcloud)
|
||||
.then(() => {
|
||||
return config
|
||||
})
|
||||
const ip = await startNextcloud(process.env.BRANCH)
|
||||
// Setting container's IP as base Url
|
||||
config.baseUrl = `http://${ip}/index.php`
|
||||
await waitOnNextcloud(ip)
|
||||
await configureNextcloud([]) // pass empty array as WE are already the viewer
|
||||
return config
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
'cypress/globals': true,
|
||||
},
|
||||
plugins: [
|
||||
'cypress',
|
||||
],
|
||||
extends: [
|
||||
'plugin:cypress/recommended',
|
||||
],
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"env": {
|
||||
"cypress/globals": true
|
||||
},
|
||||
"plugins": [
|
||||
"cypress"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:cypress/recommended"
|
||||
]
|
||||
}
|
|
@ -31,6 +31,7 @@ Vue.mixin({
|
|||
})
|
||||
|
||||
// Inject proper font for cypress visual regression testing
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
INJECT_CYPRESS_FONT
|
||||
|
||||
Vue.prototype.OC = window.OC
|
||||
|
|
|
@ -26,6 +26,13 @@ import type { BasicFileInfo } from './models'
|
|||
import { encodePath } from '@nextcloud/paths'
|
||||
|
||||
/**
|
||||
* @param root0
|
||||
* @param root0.fileid
|
||||
* @param root0.filename
|
||||
* @param root0.previewUrl
|
||||
* @param root0.hasPreview
|
||||
* @param root0.davPath
|
||||
* @param root0.etag
|
||||
* @return the preview url if the file have an existing preview or the absolute dav remote path if none.
|
||||
*/
|
||||
export function getPreviewIfAny({ fileid, filename, previewUrl, hasPreview, davPath, etag }: BasicFileInfo): string {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.json",
|
||||
"include": ["./src/**/*.ts"],
|
||||
"include": ["./src/**/*.ts", "*.ts"],
|
||||
"compilerOptions": {
|
||||
"types": ["cypress", "cypress-visual-regression", "node", "dockerode", "@nextcloud/typings"],
|
||||
"target": "ESNext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"moduleResolution": "Bundler",
|
||||
// Allow ts to import js files
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
|
@ -14,12 +14,4 @@
|
|||
"resolveJsonModule": true,
|
||||
"strict": true,
|
||||
},
|
||||
"ts-node": {
|
||||
// these options are overrides used only by ts-node
|
||||
// same as our --compilerOptions flag and our TS_NODE_COMPILER_OPTIONS environment variable
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"verbatimModuleSyntax": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче