代码拉取完成,页面将自动刷新
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import { defineConfig } from 'cypress';
import webpackPreprocessor from '@cypress/webpack-preprocessor';
// TODO: import { paste } from 'copy-paste';
module.exports = defineConfig({
experimentalMemoryManagement: true,
numTestsKeptInMemory: 0,
defaultCommandTimeout: 15000,
requestTimeout: 60000,
responseTimeout: 60000,
retries: {
runMode: 2,
openMode: 0,
},
viewportWidth: 1920,
viewportHeight: 1080,
env: {
ENGINE: {
name: 'default',
url: 'http://localhost:9200',
},
SECONDARY_ENGINE: {
name: 'test_cluster',
url: 'http://localhost:9200',
},
S3_ENGINE: {
name: 'BasicS3Connection',
url: process.env.S3_CONNECTION_URL,
username: process.env.S3_CONNECTION_USERNAME,
password: process.env.S3_CONNECTION_PASSWORD,
},
openSearchUrl: 'http://localhost:9200',
SECURITY_ENABLED: false,
AGGREGATION_VIEW: false,
username: 'admin',
password: 'myStrongPassword123!',
ENDPOINT_WITH_PROXY: false,
MANAGED_SERVICE_ENDPOINT: false,
VISBUILDER_ENABLED: true,
DATASOURCE_MANAGEMENT_ENABLED: false,
ML_COMMONS_DASHBOARDS_ENABLED: true,
WAIT_FOR_LOADER_BUFFER_MS: 0,
WAIT_MS: 2000,
DISABLE_LOCAL_CLUSTER: false,
CYPRESS_RUNTIME_ENV: 'osd',
},
e2e: {
baseUrl: 'http://localhost:5601',
specPattern: 'cypress/integration/**/*.spec.{js,jsx,ts,tsx}',
testIsolation: false,
setupNodeEvents,
},
});
function setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
): Cypress.PluginConfigOptions {
const { webpackOptions } = webpackPreprocessor.defaultOptions;
/**
* By default, cypress' internal webpack preprocessor doesn't allow imports without file extensions.
* This makes our life a bit hard since if any file in our testing dependency graph has an import without
* the .js extension our cypress build will fail.
*
* This extra rule relaxes this a bit by allowing imports without file extension
* ex. import module from './module'
*/
webpackOptions!.module!.rules.unshift({
test: /\.m?js/,
resolve: {
enforceExtension: false,
},
});
on(
'file:preprocessor',
webpackPreprocessor({
webpackOptions,
})
);
// TODO: Define the custom task to read clipboard
/* on('task', {
readClipboard() {
return paste(); // Return the clipboard content
},
});*/
return config;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。