Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [DHIS2-15633] Change comment to note #3549

Merged
merged 25 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9c36d63
fix: changed on all strings with translator
henrikmv Mar 1, 2024
5b0fe1e
fix: remove debugger
henrikmv Mar 1, 2024
663cc47
fix: merge conflict
henrikmv Mar 1, 2024
1be9c50
fix: add translator
henrikmv Mar 1, 2024
cc44889
fix: minor
JoakimSM Mar 19, 2024
18577b8
fix: cypress tests data-test prop
JoakimSM Mar 19, 2024
10a56ab
fix: merge conflict
henrikmv Apr 12, 2024
951c136
Merge remote-tracking branch 'origin/master' into hv/fix/DHIS2-15633_…
henrikmv Apr 19, 2024
7576482
Merge branch 'master' into hv/fix/DHIS2-15633_ChangeCommentToNote
henrikmv May 24, 2024
94cecf8
fix: update en.pot
henrikmv May 25, 2024
bde62b8
fix: remove dublicate from en.pot
henrikmv May 25, 2024
a849a7b
docs: [DHIS2-15633] change comment to note docs (#3649)
henrikmv May 27, 2024
0dadb76
Merge branch 'master' into hv/fix/DHIS2-15633_ChangeCommentToNote
henrikmv Jun 3, 2024
f2763e3
Merge remote-tracking branch 'origin/master' into hv/fix/DHIS2-15633_…
henrikmv Jun 19, 2024
f12ba6b
fix: merge conflict
henrikmv Jun 24, 2024
1cc09a5
fix: keep comment-item as data test prop
henrikmv Jun 26, 2024
02689f0
Merge remote-tracking branch 'origin/master' into hv/fix/DHIS2-15633_…
henrikmv Jun 28, 2024
bb0f503
fix: change from comment to note in code
henrikmv Jun 28, 2024
2408865
fix: typo
henrikmv Jul 1, 2024
c6c4a2f
Merge branch 'master' into hv/fix/DHIS2-15633_ChangeCommentToNote
henrikmv Jul 1, 2024
a3cd5ea
Merge remote-tracking branch 'origin/master' into hv/fix/DHIS2-15633_…
henrikmv Jul 3, 2024
0b62005
Merge remote-tracking branch 'origin/master' into hv/fix/DHIS2-15633_…
henrikmv Jul 5, 2024
69a76b1
Merge remote-tracking branch 'origin/master' into hv/fix/DHIS2-15633_…
henrikmv Jul 10, 2024
e124693
fix: dublicated newNoteButtonContainer class
henrikmv Jul 10, 2024
cfb1e55
fix: lint error
henrikmv Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Feature: User interacts with the Enrollment New Event Workspace
Given you land on the enrollment new event page by having typed /#/enrollmentEventNew?enrollmentId=qcFFRp7DpcX&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&stageId=edqlbukwRfQ&teiId=erqa3phUfpI
And you see the following Enrollment: New Event
And you select the schedule tab
When you add a comment to the event
When you add a note to the event
And the events saves successfully

Scenario: User can add a new event and complete the enrollment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ Given('you select the schedule tab', () => {
.click();
});

When('you add a comment to the event', () => {
cy.get('[data-test="comment-textfield"]')
.type('This is a comment')
When('you add a note to the event', () => {
cy.get('[data-test="note-textfield"]')
.type('This is a note')
.blur();

cy.get('[data-test="add-comment-btn"]')
cy.get('[data-test="add-note-btn"]')
.click();
});

Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/NewPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ And('you see the registration form for the Malaria case registration', () => {
.contains('Complete event')
.should('exist');
cy.get('[data-test="registration-page-content"]')
.contains('Comments')
.contains('Notes')
.should('exist');
cy.get('[data-test="registration-page-content"]')
.contains('Write comment')
.contains('Write note')
.should('exist');
cy.get('[data-test="registration-page-content"]')
.contains('Relationships')
Expand Down Expand Up @@ -292,10 +292,10 @@ And('you see the registration form for the specific category', () => {
.contains('Complete event')
.should('exist');
cy.get('[data-test="registration-page-content"]')
.contains('Comments')
.contains('Notes')
.should('exist');
cy.get('[data-test="registration-page-content"]')
.contains('Write comment')
.contains('Write note')
.should('exist');

cy.get('[data-test="dhis2-uicore-splitbutton"]')
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { When, Then } from '@badeball/cypress-cucumber-preprocessor';

Then('the stages and events should be loaded', () => {
cy.contains('Stages and Events').should('exist');
});

When(/^you fill in the note: (.*)$/, (note) => {
cy.get('[data-test="enrollment-note-widget"]').within(() => {
cy.get('[data-test="note-textfield"]').type(note);
cy.wait(100);

cy.get('[data-test="add-note-btn"]').should('exist');
cy.get('[data-test="add-note-btn"]').click();
});
});

Then(/^list should contain the new note: (.*)$/, (note) => {
cy.get('[data-test="enrollment-note-widget"]').within(() => {
cy.get('[data-test="note-item"]').contains(note).should('exist');
});
});

This file was deleted.

27 changes: 27 additions & 0 deletions cypress/e2e/WidgetsForEnrollmentPages/WidgetEventNote/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { When, Then } from '@badeball/cypress-cucumber-preprocessor';

Then('the enrollment widget should be loaded', () => {
cy.contains('The enrollment event data could not be found').should('not.exist');
});

When('you click edit mode', () => {
cy.contains('[data-test="dhis2-uicore-button"]', 'Edit event')
.click();
cy.contains('Enrollment: Edit Event').should('exist');
});

When(/^you fill in the note: (.*)$/, (note) => {
cy.get('[data-test="event-note-widget"]').within(() => {
cy.get('[data-test="note-textfield"]').type(note);
cy.wait(100);

cy.get('[data-test="add-note-btn"]').should('exist');
cy.get('[data-test="add-note-btn"]').click();
});
});

Then(/^list should contain the new note: (.*)$/, (note) => {
cy.get('[data-test="event-note-widget"]').within(() => {
cy.get('[data-test="note-item"]').contains(note).should('exist');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ Feature: The user interacts with the widgets on the enrollment dashboard
Scenario: User can add note on enrollment dashboard page
Given you land on the enrollment dashboard page by having typed #/enrollment?enrollmentId=wBU0RAsYjKE
Then the stages and events should be loaded
When you fill in the comment: new test enrollment comment
Then list should contain the new comment: new test enrollment comment
When you fill in the note: new test enrollment note
Then list should contain the new note: new test enrollment note

Scenario: The program rules are triggered and the effects are displayed in the sidebar widgets
Given you land on the enrollment dashboard page by having typed #/enrollment?enrollmentId=wBU0RAsYjKE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import moment from 'moment';
import '../sharedSteps';
import '../WidgetEnrollment';
import '../WidgetProfile';
import '../WidgetEnrollmentComment';
import '../WidgetEnrollmentNote';

When('the user sets the birthday date to the current date', () => {
cy.get('[data-test="modal-edit-profile"]').find('[data-test="capture-ui-input"]').eq(8).clear()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ Feature: The user interacts with the widgets on the enrollment edit event
Scenario: User can add note on edit event page view mode
Given you land on the enrollment edit event page by having typed /#/enrollmentEventEdit?eventId=XGLkLlOXgmE&orgUnitId=DiszpKrYNg8
Then the enrollment widget should be loaded
When you fill in the comment: new test comment
Then list should contain the new comment: new test comment
When you fill in the note: new test note
Then list should contain the new note: new test note

Scenario: User can see note on edit event page edit mode
Given you land on the enrollment edit event page by having typed /#/enrollmentEventEdit?eventId=XGLkLlOXgmE&orgUnitId=DiszpKrYNg8
Then the enrollment widget should be loaded
When you click edit mode
Then list should contain the new comment: new test comment
Then list should contain the new note: new test note

Scenario: You can assign a user to a event
Given you land on the enrollment edit event page by having typed /#/enrollmentEventEdit?eventId=veuwiLC2x0e&orgUnitId=g8upMTyEZGZ
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../sharedSteps';
import '../WidgetEnrollment';
import '../WidgetProfile';
import '../WidgetEventComment';
import '../WidgetEventNote';
import '../WidgetAssignee';
import '../WidgetChangelog';

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/resources/images/schedule_event_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/resources/images/schedule_event_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 11 additions & 10 deletions docs/user/using-the-capture-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ In the Capture app you register events that occurred at a particular time and pl
the field. This will open a map where you can search for a location and capture
a polygon (button in the upper right corner of the map).

7. If desired you can add a comment by clicking the **Write comment** button at the bottom of the form. Note that Event comments are attributed to a user and cannot be deleted.
7. If desired, you can add a note by clicking the **Write note** button at the bottom of the form. Be aware that Event notes are attributed to a user and cannot be deleted.

8. If desired you can add a relationship by clicking the **Add relationship** button at the bottom of the form.
See the section about **Adding a relationship** for more information.
Expand Down Expand Up @@ -120,7 +120,7 @@ The second option, is to register a tracked entity instance with program and enr

3. Select a tracker program of your choice.

4. Click **Create new person**. Please note that the label of this button corresponds to the tracked entity type of the program, which could vary, such as "Building," "Person," etc.
4. Click **Create new person**. Note that the label of this button corresponds to the tracked entity type of the program, which could vary, such as "Building," "Person," etc.

![create new event](resources/images/register-and-enroll-program-selection.png)

Expand Down Expand Up @@ -233,7 +233,7 @@ When the "Scheduled days from start" does not contain a number or contains 0 the
### Possible duplicates detection

In both cases of registering a tracked entity instance, (with enrollment or without enrollment) the system will start looking for possible duplicates.
Note that, programs need to be correctly configured through the maintenance app for the system to start detecting duplicates when enrolling a new person in a program.
Note that programs need to be correctly configured through the maintenance app for the system to start detecting duplicates when enrolling a new person in a program.

To configure a program through the maintenance app you will have to:

Expand Down Expand Up @@ -280,8 +280,8 @@ Click **Save person**. The system will start looking for possible duplicates tha

### Program rules execution

In both cases of registering a tracked entity instance, (with enrollment or without enrollment) the system will run program rules you have configured.
Note that, rules can be configured in the maintenance app.
In both cases of registering a tracked entity instance (with enrollment or without enrollment), the system will run program rules you have configured.
Note that rules can be configured in the maintenance app.

To see a rule being executed while enrolling a tracked entity instance you will have to take the following steps.

Expand Down Expand Up @@ -1002,13 +1002,14 @@ You can complete the enrollment by clicking the complete button. When there are

![](resources/images/enrollment-dash-enrollment-widget-4.png)

### Enrollment comment widget
### Enrollment note widget

![](resources/images/enrollment-widget-comment.png)
The enrollment note widget displays notes and allows addition of notes, associated with the current enrollment.

The enrollment comment widget displays comments and allows addition of comments, associated with the current enrollment.
![](resources/images/enrollment-widget-note.png)

By clicking in the text field, you will be able to enter new text and see action buttons **Save note** and **Cancel**. Be aware that Enrollment notes are attributed to a user and cannot be deleted.

By clicking in the text field, you will be able to enter new text and see action buttons **Save comment** and **Cancel**. Note that Enrollment comments are attributed to a user and cannot be deleted.

### Relationship widget

Expand Down Expand Up @@ -1268,7 +1269,7 @@ If a program stage has a default next scheduled date configured, the suggested d

User can also find more information about how many events that scheduled on the same selected date or the interval of selected date and the suggested date from the information box.

Below the schedule date entry, user can choose to add a comment to the scheduled event.
Below the schedule date entry, user can choose to add a note to the scheduled event.

After clicking **Schedule** button, user will be navigated back to enrollment overview page.

Expand Down
Loading
Loading