Skip to content

Commit

Permalink
CONSOLE-3806: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rhamilto committed Oct 27, 2023
1 parent 3ad7fac commit d33e78b
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 65 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { defineConfig } = require('cypress')
const { defineConfig } = require('cypress');

module.exports = defineConfig({
defaultCommandTimeout: 40000,
Expand All @@ -17,7 +17,8 @@ module.exports = defineConfig({
screenshotsFolder: '../../../gui_test_screenshots/cypress/screenshots',
videosFolder: '../../../gui_test_screenshots/cypress/videos',
env: {
TAGS: '(@pre-condition or @smoke or @regression) and not (@manual or @to-do or @un-verified or @broken-test)',
TAGS:
'(@pre-condition or @smoke or @regression) and not (@manual or @to-do or @un-verified or @broken-test)',
NAMESPACE: 'aut-pipelines',
},
chromeWebSecurity: false,
Expand All @@ -29,11 +30,12 @@ module.exports = defineConfig({
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./plugins/index.js')(on, config)
// eslint-disable-next-line global-require
return require('./plugins/index.js')(on, config);
},
specPattern: 'features/**/*.{feature,features}',
supportFile: 'support/commands/index.ts',
baseUrl: 'http://localhost:9000',
testIsolation: false,
},
})
});
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/* eslint-disable global-require */
/* eslint-disable import/no-dynamic-require */
const fs = require('fs');
const path = require('path');
const webpack = require('@cypress/webpack-preprocessor');
const deepmerge = require('deepmerge');

