Skip to content

Commit

Permalink
Merge branch 'main' into chore/update-transifex
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher authored Mar 1, 2024
2 parents c8f158f + 65f3dd9 commit 47daad4
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tx-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
token: ${{ secrets.TRANSIFEX_TOKEN }}
args: pull --force --all
- name: Create PR if necessary
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6.0.1
with:
commit-message: "(chore) Update translations from Transifex"
title: "(chore) Update translations from Transifex"
Expand Down
1 change: 1 addition & 0 deletions e2e/specs/edit-patient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { deletePatient, generateRandomPatient, getPatient, type Patient } from '
import { type PatientRegistrationFormValues, RegistrationAndEditPage } from '../pages';

let patient: Patient;

test.beforeEach(async ({ api }) => {
patient = await generateRandomPatient(api);
});
Expand Down
21 changes: 10 additions & 11 deletions e2e/specs/patient-list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
removePatientFromCohort,
} from '../commands';

let createdCohortMember: CohortMember;
let createdCohortUuid: string;
let cohortMember: CohortMember;
let cohortUuid: string;
let cohort: Cohort;
let patient: Patient;

Expand Down Expand Up @@ -46,7 +46,7 @@ test('Create and edit a patient list', async ({ page }) => {

await test.step('Then I should see the information about the list', async () => {
await expect(page).toHaveURL(new RegExp('^[\\w\\d:\\/.-]+\\/patient-lists\\/[\\w\\d-]+$'));
createdCohortUuid = /patient-lists\/([\w\d-]+)/.exec(page.url())?.[1] ?? null;
cohortUuid = /patient-lists\/([\w\d-]+)/.exec(page.url())?.[1] ?? null;

await expect(patientListPage.patientListHeader()).toHaveText(new RegExp(patientListName));
await expect(patientListPage.patientListHeader()).toHaveText(new RegExp(patientListDescription));
Expand All @@ -69,32 +69,31 @@ test('Create and edit a patient list', async ({ page }) => {

test('Manage patients in a list', async ({ api, page }) => {
const patientListPage = new PatientListsPage(page);

await test.step("When I visit a specific patient list's page", async () => {
await patientListPage.goto(cohort.uuid);
});

await test.step('Then I should be able to add and remove patients from that list', async () => {
// Add a patient to the list
createdCohortMember = await addPatientToCohort(api, cohort.uuid, patient.uuid);
cohortMember = await addPatientToCohort(api, cohort.uuid, patient.uuid);
await patientListPage.goto(cohort.uuid);
await expect(patientListPage.patientListHeader()).toHaveText(/1 patients/);
await expect(patientListPage.patientsTable()).toHaveText(new RegExp(patient.person.display));

// Remove a patient from the list
await removePatientFromCohort(api, createdCohortMember.uuid);
await removePatientFromCohort(api, cohortMember.uuid);
await patientListPage.goto(cohort.uuid);
await expect(patientListPage.patientListHeader()).toHaveText(/0 patients/);
createdCohortMember = null;
cohortMember = null;
});
});

test.afterEach(async ({ api }) => {
if (createdCohortMember) {
await removePatientFromCohort(api, createdCohortMember.uuid);
}
if (createdCohortUuid) {
await deleteCohort(api, createdCohortUuid);
if (cohortMember) {
await removePatientFromCohort(api, cohortMember.uuid);
}
await deleteCohort(api, cohortUuid);
await deletePatient(api, patient.uuid);
await deleteCohort(api, cohort.uuid);
});
4 changes: 1 addition & 3 deletions e2e/specs/register-new-patient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,5 @@ test('Register a new patient', async ({ page, api }) => {
});

test.afterEach(async ({ api }) => {
if (patientUuid) {
await deletePatient(api, patientUuid);
}
await deletePatient(api, patientUuid);
});
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@

.tile {
text-align: center;
border-bottom: 1px solid $ui-03;
}

.filterEmptyState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ const AppointmentsMetrics: React.FC<AppointmentMetricsProps> = ({ serviceUuid })
highestServiceLoad?.count !== 0 ? t(highestServiceLoad?.serviceName) : t('serviceName', 'Service name')
}
value={highestServiceLoad?.count ?? '--'}
headerLabel={t('highestServiceVolume', 'High volume service: {{time}}', { time: formattedStartDate })}
headerLabel={t('highestServiceVolume', 'Highest volume service: {{time}}', { time: formattedStartDate })}
/>
<MetricsCard
label={t('providers', 'Providers')}
value={totalProviders}
headerLabel={t('providersAvailableToday', 'Providers available: {{time}}', { time: formattedStartDate })}
headerLabel={t('providersBooked', 'Providers booked: {{time}}', { time: formattedStartDate })}
/>
</div>
</>
Expand Down
4 changes: 2 additions & 2 deletions packages/esm-appointments-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"errorCreatingAppointmentService": "Error creating appointment service",
"expected": "Expected",
"gender": "Gender",
"highestServiceVolume": "High volume service: {{time}}",
"highestServiceVolume": "Highest volume service: {{time}}",
"home": "Home",
"identifier": "Identifier",
"invalidNumber": "Number is not valid",
Expand Down Expand Up @@ -118,7 +118,7 @@
"prev": "Prev",
"provider": "Provider",
"providers": "Providers",
"providersAvailableToday": "Providers available: {{time}}",
"providersBooked": "Providers booked: {{time}}",
"queueAddedSuccessfully": "",
"queueEntryError": "Error adding patient to the queue",
"reasonForChanges": "Reason For Changes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const QueueTableByStatus: React.FC<QueueTableByStatusProps> = ({
const { t } = useTranslation();
const navigate = useNavigate();

const { queueEntries, isLoading } = useQueueEntries({ queue: selectedQueue.uuid });
const { queueEntries, isLoading } = useQueueEntries({ queue: selectedQueue.uuid, isEnded: false });
const allowedStatuses = selectedQueue.allowedStatuses;

const currentStatusUuid = selectedStatus?.uuid ?? allowedStatuses?.[0]?.uuid;
Expand Down
1 change: 1 addition & 0 deletions packages/esm-service-queues-app/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ export interface QueueEntrySearchCriteria {
location?: Array<string> | string;
service?: Array<string> | string;
status?: Array<string> | string;
isEnded: boolean;
}

// TODO: The follow types match the types from backend.
Expand Down

0 comments on commit 47daad4

Please sign in to comment.