diff --git a/.github/workflows/test-build-push.yml b/.github/workflows/test-build-push.yml index c4687bef..f6916d57 100644 --- a/.github/workflows/test-build-push.yml +++ b/.github/workflows/test-build-push.yml @@ -3,6 +3,10 @@ name: Test, Build and Publish on: push: workflow_dispatch: + inputs: + dockerTag: + description: If set, docker img is built and tagged accordingly + required: false env: REGISTRY: ghcr.io @@ -57,15 +61,15 @@ jobs: - name: Check licenses run: npm run license:check -# - name: Run tests -# run: npm run test:unit:once -# -# - name: Upload Test Results -# if: always() -# uses: actions/upload-artifact@v3 -# with: -# name: Test Results -# path: "target/testResults.xml" + # - name: Run tests + # run: npm run test:unit:once + # + # - name: Upload Test Results + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: Test Results + # path: "target/testResults.xml" - name: Run build run: npm run package @@ -73,7 +77,7 @@ jobs: build-and-push-image: name: Build and Push Docker Image runs-on: ubuntu-latest - if: (github.ref_type == 'branch' && github.ref_name == 'main') || (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')) + if: github.ref_name == 'main' || github.event.inputs.dockerTag != '' needs: - test permissions: @@ -97,7 +101,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=${{github.event.inputs.dockerTag || 'latest'}} type=ref,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} diff --git a/docs/gherkin/absolute-scheduler_after-cleanup.md b/docs/gherkin/absolute-scheduler_after-cleanup.md new file mode 100644 index 00000000..f012337c --- /dev/null +++ b/docs/gherkin/absolute-scheduler_after-cleanup.md @@ -0,0 +1,32 @@ +# Manual integration Test: Clean up absolute scheduler + +### Background: +- Study was created or exists. + +## Absolute Scheduler in SMF (updated version) + +| **Scenario** | **Given** | **Steps** | **Expected Result** | **Result** | **Note** | +|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Open absolute schedule dialog | Observation Dialog is open | | THEN the 'Manage absolute schedule' dialog opens. | as expected | | +| Enter start and end for the schedule. | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023. | | THEN the start date and time and the end date and time should be displayed as 23/11/2023, 10:00 and 30/11/2023, 18:00. | as expected | | +| Enter a start date that is after the end date. | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00. | | THEN both start and end date and time should display 26/11/2023, 12:00. | as expected | | +| Set entire day checkbox. | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00. | | THEN the start time is set to 00:00 and the end time is set to 23:59. | as expected | | +| Set Individual observation checkbox. | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00. | | THEN the End will be collapsed and it will show the start date 23/11/2023, with start time 12:00 and end time 15:00. The end date has been changed to the start date as well. | as expected | | +| Set Individual observation and entire day checkbox. | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00. | | THEN the end will be collapsed and it will show the start date 23/11/2023, with start time 00:00 and end time 23:59. The end date has been changed to the start date as well. | as expected | | +| Toggle Repeat observation | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00. | | THEN the repeat observation event option appears. | as expected | | +| Check repeat options. | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00.
Individual observation is checked. | | THEN a switch button with options Daily and Weekly appears. | as expected | | +| Check repeat error messages when daily is clicked. | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00.
Individual observation and repeat checkboxes are checked. | | THEN the repetition end options appear with Until end of study and after. A error message is displayed beneath that informs the user to set an end to the repetition period. | as expected | | +| Check repeat error messages when weekly is clicked. | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00.
Individual observation and repeat checkboxes are checked. | | THEN the Weekdays are displayed. Beneath them is an error message that reminds the user to set weekdays for the repetition
And the repetition end options appear with Until end of study and after. A error message is displayed beneath that informs the user to set an end to the repetition period. | as expected | | +| Check repeat error messages when weekly and weekdays are chosen. | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00.
Individual observation and repeat checkboxes are checked.
Weekly is chosen | | THEN the error beneath the weekdays dissapears. | as expected | | +| Check repeat error message when Repetition ends is chosen. - Until end of study | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00.
Individual observation and repeat checkboxes are checked. | | THEN all errors are gone from the 'Manage absolute schedule' dialog. | as expected | | +| Check repeat error messages when Repetition ends is chosen. - After | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00.
Individual observation and repeat checkboxes are checked. | | THEN and input field with either day(s) or week(s) (based on chosen repetition: daily, weekly) with an error message below is displayed. | as expected | | +| Check repeat error messages when Repetition ends is chosen. - After, count | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
start is set to 23.11.2023, 12:00 and end is set to 24.11.2023, 15:00.
Individual observation and repeat checkboxes are checked. | | THEN all errors are gone from the 'Manage absolute schedule' dialog. | 21.11.2023: BUG

22.11.2023: as expected | 21.11.2023: BUG-1: Absoule Schedule repeat values don't reset, when indeividual observation is unchecked
when one enters the dates as described, but in the same "session" (without saving and closing the manage absolute schedule dialog) had the individual observation, repeat Daily/weekly. Until end of study/after selected or filled out and THEN unchecks Individual Observation again and saves, all the repeat event values still get saved and displayed