module.exports = (on, config) => {
const options = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { checkErrors } from '@console/cypress-integration-tests/support';
import { guidedTour } from '@console/cypress-integration-tests/views/guided-tour';

before(() => {
Expand Down
30 changes: 13 additions & 17 deletions frontend/packages/gitops-plugin/integration-tests/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { defineConfig } = require("cypress");
const { defineConfig } = require('cypress');

module.exports = defineConfig({
projectId: "j4jxoy",
projectId: 'j4jxoy',
viewportWidth: 1920,
viewportHeight: 1080,
defaultCommandTimeout: 40000,
Expand All @@ -10,26 +10,25 @@ module.exports = defineConfig({
requestTimeout: 15000,
responseTimeout: 15000,
animationDistanceThreshold: 20,
screenshotsFolder: "../../../gui_test_screenshots/cypress/screenshots",
videosFolder: "../../../gui_test_screenshots/cypress/videos",
screenshotsFolder: '../../../gui_test_screenshots/cypress/screenshots',
videosFolder: '../../../gui_test_screenshots/cypress/videos',
video: true,
reporter: "../../node_modules/cypress-multi-reporters",
reporter: '../../node_modules/cypress-multi-reporters',

reporterOptions: {
configFile: "reporter-config.json",
configFile: 'reporter-config.json',
},

fixturesFolder: "testData",
defaultCommandTimeout: 40000,
fixturesFolder: 'testData',

retries: {
runMode: 1,
openMode: 0,
},

env: {
TAGS: "@gitOps and @smoke and not (@manual or @to-do or @un-verified)",
NAMESPACE: "aut-gitops",
TAGS: '@gitOps and @smoke and not (@manual or @to-do or @un-verified)',
NAMESPACE: 'aut-gitops',
},

e2e: {
Expand All @@ -38,14 +37,11 @@ module.exports = defineConfig({
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// eslint-disable-next-line global-require
return require("../../dev-console/integration-tests/plugins/index.js")(
on,
config
);
return require('../../dev-console/integration-tests/plugins/index.js')(on, config);
},
specPattern: "**/*.{feature,features}",
supportFile: "support/commands/index.ts",
baseUrl: "http://localhost:9000",
specPattern: '**/*.{feature,features}',
supportFile: 'support/commands/index.ts',
baseUrl: 'http://localhost:9000',
testIsolation: false,
},
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { defineConfig } = require('cypress')
const { defineConfig } = require('cypress');

module.exports = defineConfig({
defaultCommandTimeout: 40000,
Expand All @@ -17,7 +17,8 @@ module.exports = defineConfig({
screenshotsFolder: '../../../gui_test_screenshots/cypress/screenshots',
videosFolder: '../../../gui_test_screenshots/cypress/videos',
env: {
TAGS: '@helm and (@pre-condition or @smoke or @regression) and not (@manual or @to-do or @broken-test)',
TAGS:
'@helm and (@pre-condition or @smoke or @regression) and not (@manual or @to-do or @broken-test)',
NAMESPACE: 'aut-helm',
},
retries: {
Expand All @@ -28,14 +29,12 @@ module.exports = defineConfig({
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./../../dev-console/integration-tests/plugins/index.js')(
on,
config
)
// eslint-disable-next-line global-require
return require('./../../dev-console/integration-tests/plugins/index.js')(on, config);
},
specPattern: 'features/**/*.{feature,features}',
supportFile: 'support/commands/index.ts',
baseUrl: 'http://localhost:9000',
testIsolation: false,
},
})
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
pageTitle,
helmActions,
} from '@console/dev-console/integration-tests/support/constants';
import { helmPO, topologyPO } from '@console/dev-console/integration-tests/support/pageObjects';
import { helmPO } from '@console/dev-console/integration-tests/support/pageObjects';
import {
topologyPage,
topologySidePane,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { defineConfig } = require('cypress')
const { defineConfig } = require('cypress');

module.exports = defineConfig({
defaultCommandTimeout: 40000,
Expand All @@ -17,7 +17,8 @@ module.exports = defineConfig({
screenshotsFolder: '../../../gui_test_screenshots/cypress/screenshots',
videosFolder: '../../../gui_test_screenshots/cypress/videos',
env: {
TAGS: '(@knative or @knative-admin or @knative-camelk or @knative-eventing or @knative-kafka or @knative-serverless) and (@pre-condition or @smoke or @regression) and not (@manual or @to-do or @un-verified or @broken-test)',
TAGS:
'(@knative or @knative-admin or @knative-camelk or @knative-eventing or @knative-kafka or @knative-serverless) and (@pre-condition or @smoke or @regression) and not (@manual or @to-do or @un-verified or @broken-test)',
NAMESPACE: 'aut-knative',
},
retries: {
Expand All @@ -28,14 +29,12 @@ module.exports = defineConfig({
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./../../dev-console/integration-tests/plugins/index.js')(
on,
config
)
// eslint-disable-next-line global-require
return require('./../../dev-console/integration-tests/plugins/index.js')(on, config);
},
specPattern: 'features/**/*.{feature,features}',
supportFile: 'support/commands/index.ts',
baseUrl: 'http://localhost:9000',
testIsolation: false,
},
})
});
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import { checkErrors } from '@console/cypress-integration-tests/support';
import {
devNavigationMenu,
switchPerspective,
} from '@console/dev-console/integration-tests/support/constants/global';
import {
verifyAndInstallKnativeOperator,
navigateTo,
perspective,
} from '@console/dev-console/integration-tests/support/pages';
import { verifyAndInstallKnativeOperator } from '@console/dev-console/integration-tests/support/pages';

before(() => {
cy.login();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = defineConfig({
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
// eslint-disable-next-line global-require
return require('./../../dev-console/integration-tests/plugins/index.js')(on, config);
},
specPattern: 'features/**/*.{feature,features}',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { defineConfig } = require('cypress')
const { defineConfig } = require('cypress');

module.exports = defineConfig({
defaultCommandTimeout: 40000,
Expand Down Expand Up @@ -28,14 +28,12 @@ module.exports = defineConfig({
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./../../dev-console/integration-tests/plugins/index.js')(
on,
config
)
// eslint-disable-next-line global-require
return require('./../../dev-console/integration-tests/plugins/index.js')(on, config);
},
specPattern: 'features/**/*.{feature,features}',
supportFile: 'support/commands/index.ts',
baseUrl: 'http://localhost:9000',
testIsolation: false,
},
})
});
10 changes: 6 additions & 4 deletions frontend/packages/topology/integration-tests/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { defineConfig } = require('cypress')
const { defineConfig } = require('cypress');

module.exports = defineConfig({
defaultCommandTimeout: 40000,
Expand All @@ -21,7 +21,8 @@ module.exports = defineConfig({
screenshotsFolder: '../../../gui_test_screenshots/cypress/screenshots',
videosFolder: '../../../gui_test_screenshots/cypress/videos',
env: {
TAGS: '@topology and (@smoke or @regression or @pre-condition) and not (@manual or @to-do or @un-verified or @broken-test)',
TAGS:
'@topology and (@smoke or @regression or @pre-condition) and not (@manual or @to-do or @un-verified or @broken-test)',
NAMESPACE: 'aut-topology-ci',
},
retries: {
Expand All @@ -32,11 +33,12 @@ module.exports = defineConfig({
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./plugins/index.js')(on, config)
// eslint-disable-next-line global-require
return require('./plugins/index.js')(on, config);
},
specPattern: 'features/**/*.{feature,features}',
supportFile: 'support/commands/index.ts',
baseUrl: 'http://localhost:9000',
testIsolation: false,
},
})
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { defineConfig } = require('cypress')
const { defineConfig } = require('cypress');

module.exports = defineConfig({
defaultCommandTimeout: 40000,
Expand All @@ -17,7 +17,8 @@ module.exports = defineConfig({
screenshotsFolder: '../../../gui_test_screenshots/cypress/screenshots',
videosFolder: '../../../gui_test_screenshots/cypress/videos',
env: {
TAGS: '(@web-terminal or @customize-web-terminal) and (@smoke or @regression or @pre-condition) and not (@manual or @to-do or @un-verified or @broken-test)',
TAGS:
'(@web-terminal or @customize-web-terminal) and (@smoke or @regression or @pre-condition) and not (@manual or @to-do or @un-verified or @broken-test)',
NAMESPACE: 'aut-webterminal',
},
retries: {
Expand All @@ -28,14 +29,12 @@ module.exports = defineConfig({
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./../../dev-console/integration-tests/plugins/index.js')(
on,
config
)
// eslint-disable-next-line global-require
return require('./../../dev-console/integration-tests/plugins/index.js')(on, config);
},
specPattern: 'features/**/*.{feature,features}',
supportFile: 'support/commands/index.ts',
baseUrl: 'http://localhost:9000',
testIsolation: false,
},
})
});

0 comments on commit d33e78b

Please sign in to comment.