Skip to content

Commit

Permalink
Add test id to about version element
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Lorena Rodriguez Viruel authored and Maria Lorena Rodriguez Viruel committed Nov 12, 2023
1 parent e0d37e1 commit 359b7f3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
3 changes: 2 additions & 1 deletion tests/page-objects/default/about/about.wdio.page.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const userName = () => $('label=User name');
const partners = () => $('.partners');
const version = () => $('.material .cell p');
//const version = () => $('.material .cell p');
const version = () => $('[test-id="about-version"]');

const getPartnerImage = async (name) => {
await (await partners()).waitForDisplayed();
Expand Down
26 changes: 17 additions & 9 deletions webapp/src/ts/modules/about/about.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<div>
<label translate>version</label>
<p>{{version}}</p>
<p test-id="about-version">{{version}}</p>
</div>

<div>
Expand All @@ -29,14 +29,17 @@
<span class="fa fa-check-square browser-support-icon-green"></span>
<ng-template #unsupportedBrowser>
<span class="fa fa-times browser-support-icon-red"></span>
<a target="_blank" rel="noopener noreferrer" href="https://docs.communityhealthtoolkit.org/core/releases/#requirements">
<a target="_blank" rel="noopener noreferrer"
href="https://docs.communityhealthtoolkit.org/core/releases/#requirements">
{{'debug.supported_browser.see_requirements' | translate}}
</a>
<p class="browser-support-message">
<span>{{'login.unsupported_browser' | translate}}</span>
<ng-container [ngSwitch]="browserSupport.outdatedComponent">
<span *ngSwitchCase="'chtAndroid'">{{'login.unsupported_browser.outdated_cht_android' | translate}}</span>
<span *ngSwitchCase="'webviewApk'">{{'login.unsupported_browser.outdated_webview_apk' | translate}}</span>
<span *ngSwitchCase="'chtAndroid'">{{'login.unsupported_browser.outdated_cht_android' |
translate}}</span>
<span *ngSwitchCase="'webviewApk'">{{'login.unsupported_browser.outdated_webview_apk' |
translate}}</span>
<span *ngSwitchCase="'browser'">{{'login.unsupported_browser.outdated_browser' | translate}}</span>
</ng-container>
</p>
Expand All @@ -63,7 +66,8 @@
<label translate>android_app.os_android_version.title</label>
<p>
{{androidDeviceInfo.software.androidVersion}}
<span *ngIf="androidDeviceInfo?.software?.osApiLevel">(SDK {{androidDeviceInfo.software.osApiLevel}})</span>
<span *ngIf="androidDeviceInfo?.software?.osApiLevel">(SDK
{{androidDeviceInfo.software.osApiLevel}})</span>
</p>
</div>

Expand Down Expand Up @@ -113,15 +117,19 @@

<div>
<label translate>replication.last.success.to</label>
<p *ngIf="!replicationStatus.disabled && replicationStatus.lastSuccessTo">{{replicationStatus.lastSuccessTo | simpleDateTime}}</p>
<p *ngIf="!replicationStatus.disabled && !replicationStatus.lastSuccessTo" translate>replication.last.success.unknown</p>
<p *ngIf="!replicationStatus.disabled && replicationStatus.lastSuccessTo">{{replicationStatus.lastSuccessTo
| simpleDateTime}}</p>
<p *ngIf="!replicationStatus.disabled && !replicationStatus.lastSuccessTo" translate>
replication.last.success.unknown</p>
<p *ngIf="replicationStatus.disabled" translate>replication.disabled</p>
</div>

<div>
<label translate>replication.last.success.from</label>
<p *ngIf="!replicationStatus.disabled && replicationStatus.lastSuccessFrom">{{replicationStatus.lastSuccessFrom | simpleDateTime}}</p>
<p *ngIf="!replicationStatus.disabled && !replicationStatus.lastSuccessFrom" translate>replication.last.success.unknown</p>
<p *ngIf="!replicationStatus.disabled && replicationStatus.lastSuccessFrom">
{{replicationStatus.lastSuccessFrom | simpleDateTime}}</p>
<p *ngIf="!replicationStatus.disabled && !replicationStatus.lastSuccessFrom" translate>
replication.last.success.unknown</p>
<p *ngIf="replicationStatus.disabled" translate>replication.disabled</p>
</div>

Expand Down

0 comments on commit 359b7f3

Please sign in to comment.