diff --git a/.github/workflows/argo.yml b/.github/workflows/argo.yml index 3162be4150..88c7e32f7f 100644 --- a/.github/workflows/argo.yml +++ b/.github/workflows/argo.yml @@ -35,11 +35,18 @@ on: - E2E-A/E2E-B - int-a/int-b testdata_version: - description: Which Testdata Version CX_Testdata_MessagingTest_v.json + description: Which Testdata Version CX_Testdata_MessagingTest_v.json e.g., 1.1.12" required: true argo_token: description: Argo Token required: true + hard_refresh: + type: choice + description: Do you want a Hard Refresh? (+5min execution time) + required: true + options: + - Yes + - No env: ARGO_TEST_REGISTRY: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-dt-registry-test" @@ -73,14 +80,58 @@ env: ARGO_INT_B_RegistryReload: "https://traceability-int-b.int.demo.catena-x.net/api/registry/reload" jobs: + test_input: + runs-on: ubuntu-latest + steps: + + - name: Checkout-Repository + uses: actions/checkout@v4 + - name: mask token + run: | + ARGO_TOKEN=$(jq -r '.inputs.argo_token' $GITHUB_EVENT_PATH) + echo ::add-mask::$ARGO_TOKEN + echo ARGO_TOKEN=$ARGO_TOKEN >> $GITHUB_ENV + + - name: Check Testdata Version Format + run: | + if [[ ! "${{ github.event.inputs.testdata_version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Invalid Testdata Version format. Please use X.X.X, e.g., 1.1.12" + exit 1 + fi + + - name: Check Argo Token + run: | + + source ./.github/argo/argo_config.sh + + if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then + resources="${DEV_TEST_RESOURCES[2]}" + elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then + resources="${E2E_RESOURCES[2]}" + elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then + resources="${INT_RESOURCES[2]}" + fi + + data=$(curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resources") + status_app=$(echo "$data" | jq -r '.status.sync.status') + if [ $status_app != null ]; then + echo "Argo Token is valid." + else + echo "Argo Token is invalid." + exit 1 + fi + + print_environment: + needs: test_input runs-on: ubuntu-latest steps: - name: ${{ github.event.inputs.environment }} run: | echo "### inputs" >> $GITHUB_STEP_SUMMARY echo "- environment: ${{ github.event.inputs.environment }}" >> $GITHUB_STEP_SUMMARY + hard_refresh_environment: needs: print_environment @@ -100,19 +151,23 @@ jobs: run: | source ./.github/argo/argo_config.sh - if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then - resources=("${DEV_TEST_RESOURCES[@]}") - elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then - resources=("${E2E_RESOURCES[@]}") - elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then - resources=("${INT_RESOURCES[@]}") + if [ "${{ github.event.inputs.hard_refresh }}" == "true" ]; then + if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then + resources=("${DEV_TEST_RESOURCES[@]}") + elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then + resources=("${E2E_RESOURCES[@]}") + elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then + resources=("${INT_RESOURCES[@]}") + fi + + for resource in "${resources[@]}"; do + curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resource?refresh=hard&appNamespace=argocd" + done + sleep 40 + elif [ "${{ github.event.inputs.hard_refresh }}" == "false" ]; then + echo "Hard refresh skipped" fi - for resource in "${resources[@]}"; do - curl -X GET -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" "$resource?refresh=hard&appNamespace=argocd" - done - sleep 40 - delete_environment: needs: hard_refresh_environment runs-on: ubuntu-latest @@ -168,14 +223,14 @@ jobs: old_TargetRevision2=$(echo "$json_data2" | jq -r '.spec.source.targetRevision') if [ "$old_TargetRevision1" != "$new_target_revision" ]; then - updated_json=$(echo "$json_data1" | jq ".spec.source.targetRevision = \"$new_target_revision\"") - curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json" "$ARGO_TEST_TRACE_X_INSTANCE" + updated_json1=$(echo "$json_data1" | jq ".spec.source.targetRevision = \"$new_target_revision\"") + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json1" "$ARGO_TEST_TRACE_X_INSTANCE" echo "Target Revision for Test overwritten" fi if [ "$old_TargetRevision2" != "$new_target_revision" ]; then - updated_json=$(echo "$json_data2" | jq ".spec.source.targetRevision = \"$new_target_revision\"") - curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json" "$ARGO_DEV_TRACE_X_INSTANCE" + updated_json2=$(echo "$json_data2" | jq ".spec.source.targetRevision = \"$new_target_revision\"") + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json2" "$ARGO_DEV_TRACE_X_INSTANCE" echo "Target Revision for Dev overwritten" fi @@ -188,14 +243,14 @@ jobs: old_TargetRevision2=$(echo "$json_data2" | jq -r '.spec.source.targetRevision') if [ "$old_TargetRevision1" != "$new_target_revision" ]; then - updated_json=$(echo "$json_data1" | jq ".spec.source.targetRevision = \"$new_target_revision\"") - curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json" "$ARGO_E2E_A_TRACE_X_INSTANCE" + updated_json1=$(echo "$json_data1" | jq ".spec.source.targetRevision = \"$new_target_revision\"") + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json1" "$ARGO_E2E_A_TRACE_X_INSTANCE" echo "Target Revision for e2e-a overwritten" fi if [ "$old_TargetRevision2" != "$new_target_revision" ]; then - updated_json=$(echo "$json_data2" | jq ".spec.source.targetRevision = \"$new_target_revision\"") - curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json" "$ARGO_E2E_B_TRACE_X_INSTANCE" + updated_json2=$(echo "$json_data2" | jq ".spec.source.targetRevision = \"$new_target_revision\"") + curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${{ env.ARGO_TOKEN }}" -d "$updated_json2" "$ARGO_E2E_B_TRACE_X_INSTANCE" echo "Target Revision for e2e-b overwritten" fi diff --git a/CHANGELOG.md b/CHANGELOG.md index b6be93fa59..0db049aa8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - - ## [UNRELEASED - DD.MM.YYYY] + +## [10.0.0 - 12.12.2024] ### Added - new filtering capabilities ( receivedQualityAlertIdsInStatusActive, sentQualityAlertIdsInStatusActive, receivedQualityInvestigationIdsInStatusActive, sentQualityInvestigationIdsInStatusActive ) - Validation check if table-settings correct and reset on invalid state @@ -19,6 +19,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Added BPN column to parts table - Emit change check to observables in frontend - Added an Entity Relationship Model (ERM) into the Architecture Documentation to visually represent our tables and their relationships. +- Added a step for testing input and included an option for a hard refresh in Argo Workflow - Added manufacturer_id to assets_as_planned - Added local filtering and auto complete for notifications diff --git a/charts/traceability-foss/Chart.yaml b/charts/traceability-foss/Chart.yaml index ba2d410693..17c4ff268f 100644 --- a/charts/traceability-foss/Chart.yaml +++ b/charts/traceability-foss/Chart.yaml @@ -23,15 +23,15 @@ home: https://eclipse-tractusx.github.io/ sources: - https://github.com/eclipse-tractusx/traceability-foss type: application -version: 1.3.22 -appVersion: "9.0.0-rc3" +version: 1.3.24 +appVersion: "10.0.0" dependencies: - name: frontend repository: "file://charts/frontend" - version: 1.3.22 + version: 1.3.24 - name: backend repository: "file://charts/backend" - version: 1.3.22 + version: 1.3.24 - name: postgresql repository: https://charts.bitnami.com/bitnami version: 12.1.6 diff --git a/charts/traceability-foss/charts/backend/Chart.yaml b/charts/traceability-foss/charts/backend/Chart.yaml index 8a156a4e1f..fe49de5f9b 100644 --- a/charts/traceability-foss/charts/backend/Chart.yaml +++ b/charts/traceability-foss/charts/backend/Chart.yaml @@ -18,10 +18,10 @@ # apiVersion: v2 name: backend -description: A Helm chart for Traceability backend application +description: A Helm chart for Traceability backend application. type: application -version: 1.3.22 -appVersion: "9.0.0-rc3" +version: 1.3.24 +appVersion: "10.0.0" dependencies: - name: postgresql repository: https://charts.bitnami.com/bitnami diff --git a/charts/traceability-foss/charts/frontend/Chart.yaml b/charts/traceability-foss/charts/frontend/Chart.yaml index 19c1f0b8bf..10a21a36c0 100644 --- a/charts/traceability-foss/charts/frontend/Chart.yaml +++ b/charts/traceability-foss/charts/frontend/Chart.yaml @@ -18,7 +18,7 @@ # apiVersion: v2 name: frontend -description: A Helm chart for Traceability frontend application +description: A Helm chart for Traceability frontend application. type: application -version: 1.3.22 -appVersion: "9.0.0-rc3" +version: 1.3.24 +appVersion: "10.0.0" diff --git a/frontend/package.json b/frontend/package.json index a1ec4a0d15..f16ef8d94a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name" : "trace-x", - "version" : "9.0.0-rc3", + "version" : "10.0.0", "scripts" : { "analyze" : "ng build --configuration=production --stats-json && webpack-bundle-analyzer dist/stats.json", "build:prod" : "ng build --output-hashing=all --configuration=debugProd --base-href /{baseHrefPlaceholder}/ --deploy-url /{baseHrefPlaceholder}/ ", diff --git a/frontend/src/app/modules/page/alerts/presentation/alerts.component.ts b/frontend/src/app/modules/page/alerts/presentation/alerts.component.ts index 5fcf87536b..5e2f4fedd9 100644 --- a/frontend/src/app/modules/page/alerts/presentation/alerts.component.ts +++ b/frontend/src/app/modules/page/alerts/presentation/alerts.component.ts @@ -17,21 +17,24 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ChangeDetectorRef, Component, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { ALERT_BASE_ROUTE, getRoute } from '@core/known-route'; -import { AlertDetailFacade } from '@page/alerts/core/alert-detail.facade'; -import { AlertHelperService } from '@page/alerts/core/alert-helper.service'; -import { AlertsFacade } from '@page/alerts/core/alerts.facade'; -import { NotificationMenuActionsAssembler } from '@shared/assembler/notificationMenuActions.assembler'; -import { NotificationCommonModalComponent } from '@shared/components/notification-common-modal/notification-common-modal.component'; -import { TableSortingUtil } from '@shared/components/table/table-sorting.util'; -import { MenuActionConfig, TableEventConfig, TableHeaderSort } from '@shared/components/table/table.model'; -import { createDeeplinkNotificationFilter } from '@shared/helper/notification-helper'; -import { NotificationTabInformation } from '@shared/model/notification-tab-information'; -import { Notification, NotificationStatusGroup, NotificationType } from '@shared/model/notification.model'; -import { TranslationContext } from '@shared/model/translation-context.model'; -import { Subscription } from 'rxjs'; +import {ChangeDetectorRef, Component, ViewChild} from '@angular/core'; +import {ActivatedRoute, Router} from '@angular/router'; +import {ALERT_BASE_ROUTE, getRoute} from '@core/known-route'; +import {AlertDetailFacade} from '@page/alerts/core/alert-detail.facade'; +import {AlertHelperService} from '@page/alerts/core/alert-helper.service'; +import {AlertsFacade} from '@page/alerts/core/alerts.facade'; +import {NotificationMenuActionsAssembler} from '@shared/assembler/notificationMenuActions.assembler'; +import { + NotificationCommonModalComponent +} from '@shared/components/notification-common-modal/notification-common-modal.component'; +import {TableSortingUtil} from '@shared/components/table/table-sorting.util'; +import {MenuActionConfig, TableEventConfig, TableHeaderSort} from '@shared/components/table/table.model'; +import {createDeeplinkNotificationFilter} from '@shared/helper/notification-helper'; +import {NotificationTabInformation} from '@shared/model/notification-tab-information'; +import {Notification, NotificationStatusGroup, NotificationType} from '@shared/model/notification.model'; +import {TranslationContext} from '@shared/model/translation-context.model'; +import {Subscription} from 'rxjs'; +import {NotificationChannel} from "@shared/components/multi-select-autocomplete/table-type.model"; @Component({ selector: 'app-alerts', @@ -133,7 +136,7 @@ export class AlertsComponent { protected readonly NotificationType = NotificationType; filterNotifications(filterContext: any) { - if(filterContext.channel === 'RECEIVER') { + if(filterContext.channel === NotificationChannel.RECEIVER) { this.alertsFacade.setReceivedAlerts(this.pagination.page, this.pagination.pageSize, this.alertReceivedSortList,null, filterContext.filter); } else { this.alertsFacade.setQueuedAndRequestedAlerts(this.pagination.page, this.pagination.pageSize, this.alertQueuedAndRequestedSortList, null, filterContext.filter); diff --git a/frontend/src/app/modules/page/investigations/presentation/investigations.component.ts b/frontend/src/app/modules/page/investigations/presentation/investigations.component.ts index bb2326c9f3..a2862e1ccd 100644 --- a/frontend/src/app/modules/page/investigations/presentation/investigations.component.ts +++ b/frontend/src/app/modules/page/investigations/presentation/investigations.component.ts @@ -19,21 +19,24 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { ChangeDetectorRef, Component, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { getRoute, INVESTIGATION_BASE_ROUTE } from '@core/known-route'; -import { InvestigationDetailFacade } from '@page/investigations/core/investigation-detail.facade'; -import { InvestigationHelperService } from '@page/investigations/core/investigation-helper.service'; -import { NotificationMenuActionsAssembler } from '@shared/assembler/notificationMenuActions.assembler'; -import { NotificationCommonModalComponent } from '@shared/components/notification-common-modal/notification-common-modal.component'; -import { TableSortingUtil } from '@shared/components/table/table-sorting.util'; -import { MenuActionConfig, TableEventConfig, TableHeaderSort } from '@shared/components/table/table.model'; -import { createDeeplinkNotificationFilter } from '@shared/helper/notification-helper'; -import { NotificationTabInformation } from '@shared/model/notification-tab-information'; -import { Notification, NotificationStatusGroup, NotificationType } from '@shared/model/notification.model'; -import { TranslationContext } from '@shared/model/translation-context.model'; -import { Subscription } from 'rxjs'; -import { InvestigationsFacade } from '../core/investigations.facade'; +import {ChangeDetectorRef, Component, ViewChild} from '@angular/core'; +import {ActivatedRoute, Router} from '@angular/router'; +import {getRoute, INVESTIGATION_BASE_ROUTE} from '@core/known-route'; +import {InvestigationDetailFacade} from '@page/investigations/core/investigation-detail.facade'; +import {InvestigationHelperService} from '@page/investigations/core/investigation-helper.service'; +import {NotificationMenuActionsAssembler} from '@shared/assembler/notificationMenuActions.assembler'; +import { + NotificationCommonModalComponent +} from '@shared/components/notification-common-modal/notification-common-modal.component'; +import {TableSortingUtil} from '@shared/components/table/table-sorting.util'; +import {MenuActionConfig, TableEventConfig, TableHeaderSort} from '@shared/components/table/table.model'; +import {createDeeplinkNotificationFilter} from '@shared/helper/notification-helper'; +import {NotificationTabInformation} from '@shared/model/notification-tab-information'; +import {Notification, NotificationStatusGroup, NotificationType} from '@shared/model/notification.model'; +import {TranslationContext} from '@shared/model/translation-context.model'; +import {Subscription} from 'rxjs'; +import {InvestigationsFacade} from '../core/investigations.facade'; +import {NotificationChannel} from "@shared/components/multi-select-autocomplete/table-type.model"; @Component({ selector: 'app-investigations', @@ -130,7 +133,7 @@ export class InvestigationsComponent { protected readonly NotificationType = NotificationType; filterNotifications(filterContext: any) { - if(filterContext.channel === 'RECEIVER') { + if(filterContext.channel === NotificationChannel.RECEIVER) { this.investigationsFacade.setReceivedInvestigation(this.pagination.page, this.pagination.pageSize, this.investigationReceivedSortList, null, filterContext.filter /*Filter */); } else { diff --git a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts index d389895129..dfdd3acfed 100644 --- a/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts +++ b/frontend/src/app/modules/shared/components/multi-select-autocomplete/multi-select-autocomplete.component.ts @@ -17,22 +17,24 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { DatePipe, registerLocaleData } from '@angular/common'; +import {DatePipe, registerLocaleData} from '@angular/common'; import localeDe from '@angular/common/locales/de'; import localeDeExtra from '@angular/common/locales/extra/de'; -import { Component, EventEmitter, Inject, Injector, Input, LOCALE_ID, OnChanges, ViewChild } from '@angular/core'; -import { FormControl } from '@angular/forms'; -import { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core'; -import { MatDatepickerInputEvent } from '@angular/material/datepicker'; -import { MatSelectChange } from '@angular/material/select'; +import {Component, EventEmitter, Inject, Injector, Input, LOCALE_ID, OnChanges, ViewChild} from '@angular/core'; +import {FormControl} from '@angular/forms'; +import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core'; +import {MatDatepickerInputEvent} from '@angular/material/datepicker'; +import {MatSelectChange} from '@angular/material/select'; import { AutocompleteStrategy, AutocompleteStrategyMap, } from '@shared/components/multi-select-autocomplete/autocomplete-strategy'; -import { TableType } from '@shared/components/multi-select-autocomplete/table-type.model'; -import { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; -import { PartsService } from '@shared/service/parts.service'; -import { firstValueFrom } from 'rxjs'; +import {TableType} from '@shared/components/multi-select-autocomplete/table-type.model'; +import { + FormatPartSemanticDataModelToCamelCasePipe +} from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; +import {PartsService} from '@shared/service/parts.service'; +import {firstValueFrom} from 'rxjs'; @Component({ selector: 'app-multiselect', @@ -167,7 +169,7 @@ export class MultiSelectAutocompleteComponent implements OnChanges { if (this.selectedValue?.length > 1) { suffix = (' + ' + (this.selectedValue?.length - 1)) + ' ' + this.placeholderMultiple; } - debugger; + // apply CamelCase to semanticDataModel labels if (this.filterColumn === 'semanticDataModel') { displayValue = [ this.formatPartSemanticDataModelToCamelCasePipe.transformModel(this.selectedValue[0]), suffix ]; diff --git a/frontend/src/app/modules/shared/modules/notification/notification-tab/notification-tab.component.ts b/frontend/src/app/modules/shared/modules/notification/notification-tab/notification-tab.component.ts index 029631f531..9570f7f57d 100644 --- a/frontend/src/app/modules/shared/modules/notification/notification-tab/notification-tab.component.ts +++ b/frontend/src/app/modules/shared/modules/notification/notification-tab/notification-tab.component.ts @@ -20,7 +20,7 @@ ********************************************************************************/ import {AfterViewInit, Component, EventEmitter, Input, Output, TemplateRef, ViewChild} from '@angular/core'; -import {TableType} from '@shared/components/multi-select-autocomplete/table-type.model'; +import {NotificationChannel, TableType} from '@shared/components/multi-select-autocomplete/table-type.model'; import { CreateHeaderFromColumns, DisplayColumns, @@ -96,7 +96,7 @@ export class NotificationTabComponent implements AfterViewInit { filterActivated(notificationFilter: any): void { this.notificationFilter = notificationFilter; - const channel = notificationFilter['createdBy'] ? 'RECEIVER' : 'SENDER'; + const channel = notificationFilter['createdBy'] ? NotificationChannel.RECEIVER : NotificationChannel.SENDER; if (this.notificationType === NotificationType.INVESTIGATION) { this.investigationsFilterChanged.emit({ channel: channel, diff --git a/frontend/src/app/modules/shared/modules/notification/presentation/notification.component.spec.ts b/frontend/src/app/modules/shared/modules/notification/presentation/notification.component.spec.ts index daea04c84d..575d08ab77 100644 --- a/frontend/src/app/modules/shared/modules/notification/presentation/notification.component.spec.ts +++ b/frontend/src/app/modules/shared/modules/notification/presentation/notification.component.spec.ts @@ -19,23 +19,27 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { CalendarDateModel } from '@core/model/calendar-date.model'; +import {CalendarDateModel} from '@core/model/calendar-date.model'; import { Notification, NotificationResponse, Notifications, - NotificationStatus, NotificationType, + NotificationStatus, + NotificationType, } from '@shared/model/notification.model'; -import { View } from '@shared/model/view.model'; -import { FormatPartSemanticDataModelToCamelCasePipe } from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; -import { SharedModule } from '@shared/shared.module'; -import { TemplateModule } from '@shared/template.module'; -import { fireEvent, screen, within } from '@testing-library/angular'; -import { renderComponent } from '@tests/test-render.utils'; -import { Observable, of } from 'rxjs'; -import { delay } from 'rxjs/operators'; -import { buildMockInvestigations } from '../../../../../mocks/services/investigations-mock/investigations.test.model'; -import { NotificationModule } from '../notification.module'; +import {View} from '@shared/model/view.model'; +import { + FormatPartSemanticDataModelToCamelCasePipe +} from '@shared/pipes/format-part-semantic-data-model-to-camelcase.pipe'; +import {SharedModule} from '@shared/shared.module'; +import {TemplateModule} from '@shared/template.module'; +import {fireEvent, screen, within} from '@testing-library/angular'; +import {renderComponent} from '@tests/test-render.utils'; +import {Observable, of} from 'rxjs'; +import {delay} from 'rxjs/operators'; +import {buildMockInvestigations} from '../../../../../mocks/services/investigations-mock/investigations.test.model'; +import {NotificationModule} from '../notification.module'; +import {NotificationChannel} from "@shared/components/multi-select-autocomplete/table-type.model"; describe('NotificationsInboxComponent', () => { let clickHandler; @@ -43,7 +47,7 @@ describe('NotificationsInboxComponent', () => { beforeEach(() => (clickHandler = jasmine.createSpy())); const mapNotificationResponse = (data: NotificationResponse): Notification => { - const isFromSender = data.channel === 'SENDER'; + const isFromSender = data.channel === NotificationChannel.SENDER; const createdDate = new CalendarDateModel(data.createdDate); const targetDate = new CalendarDateModel(data.targetDate); const createdBy = data.createdBy