mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-10 17:04:36 +00:00
chore(lint): fixed lint issues in cypress folder
This commit is contained in:
@@ -3,55 +3,76 @@ const username = Cypress.env('username')
|
||||
const password = Cypress.env('password')
|
||||
const testingFinishTimeout = Cypress.env('testingFinishTimeout')
|
||||
|
||||
context('sasjs-tests', function() {
|
||||
this.beforeAll(() => {
|
||||
cy.visit(sasjsTestsUrl)
|
||||
context('sasjs-tests', function () {
|
||||
this.beforeAll(() => {
|
||||
cy.visit(sasjsTestsUrl)
|
||||
})
|
||||
|
||||
this.beforeEach(() => {
|
||||
cy.reload()
|
||||
})
|
||||
|
||||
it('Should have all tests successfull', (done) => {
|
||||
cy.get('body').then(($body) => {
|
||||
if ($body.find('input[placeholder="User Name"]').length > 0) {
|
||||
cy.get('input[placeholder="User Name"]').type(username)
|
||||
cy.get('input[placeholder="Password"]').type(password)
|
||||
cy.get('.submit-button').click()
|
||||
}
|
||||
|
||||
cy.get('input[placeholder="User Name"]', { timeout: 40000 })
|
||||
.should('not.exist')
|
||||
.then(() => {
|
||||
cy.get('.ui.massive.icon.primary.left.labeled.button')
|
||||
.click()
|
||||
.then(() => {
|
||||
cy.get('.ui.massive.loading.primary.button', {
|
||||
timeout: testingFinishTimeout
|
||||
})
|
||||
.should('not.exist')
|
||||
.then(() => {
|
||||
cy.get('span.icon.failed')
|
||||
.should('not.exist')
|
||||
.then(() => {
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
this.beforeEach(() => {
|
||||
cy.reload()
|
||||
})
|
||||
it('Should have all tests successfull with debug on', (done) => {
|
||||
cy.get('body').then(($body) => {
|
||||
if ($body.find('input[placeholder="User Name"]').length > 0) {
|
||||
cy.get('input[placeholder="User Name"]').type(username)
|
||||
cy.get('input[placeholder="Password"]').type(password)
|
||||
cy.get('.submit-button').click()
|
||||
}
|
||||
|
||||
it('Should have all tests successfull', (done) => {
|
||||
cy.get('body').then($body => {
|
||||
if ($body.find('input[placeholder="User Name"]').length > 0) {
|
||||
cy.get('input[placeholder="User Name"]').type(username)
|
||||
cy.get('input[placeholder="Password"]').type(password)
|
||||
cy.get('.submit-button').click()
|
||||
}
|
||||
|
||||
cy.get('input[placeholder="User Name"]', {timeout: 40000}).should('not.exist').then(() => {
|
||||
cy.get('.ui.massive.icon.primary.left.labeled.button').click().then(() => {
|
||||
cy.get('.ui.massive.loading.primary.button', {timeout: testingFinishTimeout}).should('not.exist').then(() => {
|
||||
cy.get('span.icon.failed').should('not.exist').then(() => {
|
||||
done()
|
||||
cy.get('.ui.fitted.toggle.checkbox label')
|
||||
.click()
|
||||
.then(() => {
|
||||
cy.get('input[placeholder="User Name"]', { timeout: 40000 })
|
||||
.should('not.exist')
|
||||
.then(() => {
|
||||
cy.get('.ui.massive.icon.primary.left.labeled.button')
|
||||
.click()
|
||||
.then(() => {
|
||||
cy.get('.ui.massive.loading.primary.button', {
|
||||
timeout: testingFinishTimeout
|
||||
})
|
||||
.should('not.exist')
|
||||
.then(() => {
|
||||
cy.get('span.icon.failed')
|
||||
.should('not.exist')
|
||||
.then(() => {
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('Should have all tests successfull with debug on', (done) => {
|
||||
cy.get('body').then($body => {
|
||||
if ($body.find('input[placeholder="User Name"]').length > 0) {
|
||||
cy.get('input[placeholder="User Name"]').type(username)
|
||||
cy.get('input[placeholder="Password"]').type(password)
|
||||
cy.get('.submit-button').click()
|
||||
}
|
||||
|
||||
cy.get('.ui.fitted.toggle.checkbox label').click().then(() => {
|
||||
cy.get('input[placeholder="User Name"]', {timeout: 40000}).should('not.exist').then(() => {
|
||||
cy.get('.ui.massive.icon.primary.left.labeled.button').click().then(() => {
|
||||
cy.get('.ui.massive.loading.primary.button', {timeout: testingFinishTimeout}).should('not.exist').then(() => {
|
||||
cy.get('span.icon.failed').should('not.exist').then(() => {
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -9,7 +9,7 @@ const webpackOptions = {
|
||||
{
|
||||
test: /\.ts$/,
|
||||
loaders: ['ts-loader'],
|
||||
exclude: [/node_modules/],
|
||||
exclude: [/node_modules/]
|
||||
},
|
||||
{
|
||||
test: /\.(html|css)$/,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// This function is called when a project is opened or re-opened (e.g. due to
|
||||
// the project's config changing)
|
||||
|
||||
const wp = require("@cypress/webpack-preprocessor");
|
||||
const wp = require('@cypress/webpack-preprocessor')
|
||||
|
||||
/**
|
||||
* @type {Cypress.PluginConfig}
|
||||
@@ -22,21 +22,21 @@ module.exports = (on, config) => {
|
||||
// `config` is the resolved Cypress config
|
||||
|
||||
const options = {
|
||||
webpackOptions: require("../webpack.config.js")
|
||||
};
|
||||
on("file:preprocessor", wp(options));
|
||||
webpackOptions: require('../webpack.config.js')
|
||||
}
|
||||
on('file:preprocessor', wp(options))
|
||||
|
||||
on("before:browser:launch", (browser = {}, launchOptions) => {
|
||||
if (browser.name === "chrome") {
|
||||
launchOptions.args.push("--disable-site-isolation-trials");
|
||||
launchOptions.args.push("--auto-open-devtools-for-tabs");
|
||||
launchOptions.args.push("--aggressive-cache-discard")
|
||||
launchOptions.args.push("--disable-cache")
|
||||
launchOptions.args.push("--disable-application-cache")
|
||||
launchOptions.args.push("--disable-offline-load-stale-cache")
|
||||
launchOptions.args.push("--disk-cache-size=0")
|
||||
on('before:browser:launch', (browser = {}, launchOptions) => {
|
||||
if (browser.name === 'chrome') {
|
||||
launchOptions.args.push('--disable-site-isolation-trials')
|
||||
launchOptions.args.push('--auto-open-devtools-for-tabs')
|
||||
launchOptions.args.push('--aggressive-cache-discard')
|
||||
launchOptions.args.push('--disable-cache')
|
||||
launchOptions.args.push('--disable-application-cache')
|
||||
launchOptions.args.push('--disable-offline-load-stale-cache')
|
||||
launchOptions.args.push('--disk-cache-size=0')
|
||||
|
||||
return launchOptions;
|
||||
return launchOptions
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"baseUrl": "../node_modules",
|
||||
"target": "es6",
|
||||
"lib": ["es2019", "dom"],
|
||||
"types": ["cypress"]
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"baseUrl": "../node_modules",
|
||||
"target": "es6",
|
||||
"lib": ["es2019", "dom"],
|
||||
"types": ["cypress"]
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
resolve: {
|
||||
extensions: [".ts", ".js"]
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: [/node_modules/],
|
||||
use: [
|
||||
{
|
||||
loader: "ts-loader",
|
||||
options: {
|
||||
// skip typechecking for speed
|
||||
transpileOnly: true
|
||||
}
|
||||
mode: 'development',
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js']
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: [/node_modules/],
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
// skip typechecking for speed
|
||||
transpileOnly: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user