22.11.2023: Bug was fixed. | +| Save absolute scheduler. - Start and end Date | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023. | | THEN the observation dialog should show the Absolute schedule preview with Start: 23/11/2023, 10:00 and End: 25/11/2023, 18:00 | as expected | | +| Save absolute scheduler. - Individual Observation | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023 | | THEN the observation dialog should show the Absolute schedule preview with Start: 23/11/2023, 11:00 and End: 23/11/2023, 15:00 | as expected | | +| Save absolute scheduler. - Entire Day | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023 | | THEN the observation dialog should show the Absolute schedule preview with Start: 23/11/2023, 00:00 and End: 25/11/2023, 23:59 | as expected | | +| Save absolute scheduler. - Repetition Daily, after | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
Initial values: Start: 23.11.2023, 11:00 and End: 23.11.2023, 15:00 | | THEN the observation dialog should show the Absolute schedule preview with Start: 23/11/2023, 11:00 and End: 23/11/2023, 15:00. And the repetition values of Every: day, Ends in 14 day(s). | as expected | | +| Save absolute scheduler. - Repetition Weekly, after | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
Initial values: Start: 23.11.2023, 11:00 and End: 23.11.2023, 15:00 | | THEN the observation dialog should show the Absolute schedule preview with Start: 23/11/2023, 11:00 and End: 23/11/2023, 15:00. And the repetition values of Every: week, Selected days: MO, WE, SA, Ends in 11 week(s). | 21.11.2023: BUG

22.11.2023: as expected | 21.11.2023: BUG-2: Absolute Schedule can be saved without After value (in specific situations)
In certain circumstances it is possible to save when no value is entered in the after section. In this case when one clicks the field (without entering anything) then clicks on until end of study. Then the error should go away. then the user can save without having anything entered.


22.11.2023: Bug was fixed. | +| Save absolute scheduler. - Repetition Daily, until study end | Manage absolute schedule dialog is open.
Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
Initial values: Start: 23.11.2023, 11:00 and End: 23.11.2023, 15:00 | | THEN the observation dialog should show the Absolute schedule preview with Start: 23/11/2023, 11:00 and End: 23/11/2023, 15:00. And the repetition values of Every: day, Ends on 'Date of Planned end of study' | as expected | | +| Save observation and check data. - Without repetition | Manage observation dialog is open.
Scheduler was entered with following values: Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
Initial values: Start: 23.11.2023, 11:00 and End: 23.11.2023, 15:00 | | THEN the observation dialog shows the absolute scheudle preview with following data: Start: 23/11/2023, 11:00 and End: 23/11/2023, 15:00 | as expected | | +| Save observation and check data. - With repetition | Manage observation dialog is open.
Scheduler was entered with following values: Planned study start is before 23.11.2023 and planned end is after 30.11.2023.
Initial values: Start: 23.11.2023, 11:00 and End: 23.11.2023, 15:00, repetition values: Every: week, Selected days: MO, WE, SA, Ends in 11 day(s). | | THEN the observation dialog shows the absolute scheudle preview with following data: Start: 23/11/2023, 11:00 and End: 23/11/2023, 15:00; Repetition values: Every: week, Selected days: MO, WE, SA, Ends in 11 day(s). | as expected | | + diff --git a/docs/gherkin/relative-scheduler_manual-integration-test.md b/docs/gherkin/relative-scheduler_manual-integration-test.md new file mode 100644 index 00000000..19de1bb2 --- /dev/null +++ b/docs/gherkin/relative-scheduler_manual-integration-test.md @@ -0,0 +1,80 @@ +# Manual integration Test for Relative Scheduler Feature + +### Background: +- Study was created or exists. + +## Realtive Scheduler in SMF + +| **Scenario** | **Given** | **Steps** | **Expected Result** | **Result** | **Notes** | +|-----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Open relative schedule dialog | Observation Dialog is open | | THEN the 'Manage relative schedule' dialog opens. | 21.11.2023: ✅ | Wording improvement implemented: | +| 'Save' start and end from 'Managae relative Schedule' dialog. | Manage relative schedule dialog is open. | | THEN the 'Manage relative schedule' dialog should close and the observation dialog should display the preview for 'Individual Event' under Scheduler with the entered values (Starsts on: Day 2, 9:00; Ends on: Day 3, 18:00). | 21.11.2023: ✅ | - | +| 'Save' observation with simple relative schedule. | Manage relative schedule dialog is open
and the values for starts on and ends on are already entered ('Starst on': Day 2, 9:00; 'Ends on': Day 3, 18:00). | | THEN the Observation List shown should update and show now the new created observation with the Schedule data: 'Type': Relative, 'Start': Day 2, 9:00; 'End': Day 3, 18:00 | 21.11.2023: ✅ | Wording improvement implemented:
| +| Check schedule data inside the observation dialog of observation in observation list, that has a relative schedule. | Observation list does have already an item inside the list that has a relative schedule. | | THEN the observatin dialog opens and shows the exact same data displayed inside the list for the schedule preview. | 21.11.2023: ✅ | - | +| Check schedule data inside the 'Manage relative Schedule' dialog of observation in observation list, that has a relative schedule | Observation list does have already an item inside the list that has a relative schedule. | | THEN the 'Manage relative schedule' dialog opens and shows the exact same data displayed inside the observation list for the scheduler values. |21.11.2023: ✅ | - | +| Cancel start and end from 'Manage relative Schedule' dialog. | Manage relative schedule dialog is open. No schedule was saved for that specific observation yet. | | THEN the 'Manage relative schedule' dialog should close and and the observation dialog should display no preview for the scheduled time. The default information text is displayed underneath of the Schedule title. | 21.11.2023: ✅ | - | +| Update relative schedule and add repetition. | Observation dialog is open and has already a relative schedule (initial values: 'Starst on': Day 2, 10:30; 'Ends on': Day 2, 18:30). | | THEN the observation dialog should list the individual event with Starts on Day 2, 10:30 and Ends on Day 2, 18:30, and the repeat event with Every 2 day(s) and ends on Day 9. | 21.11.2023: ✅ | - | +| Updating calculations when editing 'repeat event' | Manage relative schedule dialog is open.
Initial values entered: 'Starts on': 2 day, 10:30; 'Ends on': 2 day, 18:30 |