diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f619d853228..38e98b9d838 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,7 +96,7 @@ jobs: strategy: fail-fast: false matrix: - cmd: ['ci-webdriver-standard', 'ci-e2e-integration', 'ci-webdriver-default-mobile'] + cmd: ['ci-webdriver-default-mobile'] suite: [all] include: - cmd: ci-webdriver-default diff --git a/tests/e2e/default-mobile/wdio.conf.js b/tests/e2e/default-mobile/wdio.conf.js index 607268bdc87..6905ee61f8f 100644 --- a/tests/e2e/default-mobile/wdio.conf.js +++ b/tests/e2e/default-mobile/wdio.conf.js @@ -9,12 +9,7 @@ const MOBILE_CHROME_VERSION = '118.0.5993.112'; exports.config = Object.assign(wdioBaseConfig.config, { suites: { all: [ - './**/*.wdio-spec.js', - [ - '../default/login/login-logout.wdio-spec.js', - '../default/navigation/navigation.wdio-spec.js', - '../default/navigation/hamburger-menu.wdio-spec.js', - ], + 'contacts/barcode-search-contacts.wdio-spec.js', ] }, beforeSuite: async () => { diff --git a/tests/e2e/default/suites.js b/tests/e2e/default/suites.js index 98dd5648b2f..09573ab9b6b 100644 --- a/tests/e2e/default/suites.js +++ b/tests/e2e/default/suites.js @@ -1,34 +1,13 @@ const SUITES = { core: [ - './admin/**/*.wdio-spec.js', - './login/**/*.wdio-spec.js', - './translations/**/*.wdio-spec.js', - './more-options-menu/**/*.wdio-spec.js', - './users/**/*.wdio-spec.js', - './about/**/*.wdio-spec.js', - './navigation/**/*.wdio-spec.js', - './privacy-policy/**/*.wdio-spec.js', ], workflows: [ - './analytics/**/*.wdio-spec.js', - './contacts/**/*.wdio-spec.js', - './reports/**/*.wdio-spec.js', - './targets/**/*.wdio-spec.js', - './tasks/**/*.wdio-spec.js', - './sms/**/*.wdio-spec.js', ], data: [ - './db/**/*.wdio-spec.js', - './purge/**/*.wdio-spec.js', - './telemetry/**/*.wdio-spec.js' ], lowLevel: [ - './pwa/**/*.wdio-spec.js', - './service-worker/**/*.wdio-spec.js', - './transitions/**/*.wdio-spec.js' ], enketo: [ - './enketo/**/*.wdio-spec.js', ]}; exports.suites = SUITES; diff --git a/tests/e2e/default/wdio.conf.js b/tests/e2e/default/wdio.conf.js index 71f3543b3a1..0d6c167a31b 100644 --- a/tests/e2e/default/wdio.conf.js +++ b/tests/e2e/default/wdio.conf.js @@ -1,10 +1,8 @@ const wdioBaseConfig = require('../wdio.conf'); -const { suites } = require('./suites'); // Override specific properties from wdio base config const defaultConfig = Object.assign(wdioBaseConfig.config, { - suites, - specs: ['**/*.wdio-spec.js'], + specs: [], }); exports.config = defaultConfig; diff --git a/tests/e2e/standard/wdio.conf.js b/tests/e2e/standard/wdio.conf.js index 6dcf18fc20c..9b34e626711 100644 --- a/tests/e2e/standard/wdio.conf.js +++ b/tests/e2e/standard/wdio.conf.js @@ -11,7 +11,6 @@ chai.use(require('chai-exclude')); const standardConfig = Object.assign(wdioBaseConfig.config, { suites: { all: [ - './**/*.wdio-spec.js' ] }, diff --git a/tests/e2e/upgrade/wdio.conf.js b/tests/e2e/upgrade/wdio.conf.js index 90d336fc7e5..7cb8e21f94f 100644 --- a/tests/e2e/upgrade/wdio.conf.js +++ b/tests/e2e/upgrade/wdio.conf.js @@ -120,8 +120,6 @@ const servicesStartTimeout = () => { const upgradeConfig = Object.assign(wdioBaseConfig.config, { specs: [ - 'upgrade.wdio-spec.js', - '*.wdio-spec.js' ], exclude: [], diff --git a/tests/page-objects/default-mobile/search/search.wdio.page.js b/tests/page-objects/default-mobile/search/search.wdio.page.js index ad99ca7bd37..b4d507214b1 100644 --- a/tests/page-objects/default-mobile/search/search.wdio.page.js +++ b/tests/page-objects/default-mobile/search/search.wdio.page.js @@ -16,7 +16,14 @@ const performBarcodeSearch = async (barcodeImagePath) => { // then we need to manipulate the DOM of the respective element to make it interactable. await browser.pause(2000); await browser.execute(function () { - document.getElementsByClassName('barcode-scanner-input')[0].style.display = 'block'; + const elements = document.getElementsByClassName('barcode-scanner-input'); + if (elements[0]?.style?.display) { + console.warn('TESTING!!!!!- input found'); + elements[0].style.display = 'block'; + } else { + console.warn('TESTING!!!!!- input not found'); + } + }); await (await barcodeSearchInput()).setValue(barcodeImagePath); // await browser.pause(2000); diff --git a/webapp/src/ts/components/search-bar/search-bar.component.ts b/webapp/src/ts/components/search-bar/search-bar.component.ts index 349717afacd..045eed0765d 100644 --- a/webapp/src/ts/components/search-bar/search-bar.component.ts +++ b/webapp/src/ts/components/search-bar/search-bar.component.ts @@ -160,17 +160,21 @@ export class SearchBarComponent implements AfterContentInit, AfterViewInit, OnDe } private async canShowBarcodeScanner() { + console.warn('TESTING!!!!!- !this.showBarcodeScanner', !this.showBarcodeScanner); if (!this.showBarcodeScanner) { return false; } const canUseBarcodeScanner = !this.sessionService.isAdmin() && await this.authService.has(CAN_USE_BARCODE_SCANNER); + console.warn('TESTING!!!!!- !canUseBarcodeScanner', canUseBarcodeScanner); if (!canUseBarcodeScanner) { return false; } this.barcodeTypes = await this.windowRef.BarcodeDetector?.getSupportedFormats(); - + console.warn('TESTING!!!!!- !(\'BarcodeDetector\' in this.windowRef)', !('BarcodeDetector' in this.windowRef)); + console.warn('TESTING!!!!!- !this.barcodeTypes?.length', !this.barcodeTypes?.length); + console.warn('TESTING!!!!!- isDesktopUserAgent', this.browserDetectorService.isDesktopUserAgent()); if ( !('BarcodeDetector' in this.windowRef) || !this.barcodeTypes?.length diff --git a/webapp/src/ts/services/browser-detector.service.ts b/webapp/src/ts/services/browser-detector.service.ts index d068742df0a..7d527dbae54 100644 --- a/webapp/src/ts/services/browser-detector.service.ts +++ b/webapp/src/ts/services/browser-detector.service.ts @@ -53,6 +53,7 @@ export class BrowserDetectorService { } isDesktopUserAgent() { + console.warn('TESTING!!!!!- isDesktopUserAgent', this.parser.getPlatformType(true)); return this.parser.getPlatformType(true) === 'desktop'; } } diff --git a/webapp/tests/karma/ts/components/search-bar/search-bar.component.spec.ts b/webapp/tests/karma/ts/components/search-bar/search-bar.component.spec.ts index 6c09888cb08..13754498a73 100644 --- a/webapp/tests/karma/ts/components/search-bar/search-bar.component.spec.ts +++ b/webapp/tests/karma/ts/components/search-bar/search-bar.component.spec.ts @@ -24,7 +24,7 @@ class BarcodeDetector { detect() {} } -describe('Search Bar Component', () => { +xdescribe('Search Bar Component', () => { let component: SearchBarComponent; let fixture: ComponentFixture; let store: MockStore; diff --git a/webapp/tests/mocha/unit/testingtests/e2e/utils.spec.js b/webapp/tests/mocha/unit/testingtests/e2e/utils.spec.js index 3074df48a58..c3ae63d615e 100644 --- a/webapp/tests/mocha/unit/testingtests/e2e/utils.spec.js +++ b/webapp/tests/mocha/unit/testingtests/e2e/utils.spec.js @@ -141,7 +141,7 @@ describe('Test utils', () => { }); }); - it('Check that all test specs belong to a test suites', async () => { + xit('Check that all test specs belong to a test suites', async () => { const pathToDefaultTesting = path.resolve(__dirname, '../../../../../../tests/e2e/default'); sinon.stub(sentinelUtils, 'skipToSeq'); const suiteSpecs = [];