From 4ebacfa32c724baec3e16d39a90d148e3f522578 Mon Sep 17 00:00:00 2001 From: Jannik Pulfer Date: Tue, 17 Dec 2024 15:08:44 +0100 Subject: [PATCH 01/39] Refactor naming in backend and in cypress dir in frontend --- ...ToProject.yml => add-issue-to-project.yml} | 0 .run/OkrApplication-E2E.run.xml | 2 +- .../okr/controller/CheckInController.java | 2 +- .../controller/ClientConfigController.java | 8 +- .../okr/controller/ObjectiveController.java | 8 +- .../puzzle/okr/controller/TeamController.java | 2 +- .../puzzle/okr/controller/UserController.java | 11 +- .../java/ch/puzzle/okr/dto/ActionDto.java | 2 +- .../java/ch/puzzle/okr/dto/NewUserDto.java | 2 +- .../java/ch/puzzle/okr/dto/ObjectiveDto.java | 2 +- .../main/java/ch/puzzle/okr/dto/TeamDto.java | 2 +- .../main/java/ch/puzzle/okr/dto/UserDto.java | 2 +- .../okr/dto/checkin/CheckInMetricDto.java | 2 +- .../okr/dto/checkin/CheckInOrdinalDto.java | 2 +- .../okr/dto/keyresult/KeyResultMetricDto.java | 4 +- .../dto/keyresult/KeyResultOrdinalDto.java | 2 +- .../okr/dto/keyresult/KeyResultUserDto.java | 2 +- .../puzzle/okr/dto/overview/DashboardDto.java | 6 - .../puzzle/okr/dto/overview/OverviewDto.java | 2 +- .../UserKeyResultDataDto.java | 2 +- .../UserOkrDataDto.java | 2 +- .../ch/puzzle/okr/mapper/ActionMapper.java | 2 +- .../java/ch/puzzle/okr/mapper/UserMapper.java | 10 +- .../puzzle/okr/mapper/UserOkrDataMapper.java | 4 +- .../keyresult/KeyResultMetricMapper.java | 4 +- .../keyresult/KeyResultOrdinalMapper.java | 4 +- .../java/ch/puzzle/okr/models/Action.java | 20 +- .../main/java/ch/puzzle/okr/models/User.java | 60 +- .../java/ch/puzzle/okr/models/UserTeam.java | 22 +- .../okr/multitenancy/HibernateContext.java | 2 +- .../TenantClientCustomizationProvider.java | 2 +- .../AlignmentSelectionRepository.java | 4 +- .../puzzle/okr/repository/UserRepository.java | 2 +- .../ch/puzzle/okr/security/JwtHelper.java | 16 +- .../ch/puzzle/okr/service/CacheService.java | 2 +- .../AuthorizationRegistrationService.java | 22 +- .../authorization/AuthorizationService.java | 8 +- .../UserAuthorizationService.java | 11 +- .../business/ObjectiveBusinessService.java | 10 +- .../business/QuarterBusinessService.java | 4 +- .../service/business/TeamBusinessService.java | 32 +- .../service/business/UserBusinessService.java | 10 +- .../clientconfig/ClientConfigService.java | 10 +- .../persistence/AuthorizationCriteria.java | 22 +- .../persistence/UserPersistenceService.java | 2 +- .../util/quarter/generate/QuarterLabel.java | 18 +- .../quarter/generate/h2/QuarterFunction.java | 20 +- .../main/resources/application-dev.properties | 6 +- .../application-integration-test.properties | 6 +- .../resources/application-prod.properties | 2 +- .../resources/application-staging.properties | 2 +- .../src/main/resources/application.properties | 10 +- .../afterMigrate__0_initialData.sql | 2 +- .../h2-db/data-test-h2/V100_0_0__TestData.sql | 6 +- .../V1_0_0__current-db-schema-for-testing.sql | 10 +- .../V3_1_0__renameBooleanColumns.sql | 8 + .../V3_2_0__renameFirstAndLastNameColumns.sql | 4 + .../puzzle/okr/SpringCachingConfigTest.java | 12 +- .../ch/puzzle/okr/UserKeyGeneratorTest.java | 2 +- .../okr/architecture/OkrArchitectureTest.java | 22 +- .../okr/controller/ActionControllerIT.java | 10 +- .../okr/controller/CheckInControllerIT.java | 22 +- .../controller/ClientConfigControllerIT.java | 4 +- .../okr/controller/KeyResultControllerIT.java | 42 +- .../okr/controller/ObjectiveControllerIT.java | 20 +- .../okr/controller/TeamControllerIT.java | 20 +- .../okr/controller/UserControllerIT.java | 48 +- .../puzzle/okr/mapper/ActionMapperTest.java | 8 +- .../okr/mapper/CompletedMapperTest.java | 2 +- .../ch/puzzle/okr/mapper/TeamMapperTest.java | 2 +- .../ch/puzzle/okr/mapper/UserMapperTest.java | 24 +- .../mapper/checkin/helper/AssertHelper.java | 4 +- .../mapper/keyresult/helper/AssertHelper.java | 8 +- .../keyresult/helper/TestDataConstants.java | 4 +- .../keyresult/helper/TestDataDtoHelper.java | 4 +- .../keyresult/helper/TestDataHelper.java | 8 +- .../authorization/AuthorizationUserTest.java | 16 +- ...TenantConnectionProviderInternalsTest.java | 4 +- .../TenantConfigProviderTestIT.java | 10 +- .../okr/multitenancy/TenantContextTest.java | 2 +- ...nantClientCustomizationProviderTestIT.java | 4 +- .../ch/puzzle/okr/security/JwtHelperTest.java | 20 +- .../TenantJwtIssuerValidatorTest.java | 4 +- .../okr/security/helper/ClaimHelperTest.java | 28 +- .../okr/security/helper/TokenHelperTest.java | 24 +- .../okr/security/helper/UrlHelperTest.java | 12 +- .../ActionAuthorizationServiceTest.java | 4 +- .../AuthorizationRegistrationServiceIT.java | 32 +- .../AuthorizationServiceTest.java | 8 +- .../TeamAuthorizationServiceTest.java | 4 +- .../UserAuthorizationServiceTest.java | 10 +- .../authorization/UserUpdateHelperTest.java | 12 +- .../business/ActionBusinessServiceTest.java | 18 +- .../business/CheckInBusinessServiceTest.java | 2 +- .../CompletedBusinessServiceTest.java | 2 +- .../business/KeyResultBusinessServiceIT.java | 28 +- .../KeyResultBusinessServiceTest.java | 26 +- .../ObjectiveBusinessServiceTest.java | 22 +- .../business/OverviewBusinessServiceTest.java | 19 +- .../business/QuarterBusinessServiceTest.java | 13 +- .../business/TeamBusinessServiceTest.java | 42 +- .../business/UserBusinessServiceTest.java | 48 +- .../clientconfig/ClientConfigServiceIT.java | 6 +- .../ActionPersistenceServiceIT.java | 2 +- .../AuthorizationCriteriaParametersTest.java | 6 +- .../AuthorizationCriteriaTest.java | 6 +- .../CheckInPersistenceServiceIT.java | 8 +- .../CompletedPersistenceServiceIT.java | 14 +- .../KeyResultPersistenceServiceIT.java | 42 +- .../ObjectivePersistenceServiceIT.java | 12 +- .../persistence/PersistenceBaseTestIT.java | 10 +- .../QuarterPersistenceServiceIT.java | 2 +- .../persistence/UserPersistenceServiceIT.java | 32 +- .../ActionValidationServiceTest.java | 31 +- .../CheckInValidationServiceTest.java | 2 +- .../CompletedValidationServiceTest.java | 2 +- .../KeyResultValidationServiceTest.java | 4 +- .../ObjectiveValidationServiceTest.java | 30 +- .../QuarterValidationServiceTest.java | 2 +- .../validation/UserValidationServiceTest.java | 76 ++- .../validation/ValidationBaseTest.java | 2 +- .../puzzle/okr/test/CheckInTestHelpers.java | 8 +- .../puzzle/okr/test/KeyResultTestHelpers.java | 10 +- .../java/ch/puzzle/okr/test/TestHelper.java | 30 +- .../test/dto/builder/ObjectiveDtoBuilder.java | 2 +- .../check/QuarterRangeCheckerTest.java | 8 +- .../util/quarter/generate/QuartersTest.java | 20 +- frontend/cypress.config.ts | 2 +- frontend/cypress/e2e/check-in.cy.ts | 512 +++++++++--------- frontend/cypress/e2e/duplicated-scoring.cy.ts | 0 frontend/cypress/e2e/key-result.cy.ts | 20 +- frontend/cypress/e2e/login.cy.ts | 12 +- frontend/cypress/e2e/objective-backlog.cy.ts | 20 +- frontend/cypress/e2e/objective-crud.cy.ts | 16 +- frontend/cypress/e2e/objective.cy.ts | 24 +- frontend/cypress/e2e/overview.cy.ts | 8 +- frontend/cypress/e2e/routing.cy.ts | 38 +- frontend/cypress/e2e/scoring.cy.ts | 36 +- frontend/cypress/e2e/tab.cy.ts | 26 +- ...management.cy.ts => team-management.cy.ts} | 92 ++-- frontend/cypress/e2e/team.cy.ts | 236 ++++---- frontend/cypress/support/commands.ts | 6 +- .../dom-helper/dialogs/inviteMembersDialog.ts | 14 +- .../dom-helper/dialogs/keyResultDialog.ts | 2 +- .../support/helper/dom-helper/filterHelper.ts | 4 +- .../helper/dom-helper/pageObjectMapperBase.ts | 6 +- .../helper/dom-helper/pages/overviewPage.ts | 10 +- ...anagementPage.ts => teamManagementPage.ts} | 6 +- .../cypress/support/helper/scoringSupport.ts | 4 +- frontend/src/app/app-routing.module.ts | 4 +- .../action-plan/action-plan.component.html | 14 +- .../application-banner.component.spec.ts | 6 +- .../application-top-bar.component.html | 10 +- .../application-top-bar.component.scss | 6 +- .../check-in-history-dialog.component.html | 2 +- .../confidence/confidence.component.html | 2 +- .../key-result-form.component.html | 2 +- .../key-result-form.component.spec.ts | 8 +- .../keyresult-detail.component.html | 18 +- .../keyresult-detail.component.scss | 2 +- .../keyresult-dialog.component.spec.ts | 2 +- .../keyresult/keyresult.component.html | 2 +- .../objective-detail.component.html | 4 +- .../team-filter/team-filter.component.spec.ts | 16 +- .../app/components/team/team.component.html | 4 +- .../components/team/team.component.spec.ts | 2 +- frontend/src/app/services/check-in.service.ts | 4 +- .../custom/scoring/scoring.component.html | 2 +- .../custom/scoring/scoring.component.scss | 2 +- .../objective-form.component.spec.ts | 2 +- frontend/src/app/shared/shared.module.ts | 6 +- .../side-panel.component.html} | 2 +- .../side-panel.component.scss} | 2 +- .../side-panel.component.ts} | 8 +- frontend/src/app/shared/testData.ts | 68 +-- frontend/src/app/shared/types/menu-entry.ts | 11 - .../src/app/shared/types/model/CheckIn.ts | 2 +- .../src/app/shared/types/model/CheckInMin.ts | 2 +- .../src/app/shared/types/model/KeyResult.ts | 2 +- .../src/app/shared/types/model/NewUser.ts | 4 +- .../src/app/shared/types/model/NewUserForm.ts | 4 +- .../src/app/shared/types/model/Objective.ts | 2 +- .../app/shared/types/model/OverviewEntity.ts | 2 +- frontend/src/app/shared/types/model/Team.ts | 2 +- frontend/src/app/shared/types/model/User.ts | 6 +- .../app/shared/types/model/UserTableEntry.ts | 10 +- ...dd-member-to-team-dialog.component.spec.ts | 2 +- .../add-member-to-team-dialog.component.ts | 2 +- .../add-user-team.component.spec.ts | 12 +- .../add-user-team/add-user-team.component.ts | 2 +- .../delete-user/delete-user.component.spec.ts | 8 +- .../delete-user/delete-user.component.ts | 2 +- .../invite-user-dialog.component.spec.ts | 6 +- .../invite-user-dialog.component.ts | 4 +- .../member-detail/member-detail.component.ts | 2 +- .../member-list-table.component.html | 4 +- .../member-list-table.component.spec.ts | 2 +- .../member-list-table.component.ts | 4 +- .../member-list/member-list.component.html | 4 +- .../member-list/member-list.component.spec.ts | 10 +- .../member-list/member-list.component.ts | 2 +- .../new-user/new-user.component.html | 28 +- .../new-user/new-user.component.spec.ts | 4 +- .../new-user/new-user.component.ts | 8 +- .../search-team-management.component.spec.ts | 20 +- .../search-team-management.component.ts | 8 +- .../show-edit-role.component.ts | 2 +- .../team-management-banner.component.html | 2 +- .../team-management-banner.component.scss | 2 +- .../team-management-routing.module.ts | 4 +- frontend/src/style/_variables.scss | 4 +- frontend/src/style/custom_bootstrap.scss | 2 +- frontend/src/style/styles.scss | 16 +- 213 files changed, 1470 insertions(+), 1530 deletions(-) rename .github/workflows/{addIssueToProject.yml => add-issue-to-project.yml} (100%) delete mode 100644 backend/src/main/java/ch/puzzle/okr/dto/overview/DashboardDto.java rename backend/src/main/java/ch/puzzle/okr/dto/{userOkrData => userokrdata}/UserKeyResultDataDto.java (75%) rename backend/src/main/java/ch/puzzle/okr/dto/{userOkrData => userokrdata}/UserOkrDataDto.java (71%) create mode 100644 backend/src/main/resources/db/migration/V3_1_0__renameBooleanColumns.sql create mode 100644 backend/src/main/resources/db/migration/V3_2_0__renameFirstAndLastNameColumns.sql create mode 100644 frontend/cypress/e2e/duplicated-scoring.cy.ts rename frontend/cypress/e2e/{teammanagement.cy.ts => team-management.cy.ts} (84%) rename frontend/cypress/support/helper/dom-helper/pages/{teammanagementPage.ts => teamManagementPage.ts} (91%) rename frontend/src/app/shared/{sidepanel/sidepanel.component.html => side-panel/side-panel.component.html} (93%) rename frontend/src/app/shared/{sidepanel/sidepanel.component.scss => side-panel/side-panel.component.scss} (93%) rename frontend/src/app/shared/{sidepanel/sidepanel.component.ts => side-panel/side-panel.component.ts} (86%) delete mode 100644 frontend/src/app/shared/types/menu-entry.ts diff --git a/.github/workflows/addIssueToProject.yml b/.github/workflows/add-issue-to-project.yml similarity index 100% rename from .github/workflows/addIssueToProject.yml rename to .github/workflows/add-issue-to-project.yml diff --git a/.run/OkrApplication-E2E.run.xml b/.run/OkrApplication-E2E.run.xml index 4d2c9a4905..aa7706165a 100644 --- a/.run/OkrApplication-E2E.run.xml +++ b/.run/OkrApplication-E2E.run.xml @@ -1,7 +1,7 @@