Skip to content

Commit

Permalink
chore: temp
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikhaugstulen committed Nov 14, 2023
1 parent e868c0b commit 2916968
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Feature: User interacts with tei working lists

Scenario: The TEI custom working can be shared
Given you open the main page with Ngelehun and Malaria focus investigation context
And you see the custom TEI working lists
And you can load the view with the name Events assigned to me
And you create a copy of the working list
When you change the sharing settings
Then you see the new sharing settings

Scenario: User opens the default working list for a tracker program
Given you open the main page with Ngelehun and child programme context
Then the default working list should be displayed
Expand Down Expand Up @@ -81,7 +89,7 @@ When you change rows per page to 10
Then the list should display 10 rows of data
And for a tracker program the page navigation should show that you are on the first page

Scenario: Show teis ordered ascendingly by first name
Scenario: Show teis ordered ascendingly by first name
Given you open the main page with Ngelehun and child programme context
When you click the first name column header
Then the sort arrow should indicate ascending order
Expand All @@ -93,13 +101,7 @@ Given you open the main page with Ngelehun and Malaria focus investigation conte
Then you see the custom TEI working lists
And you can load the view with the name Events assigned to me

Scenario: The TEI custom working can be shared
Given you open the main page with Ngelehun and Malaria focus investigation context
And you see the custom TEI working lists
And you can load the view with the name Events assigned to me
And you create a copy of the working list
When you change the sharing settings
Then you see the new sharing settings


Scenario: The user creates, updates and deletes a TEI custom working list
Given you open the main page with Ngelehun and Malaria case diagnosis context
Expand Down Expand Up @@ -139,7 +141,7 @@ And you select a data element columns and save from the column selector
Then you see data elements specific filters and columns

@v>=39
Scenario: While in a program stage working list, the user can filter by both TEA and data elements
Scenario: While in a program stage working list, the user can filter by both TEA and data elements
Given you open the main page with Ngelehun, WHO RMNCH Tracker and First antenatal care visit context
When you set the enrollment status filter to active
And you apply the current filter
Expand All @@ -152,7 +154,7 @@ And you apply the current filter
Then the list should display 1 row of data

@v>=39
Scenario: While in a program stage working list, the user can sort by both TEA and data elements
Scenario: While in a program stage working list, the user can sort by both TEA and data elements
Given you open the main page with Ngelehun, WHO RMNCH Tracker and First antenatal care visit context
And you set the first name filter to u
And you apply the current filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@ When('you open the column selector', () => {
});

When('you select the registering unit and save from the column selector', () => {
cy.get('div[role="dialog"]')
cy.get('[data-test="dhis2-uicore-modal"]')
.contains('Registering unit')
.find('input')
.click();

cy.get('div[role="dialog"]')
cy.get('[data-test="dhis2-uicore-modal"]')
.contains('Save')
.click();
});
Expand Down Expand Up @@ -544,27 +544,31 @@ Then('you see the new sharing settings', () => {
.click();
});

When('you create a copy of the working list', () => {
cy.get('[data-test="list-view-menu-button"]')
.click();
When('you create a copy of the working list',
() => {
cy.get('[data-test="list-view-menu-button"]')
.click();

cy.contains('Save current view as')
.click();
cy.contains('Save current view as')
.click();

const id = uuid();
cy.get('[data-test="view-name-content"]')
.type(id);
const id = uuid();
cy.get('[data-test="view-name-content"]')
.type(id);

cy.intercept('POST', '**/trackedEntityInstanceFilters**').as('newTrackerFilter');
cy.intercept('POST', '**/trackedEntityInstanceFilters**')
.as('newTrackerFilter');

cy.get('[data-test="dhis2-uicore-button"]')
.contains('Save')
.click();
cy.get('[data-test="column-selector-dialog"]')
.within(() => {
cy.get('[data-test="dhis2-uicore-button"]')
.click();
});

cy.wait('@newTrackerFilter', { timeout: 30000 });
cy.wait('@newTrackerFilter', { timeout: 30000 });

cy.reload();
});
cy.reload();
});

When('you open the program stage filters from the more filters dropdown menu', () => {
cy.get('[data-test="tei-working-lists"]')
Expand Down Expand Up @@ -602,12 +606,12 @@ When('you select the Foci response program stage', () => {
});

When('you select a data element columns and save from the column selector', () => {
cy.get('div[role="dialog"]')
cy.get('aside[role="dialog"]')
.contains('People included')
.find('input')
.click();

cy.get('div[role="dialog"]')
cy.get('aside[role="dialog"]')
.contains('Save')
.click();
});
Expand Down Expand Up @@ -663,12 +667,12 @@ Then('you see scheduledAt filter', () => {
});

When('you select a scheduledAt column and save from the column selector', () => {
cy.get('div[role="dialog"]')
cy.get('aside[role="dialog"]')
.contains('Appointment date')
.find('input')
.click();

cy.get('div[role="dialog"]')
cy.get('aside[role="dialog"]')
.contains('Save')
.click();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export const ColumnSelectorDialog = ({ columns, open, onClose, onSave }: Props)

return (
<span>
<Modal hide={!open} onClose={onClose}>
<Modal
hide={!open}
onClose={onClose}
dataTest={'column-selector-dialog'}
>
<ModalTitle>{i18n.t('Columns to show in table')}</ModalTitle>
<ModalContent>
<DragDropList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class ReviewDialogClass extends React.Component<Props > {
return (
<Modal
hide={!open}
dataTest={'duplicates-modal'}
onClose={onCancel}
>
<ReviewDialogContents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const ExistingTemplateDialog = (props: Props) => {
hide={!open}
onClose={onClose}
position={'center'}
dataTest={'existing-template-dialog'}
>
<ExistingTemplateContents
onSaveTemplate={onSaveTemplate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const styles = {
},
};

const SharingDialogPlain = ({ onClose, open, templateId, classes, templateSharingType }: Props) => {
const SharingDialogPlain = ({ onClose, open, templateId, classes, templateSharingType, dataTest }: Props) => {
const { refetch } = useDataQuery(
useMemo(
() => ({
Expand Down Expand Up @@ -61,6 +61,7 @@ const SharingDialogPlain = ({ onClose, open, templateId, classes, templateSharin
id={templateId}
onClose={handleClose}
className={classes.dialog}
dataTest={dataTest}
/> : null
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const TemplateMaintenancePlain = (props: Props, ref) => {
templateId={currentTemplate.id}
onClose={handleSetSharingSettings}
templateSharingType={templateSharingType}
dataTest={'sharing-dialog'}
/>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export type Props = {|
open: boolean,
templateId: string,
templateSharingType: string,
dataTest: string,
...CssClasses,
|};

0 comments on commit 2916968

Please sign in to comment.