Skip to content

Commit

Permalink
debugging e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
latin-panda committed Feb 12, 2024
1 parent b45e15b commit 1e4caf1
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 33 deletions.
7 changes: 1 addition & 6 deletions tests/e2e/default-mobile/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
21 changes: 0 additions & 21 deletions tests/e2e/default/suites.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/default/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ 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;
1 change: 0 additions & 1 deletion tests/e2e/standard/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ chai.use(require('chai-exclude'));
const standardConfig = Object.assign(wdioBaseConfig.config, {
suites: {
all: [
'./**/*.wdio-spec.js'
]
},

Expand Down
2 changes: 0 additions & 2 deletions tests/e2e/upgrade/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ const servicesStartTimeout = () => {
const upgradeConfig = Object.assign(wdioBaseConfig.config, {
specs:
[
'upgrade.wdio-spec.js',
'*.wdio-spec.js'
],
exclude: [],

Expand Down
6 changes: 5 additions & 1 deletion webapp/src/ts/components/search-bar/search-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,21 @@ export class SearchBarComponent implements AfterContentInit, AfterViewInit, OnDe
}

private async canShowBarcodeScanner() {
console.info('TESTING!!!!!- !this.showBarcodeScanner', !this.showBarcodeScanner);
if (!this.showBarcodeScanner) {
return false;
}

const canUseBarcodeScanner = !this.sessionService.isAdmin() && await this.authService.has(CAN_USE_BARCODE_SCANNER);
console.info('TESTING!!!!!- !canUseBarcodeScanner', canUseBarcodeScanner);
if (!canUseBarcodeScanner) {
return false;
}

this.barcodeTypes = await this.windowRef.BarcodeDetector?.getSupportedFormats();

console.info('TESTING!!!!!- !(\'BarcodeDetector\' in this.windowRef)', !('BarcodeDetector' in this.windowRef));
console.info('TESTING!!!!!- !this.barcodeTypes?.length', !this.barcodeTypes?.length);
console.info('TESTING!!!!!- isDesktopUserAgent', this.browserDetectorService.isDesktopUserAgent());
if (
!('BarcodeDetector' in this.windowRef)
|| !this.barcodeTypes?.length
Expand Down
1 change: 1 addition & 0 deletions webapp/src/ts/services/browser-detector.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class BrowserDetectorService {
}

isDesktopUserAgent() {
console.info('TESTING!!!!!- isDesktopUserAgent', this.parser.getPlatformType(true));
return this.parser.getPlatformType(true) === 'desktop';
}
}

0 comments on commit 1e4caf1

Please sign in to comment.