diff --git a/scripts/lint.sh b/scripts/lint.sh index 1ba5e32528..63b3bc4b5a 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -5,15 +5,21 @@ source ${OKTA_HOME}/${REPO}/scripts/setup.sh export TEST_SUITE_TYPE="checkstyle" export TEST_RESULT_FILE_DIR="${REPO}/build2" +create_log_group "test:types" if ! yarn test:types; then echo "tsd failed! Exiting..." exit ${PUBLISH_TYPE_AND_RESULT_DIR_BUT_ALWAYS_FAIL} fi +finish_log_group $? +create_log_group "lint_report" if ! yarn lint:report; then + # run `yarn lint` so the linting errors appear in the bacon logs + yarn lint echo "lint failed! Exiting..." exit ${PUBLISH_TYPE_AND_RESULT_DIR_BUT_ALWAYS_FAIL} fi +finish_log_group $? # TODO: fix types in @okta/test.app # JIRA: https://oktainc.atlassian.net/browse/OKTA-529625 @@ -22,6 +28,7 @@ fi # exit ${TEST_FAILURE} # fi +create_log_group "verify:package" mkdir -p ${TEST_RESULT_FILE_DIR} if ! yarn verify:package 2> ${TEST_RESULT_FILE_DIR}/verify-package-error.log; then echo "verify package failed! Exiting..." @@ -29,6 +36,7 @@ if ! yarn verify:package 2> ${TEST_RESULT_FILE_DIR}/verify-package-error.log; th log_custom_message "Verification Failed" "${value}" exit ${PUBLISH_TYPE_AND_RESULT_DIR_BUT_ALWAYS_FAIL} fi +finish_log_group $? echo ${TEST_SUITE_TYPE} > ${TEST_SUITE_TYPE_FILE} echo ${TEST_RESULT_FILE_DIR} > ${TEST_RESULT_FILE_DIR_FILE} diff --git a/test/e2e/cucumber.wdio.conf.ts b/test/e2e/cucumber.wdio.conf.ts index 68328abd7f..75c94cc70b 100644 --- a/test/e2e/cucumber.wdio.conf.ts +++ b/test/e2e/cucumber.wdio.conf.ts @@ -1,6 +1,7 @@ import type { Options } from '@wdio/types'; +import type { WebdriverIO } from '@wdio/types/build/Options'; const wdioConfig = require('./wdio.conf'); -const { capabilities, services, reporters, ...conf } = wdioConfig.config; +const { capabilities, services, ...conf } = wdioConfig.config; const DEBUG = process.env.DEBUG; diff --git a/test/support/monolith/create-env.ts b/test/support/monolith/create-env.ts index 0004196ed8..0eec7ac898 100644 --- a/test/support/monolith/create-env.ts +++ b/test/support/monolith/create-env.ts @@ -1,8 +1,10 @@ +// eslint-disable-next-line no-undef, node/no-missing-import import * as dockolith from '@okta/dockolith'; import { writeFileSync } from 'fs'; import * as path from 'path'; // Bootstraps a local monolith instance +/* eslint max-statements: [2, 60], complexity: [2, 10] */ async function bootstrap() { const subDomain = process.env.TEST_ORG_SUBDOMAIN || 'authjs-test-' + Date.now(); const outputFilePath = path.join(__dirname, '../../../', '.bacon.env'); @@ -120,7 +122,7 @@ async function bootstrap() { }; // Set Feature flags - console.error('Setting feature flags...') + console.error('Setting feature flags...'); for (const option of options.enableFFs) { await dockolith.enableFeatureFlag(config, orgId, option); } @@ -161,7 +163,7 @@ async function bootstrap() { }); // Create apps - const createdApps: any[] = [] + const createdApps: any[] = []; for (const option of options.apps) { console.error(`Creating app "${option.label}"`); const app = await dockolith.createApp(config, { @@ -221,7 +223,7 @@ async function bootstrap() { USERNAME: user1.profile.login, PASSWORD: options.users[0].password, - } + }; console.error(`Writing output to: ${outputFilePath}`);