From b217499b5978b6b2796577a888ceb1ed66d6b308 Mon Sep 17 00:00:00 2001 From: Mihajlo Date: Wed, 28 Jul 2021 18:18:26 +0200 Subject: [PATCH] chore: addressing comments --- .github/workflows/npmpublish.yml | 2 +- cypress/fixtures/example.json | 5 ----- cypress/plugins/cy-ts-preprocessor.js | 2 +- cypress/support/commands.ts | 25 ------------------------- cypress/support/index.js | 20 -------------------- sasjs-tests/package-lock.json | 2 +- sasjs-tests/src/testSuites/Basic.ts | 2 -- 7 files changed, 3 insertions(+), 55 deletions(-) delete mode 100644 cypress/fixtures/example.json delete mode 100644 cypress/support/commands.ts delete mode 100644 cypress/support/index.js diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 4cd1c81..d401b26 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -59,7 +59,7 @@ jobs: run: | npm install -g replace-in-files-cli cd sasjs-tests - replace-in-files --regex='"@sasjs/adapter".*' --replacement='"@sasjs/adapter":"2.8.13",' ./package.json + replace-in-files --regex='"@sasjs/adapter".*' --replacement='"@sasjs/adapter":"latest",' ./package.json npm i replace-in-files --regex='"userName".*' --replacement='"userName":"${{ secrets.SAS_USERNAME }}",' ./public/config.json replace-in-files --regex='"password".*' --replacement='"password":"${{ secrets.SAS_PASSWORD }}",' ./public/config.json diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json deleted file mode 100644 index 02e4254..0000000 --- a/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/cypress/plugins/cy-ts-preprocessor.js b/cypress/plugins/cy-ts-preprocessor.js index 6aa922c..9d3c777 100644 --- a/cypress/plugins/cy-ts-preprocessor.js +++ b/cypress/plugins/cy-ts-preprocessor.js @@ -8,7 +8,7 @@ const webpackOptions = { rules: [ { test: /\.ts$/, - loaders: ['ts-loader', 'angular2-template-loader'], + loaders: ['ts-loader'], exclude: [/node_modules/], }, { diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts deleted file mode 100644 index cb8af3d..0000000 --- a/cypress/support/commands.ts +++ /dev/null @@ -1,25 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add("login", (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) \ No newline at end of file diff --git a/cypress/support/index.js b/cypress/support/index.js deleted file mode 100644 index e6b1e65..0000000 --- a/cypress/support/index.js +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands.ts' - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/sasjs-tests/package-lock.json b/sasjs-tests/package-lock.json index 1b7bc47..72b192f 100644 --- a/sasjs-tests/package-lock.json +++ b/sasjs-tests/package-lock.json @@ -2005,7 +2005,7 @@ }, "@sasjs/adapter": { "version": "file:../build/sasjs-adapter-5.0.0.tgz", - "integrity": "sha512-yVehhjZU3gvOokbZUivNPL4byc+6VOT39Xt2RNB2i4Ja8q/4ziImSJiaGO9kbw4umotXqegM6BDVOhnLXATq6g==", + "integrity": "sha512-I0+x3VCnkjW205c4CZvQjxhDLn/6lvb7GyRFaNFcFl15jO4UNTuNhzYB4f6euKQgXezBgZEDTtXrccv5wBAJ4w==", "requires": { "@sasjs/utils": "^2.27.1", "axios": "^0.21.1", diff --git a/sasjs-tests/src/testSuites/Basic.ts b/sasjs-tests/src/testSuites/Basic.ts index 2298e4a..66dc2ed 100644 --- a/sasjs-tests/src/testSuites/Basic.ts +++ b/sasjs-tests/src/testSuites/Basic.ts @@ -47,9 +47,7 @@ export const basicTests = ( 'Should fail on first attempt and should log the user in on second attempt', test: async () => { await adapter.logOut() - await sleep(1000) await adapter.logIn('invalid', 'invalid') - await sleep(1000) return adapter.logIn(userName, password) }, assertion: (response: any) =>