Skip to content

Commit

Permalink
Merge branch 'master' into ne_translations_201_800
Browse files Browse the repository at this point in the history
  • Loading branch information
1yuv authored Aug 31, 2024
2 parents 4005c60 + a211a7c commit 77c6d93
Show file tree
Hide file tree
Showing 18 changed files with 9,195 additions and 1,287 deletions.
8,996 changes: 7,711 additions & 1,285 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"unit-cht-deploy": "cd scripts/deploy && npm test",
"wdio-default-mobile-local": "export VERSION=$(node ./scripts/build/get-version.js) && ./scripts/build/build-service-images.sh && wdio run ./tests/e2e/default-mobile/wdio.conf.js --suite=all",
"wdio-local": "export VERSION=$(node ./scripts/build/get-version.js) && ./scripts/build/build-service-images.sh && wdio run ./tests/e2e/default/wdio.conf.js",
"apdex-test": "wdio run ./tests/performance/apdex-score/wdio.conf.js",
"-- CI SCRIPTS ": "-----------------------------------------------------------------------------------------------",
"build": "./scripts/build/build-ci.sh",
"ci-compile": "node scripts/ci/check-versions.js && node scripts/build/cli npmCiModules && npm run lint && npm run unit-nginx && npm run unit-haproxy && npm run unit-haproxy-healthcheck && npm run unit-cht-deploy && npm run build && npm run integration-api && npm run unit",
Expand Down Expand Up @@ -87,12 +88,14 @@
"@typescript-eslint/eslint-plugin": "7.5",
"@typescript-eslint/parser": "7.5",
"@wdio/allure-reporter": "^8.34.0",
"@wdio/appium-service": "^8.36.1",
"@wdio/cli": "^8.35.1",
"@wdio/devtools-service": "^8.35.1",
"@wdio/local-runner": "^8.35.1",
"@wdio/mocha-framework": "^8.35.0",
"@wdio/spec-reporter": "^8.32.4",
"allure-commandline": "^2.24.0",
"appium-uiautomator2-driver": "^3.0.0",
"browserify": "^17.0.0",
"browserify-ngannotate": "^2.0.0",
"chai": "^4.3.8",
Expand Down Expand Up @@ -141,7 +144,6 @@
"loose-envify": "^1.4.0",
"mocha": "^10.7.3",
"module-alias": "^2.2.3",
"moment-locales-webpack-plugin": "^1.2.0",
"nodemon": "^3.0.1",
"nyc": "^15.1.0",
"patch-package": "^8.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const personFactory = require('@factories/cht/contacts/person');

/* global window */

describe('Muting', () => {
describe.skip('Muting', () => {
const places = placeFactory.generateHierarchy();
const district = places.get('district_hospital');
const healthCenter = places.get('health_center');
Expand Down
41 changes: 41 additions & 0 deletions tests/page-objects/apdex/contacts.page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
const Page = require('@page-objects/apdex/page');
const CONTACT_LIST = 'contactList';
const CHW_AREA = 'chwArea';
const HOUSEHOLD = 'household';
const PATIENT = 'patient';
const PATIENT_REPORT = 'patientReport';
const PATIENT_CONTACT = 'patientContact';

class ContactsPage extends Page {

async loadContactList() {
await super.loadPage(CONTACT_LIST);
}

async loadChwArea() {
await super.loadPage(CHW_AREA);
}

async loadHousehold() {
await super.loadPage(HOUSEHOLD);
}

async loadPatient() {
await super.loadPage(PATIENT);
}

async searchContact() {
await super.searchPage(CONTACT_LIST);
}

async submitPatientReport() {
await super.loadForm(PATIENT_REPORT);
}

async createPatient() {
await super.loadForm(PATIENT_CONTACT);
}

}

module.exports = new ContactsPage();
36 changes: 36 additions & 0 deletions tests/page-objects/apdex/load.page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const Page = require('@page-objects/apdex/page');
const CUSTOM_INSTANCE = 'Custom';

class LoadPage extends Page {

get inputInstanceUrl() {
return $('//android.widget.EditText[@resource-id="org.medicmobile.webapp.mobile:id/txtAppUrl"]');
}

get btnSave() {
return $('//android.widget.Button[@resource-id="org.medicmobile.webapp.mobile:id/btnSaveSettings"]');
}

async loadInstance() {
const isServerSettings = await super.isLinkExisting(CUSTOM_INSTANCE);
// Check if the app has opened and the custom linktext is displayed before proceeding
if (!isServerSettings) {
return;
}

await super.toggleAirplaneMode('off');
await super.clickLink(CUSTOM_INSTANCE);
await this.inputInstanceUrl.setValue(super.getSettingsProvider().getInstanceURL());
await this.btnSave.click();
}

async turnOnAirplaneMode() {
const commonElements = super.getSettingsProvider().getCommonElements();
const UI_ELEMENT = commonElements?.relaunchAppAssert || super.getLinkSelector('People');
await this.waitForDisplayedAndRetry(UI_ELEMENT);
await super.toggleAirplaneMode('on');
}

}

module.exports = new LoadPage();
29 changes: 29 additions & 0 deletions tests/page-objects/apdex/login.page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const Page = require('@page-objects/apdex/page');

class LoginPage extends Page {

get inputUsername() {
return $('//android.view.View[@text="User name"]//parent::android.view.View/android.widget.EditText');
}

get inputPassword() {
return $('//*[@text="Password"]//parent::android.view.View/android.view.View/android.widget.EditText');
}

async login(userType, userRole) {
await this.inputUsername.waitForDisplayed();

const user = super.getSettingsProvider().getUser(userType, userRole);
await this.inputUsername.setValue(user.username);
await this.inputPassword.setValue(user.password);

await super.clickButton('Login');

if (super.getSettingsProvider().hasPrivacyPolicy()) {
await super.clickButton('Accept');
}
}

}

module.exports = new LoginPage();
12 changes: 12 additions & 0 deletions tests/page-objects/apdex/messages.page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const Page = require('@page-objects/apdex/page');
const MESSAGE_LIST = 'messageList';

class MessagesPage extends Page {

async loadMessageList() {
await super.loadPage(MESSAGE_LIST);
}

}

module.exports = new MessagesPage();
Loading

0 comments on commit 77c6d93

Please sign in to comment.