diff --git a/.github/workflows/gradle-deploy-develop.yml b/.github/workflows/gradle-deploy-develop.yml
index 6dd02156f8..2a17c12cbf 100644
--- a/.github/workflows/gradle-deploy-develop.yml
+++ b/.github/workflows/gradle-deploy-develop.yml
@@ -7,7 +7,7 @@ env:
PROJECT_ID: ${{ secrets.RUN_PROJECT }}
RUN_REGION: us-central1
SERVICE_NAME: checkins-develop
- TARGET_URL: https://checkins-develop-tuvcfzotpq-uc.a.run.app
+ TARGET_URL: https://checkins-develop-832140020593.us-central1.run.app
jobs:
test:
runs-on: ubuntu-latest
diff --git a/server/build.gradle b/server/build.gradle
index 8c70f18a6f..634e67ba74 100755
--- a/server/build.gradle
+++ b/server/build.gradle
@@ -7,7 +7,7 @@ plugins {
id "jacoco"
}
-version "0.8.10"
+version "0.8.11"
group "com.objectcomputing.checkins"
repositories {
diff --git a/server/src/main/resources/META-INF/native-image/com.objectcomputing/checkins/reflect-config.json b/server/src/main/resources/META-INF/native-image/com.objectcomputing/checkins/reflect-config.json
index c7ac5c8c37..b366e7e3dd 100644
--- a/server/src/main/resources/META-INF/native-image/com.objectcomputing/checkins/reflect-config.json
+++ b/server/src/main/resources/META-INF/native-image/com.objectcomputing/checkins/reflect-config.json
@@ -51,5 +51,200 @@
]
}
]
+ },
+ {
+ "name": "org.flywaydb.core.api.migration.baseline.BaselineMigrationConfigurationExtension",
+ "condition": {
+ "typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration"
+ },
+ "allDeclaredFields": true
+ },
+ {
+ "name": "org.flywaydb.core.api.migration.baseline.BaselineMigrationConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "getBaselineMigrationPrefix",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setBaselineMigrationPrefix",
+ "parameterTypes": [
+ "java.lang.String"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "org.flywaydb.core.extensibility.ConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ }
+ },
+ {
+ "name": "org.flywaydb.core.extensibility.Plugin",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ }
+ },
+ {
+ "name": "org.flywaydb.core.internal.command.clean.CleanModeConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "getClean",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setClean",
+ "parameterTypes": [
+ "org.flywaydb.core.internal.command.clean.CleanModel"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "org.flywaydb.core.internal.command.clean.CleanModel",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.command.clean.SchemaModel",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.configuration.extensions.DeployScriptFilenameConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "getScriptFilename",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setScriptFilename",
+ "parameterTypes": [
+ "java.lang.String"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "org.flywaydb.core.internal.configuration.extensions.PrepareScriptFilenameConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "getScriptFilename",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setScriptFilename",
+ "parameterTypes": [
+ "java.lang.String"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "org.flywaydb.core.internal.proprietaryStubs.LicensingConfigurationExtensionStub",
+ "condition": {
+ "typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration"
+ },
+ "allDeclaredFields": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.proprietaryStubs.PATTokenConfigurationExtensionStub",
+ "condition": {
+ "typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration"
+ },
+ "allDeclaredFields": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.publishing.PublishingConfigurationExtension",
+ "condition": {
+ "typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration"
+ },
+ "allDeclaredFields": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.publishing.PublishingConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "isPublishResult",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setPublishResult",
+ "parameterTypes": [
+ "boolean"
+ ]
+ }
+ ]
}
]
\ No newline at end of file
diff --git a/server/src/main/resources/db/dev/R__Load_testing_data.sql b/server/src/main/resources/db/dev/R__Load_testing_data.sql
index 4693bf5fd1..8c0ada2f68 100644
--- a/server/src/main/resources/db/dev/R__Load_testing_data.sql
+++ b/server/src/main/resources/db/dev/R__Load_testing_data.sql
@@ -1699,9 +1699,19 @@ VALUES
('d27b679c-3aa8-4c4d-b08e-4eda63cea23f', '105f2968-a182-45a3-892c-eeff76383fe0', '06c03df3-85fe-4fc3-979e-9f1f6ba74a03', '5', '2022-08-01');
INSERT INTO kudos
-(id, message, senderid, teamid, datecreated, dateapproved)
+(id, message, senderid, teamid, datecreated, dateapproved, publiclyvisible)
VALUES
-('39dfd281-d0af-4016-848b-8156dfef2b92', PGP_SYM_ENCRYPT('Kudos to Revolver Ocelot!', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', null, '2022-10-01', '2022-10-02');
+('39dfd281-d0af-4016-848b-8156dfef2b93', PGP_SYM_ENCRYPT('Kudos to Revolver Ocelot!', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', null, '2023-12-01', '2023-12-02', true);
+
+INSERT INTO kudos_recipient
+(id, kudosid, memberid)
+VALUES
+('ebc023e1-b577-4b02-a2fb-fc9472a8474b', '39dfd281-d0af-4016-848b-8156dfef2b93', '105f2968-a182-45a3-892c-eeff76383fe0');
+
+INSERT INTO kudos
+(id, message, senderid, teamid, datecreated, dateapproved, publiclyvisible)
+VALUES
+('39dfd281-d0af-4016-848b-8156dfef2b92', PGP_SYM_ENCRYPT('Kudos to Revolver Ocelot!', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', null, '2022-10-01', null, true);
INSERT INTO kudos_recipient
(id, kudosid, memberid)
@@ -1709,9 +1719,9 @@ VALUES
('ebc023e1-b577-4b02-a2fb-fc9472a8474a', '39dfd281-d0af-4016-848b-8156dfef2b92', '105f2968-a182-45a3-892c-eeff76383fe0');
INSERT INTO kudos
-(id, message, senderid, teamid, datecreated, dateapproved)
+(id, message, senderid, teamid, datecreated, dateapproved, publiclyvisible)
VALUES
-('fbcde196-7703-4f80-ac5e-5ac60b28555e', PGP_SYM_ENCRYPT('Kudos to Huey and Awesome!', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', null, '2022-10-01', null);
+('fbcde196-7703-4f80-ac5e-5ac60b28555e', PGP_SYM_ENCRYPT('Kudos to Huey and Awesome!', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', null, '2024-10-21', '2024-10-21', true);
INSERT INTO kudos_recipient
(id, kudosid, memberid)
@@ -1724,9 +1734,9 @@ VALUES
('bf37c244-f478-42b2-9077-dd4cb052bbb1', 'fbcde196-7703-4f80-ac5e-5ac60b28555e', '67dc3a3b-5bfa-4759-997a-fb6bac98dcf3');
INSERT INTO kudos
-(id, message, senderid, teamid, datecreated, dateapproved)
+(id, message, senderid, teamid, datecreated, dateapproved, publiclyvisible)
VALUES
-('df2766f0-efab-4925-859e-d993e2e38eaa', PGP_SYM_ENCRYPT('Kudos to the Checkins Experts team!', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', 'a8733740-cf4c-4c16-a8cf-4f928c409acc', '2022-09-28', '2022-09-29');
+('df2766f0-efab-4925-859e-d993e2e38eaa', PGP_SYM_ENCRYPT('Kudos to the Checkins Experts team!', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', 'a8733740-cf4c-4c16-a8cf-4f928c409acc', '2024-09-28', '2024-09-29', true);
INSERT INTO kudos_recipient
(id, kudosid, memberid)
@@ -1744,9 +1754,9 @@ VALUES
('0ca86d55-cffb-4b84-883c-c4c2e41eff73', 'df2766f0-efab-4925-859e-d993e2e38eaa', '67dc3a3b-5bfa-4759-997a-fb6bac98dcf3');
INSERT INTO kudos
-(id, message, senderid, teamid, datecreated, dateapproved)
+(id, message, senderid, teamid, datecreated, dateapproved, publiclyvisible)
VALUES
-('17e19f16-d731-4242-a74a-43493a556f08', PGP_SYM_ENCRYPT('Kudos to Michael Kimberlin!', '${aeskey}'), 'a90be358-aa3d-49c8-945a-879a93646e45', null, '2022-08-15', '2022-08-25');
+('17e19f16-d731-4242-a74a-43493a556f08', PGP_SYM_ENCRYPT('Kudos to Mischievous Kangaroo!', '${aeskey}'), 'a90be358-aa3d-49c8-945a-879a93646e45', null, '2024-11-01', null, true);
INSERT INTO kudos_recipient
(id, kudosid, memberid)
@@ -1754,9 +1764,9 @@ VALUES
('038485ee-8cac-416b-9da6-d838ee345d0e', '17e19f16-d731-4242-a74a-43493a556f08', 'e4b2fe52-1915-4544-83c5-21b8f871f6db');
INSERT INTO kudos
-(id, message, senderid, teamid, datecreated, dateapproved)
+(id, message, senderid, teamid, datecreated, dateapproved, publiclyvisible)
VALUES
-('6612b8a0-1d45-4155-b0fb-e0b2d9eaafcb', PGP_SYM_ENCRYPT('Wanted to give some kudos to Mischievous Kangaroo and Revolver Ocelot for their recent help on the project. Thank you very much!', '${aeskey}'), '1b4f99da-ef70-4a76-9b37-8bb783b749ad', null, '2022-10-05', null);
+('6612b8a0-1d45-4155-b0fb-e0b2d9eaafcb', PGP_SYM_ENCRYPT('Wanted to give some kudos to Mischievous Kangaroo and Revolver Ocelot for their recent help on the project. Thank you very much!', '${aeskey}'), '1b4f99da-ef70-4a76-9b37-8bb783b749ad', null, '2024-10-29', '2024-10-29', true);
INSERT INTO kudos_recipient
(id, kudosid, memberid)
@@ -1769,9 +1779,9 @@ VALUES
('01f639d5-b7b3-47a2-b165-d7a20d01fec2', '6612b8a0-1d45-4155-b0fb-e0b2d9eaafcb', '105f2968-a182-45a3-892c-eeff76383fe0');
INSERT INTO kudos
-(id, message, senderid, teamid, datecreated, dateapproved)
+(id, message, senderid, teamid, datecreated, dateapproved, publiclyvisible)
VALUES
-('9cdce399-4c02-41ed-a63f-35beb6ecb622', PGP_SYM_ENCRYPT('A huge thank you to the Javascript Gurus team for offering their advice on the tech stack for the new project. Kudos to you all!', '${aeskey}'), '8d75c07e-6adc-437a-8659-7dd953ce6600', 'e8f052a8-40b5-4fb4-9bab-8b16ed36adc7', '2022-10-10', '2022-10-11');
+('9cdce399-4c02-41ed-a63f-35beb6ecb622', PGP_SYM_ENCRYPT('A huge thank you to the Javascript Gurus team for offering their advice on the tech stack for the new project. Kudos to you all!', '${aeskey}'), '8d75c07e-6adc-437a-8659-7dd953ce6600', 'e8f052a8-40b5-4fb4-9bab-8b16ed36adc7', '2022-10-10', '2022-10-11', true);
INSERT INTO kudos_recipient
(id, kudosid, memberid)
@@ -1789,9 +1799,9 @@ VALUES
('f792056b-22ce-4e3d-a442-0fdc3cb35e7b', '9cdce399-4c02-41ed-a63f-35beb6ecb622', '105f2968-a182-45a3-892c-eeff76383fe0');
INSERT INTO kudos
-(id, message, senderid, teamid, datecreated, dateapproved)
+(id, message, senderid, teamid, datecreated, dateapproved, publiclyvisible)
VALUES
-('39dfd284-d0bf-4017-848c-8156dfef2b93', PGP_SYM_ENCRYPT('Kudos are tasty.', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', null, '2024-09-04', '2022-09-04');
+('39dfd284-d0bf-4017-848c-8156dfef2b93', PGP_SYM_ENCRYPT('Kudos are tasty.', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', null, '2024-11-10', '2024-11-10', true);
INSERT INTO kudos_recipient
(id, kudosid, memberid)
@@ -1799,9 +1809,9 @@ VALUES
('ebc023e2-b578-4b03-a2fc-fc9472a8474b', '39dfd284-d0bf-4017-848c-8156dfef2b93', 'c7406157-a38f-4d48-aaed-04018d846727');
INSERT INTO kudos
-(id, message, senderid, teamid, datecreated, dateapproved)
+(id, message, senderid, teamid, datecreated, dateapproved, publiclyvisible)
VALUES
-('39dfd284-d0bf-4017-848c-8156dfef2b94', PGP_SYM_ENCRYPT('Kudos are covered in chocolate.', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', null, '2024-09-04', '2022-09-04');
+('39dfd284-d0bf-4017-848c-8156dfef2b94', PGP_SYM_ENCRYPT('Kudos are covered in chocolate.', '${aeskey}'), 'e4b2fe52-1915-4544-83c5-21b8f871f6db', null, '2024-09-04', '2022-09-04', true);
INSERT INTO kudos_recipient
(id, kudosid, memberid)
diff --git a/server/src/test/java/com/objectcomputing/checkins/services/fixture/FeedbackRequestFixture.java b/server/src/test/java/com/objectcomputing/checkins/services/fixture/FeedbackRequestFixture.java
index 201a67023e..bda6a1134b 100644
--- a/server/src/test/java/com/objectcomputing/checkins/services/fixture/FeedbackRequestFixture.java
+++ b/server/src/test/java/com/objectcomputing/checkins/services/fixture/FeedbackRequestFixture.java
@@ -4,6 +4,8 @@
import com.objectcomputing.checkins.services.memberprofile.MemberProfile;
import com.objectcomputing.checkins.services.reviews.ReviewPeriod;
import jnr.constants.platform.Local;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.time.LocalDate;
@@ -18,6 +20,8 @@
public interface FeedbackRequestFixture extends RepositoryFixture, FeedbackTemplateFixture {
+ static final Logger LOG = LoggerFactory.getLogger(FeedbackRequestFixture.class);
+
/**
* Creates a sample feedback request
* @param creator The {@link MemberProfile} of the creator of the feedback request
@@ -59,6 +63,8 @@ default FeedbackRequest saveSampleFeedbackRequest(MemberProfile creator, MemberP
}
default LocalDate getRandomLocalDateTime(LocalDateTime start, LocalDateTime end) {
+ if(start.isEqual(end)) return end.toLocalDate();
+
LocalDate startDate = start.toLocalDate();
long daysBetween = ChronoUnit.DAYS.between(startDate, end.toLocalDate());
Random random = new Random();
@@ -81,6 +87,8 @@ default FeedbackRequest saveSampleFeedbackRequest(MemberProfile creator, MemberP
default FeedbackRequest saveSampleFeedbackRequest(MemberProfile creator, MemberProfile requestee, MemberProfile recipient, UUID templateId, ReviewPeriod reviewPeriod, String status) {
LocalDate submitDate = getRandomLocalDateTime(reviewPeriod.getPeriodStartDate(), reviewPeriod.getCloseDate());
+ LOG.info("Period start date: {} Generated Submit Date: {}", reviewPeriod.getPeriodStartDate(), submitDate.atStartOfDay());
+ if(submitDate.atStartOfDay().isAfter(LocalDateTime.now())) submitDate = LocalDateTime.now().toLocalDate();
LocalDate sendDate = getRandomLocalDateTime(reviewPeriod.getPeriodStartDate(), submitDate.atStartOfDay());
return getFeedbackRequestRepository().save(new FeedbackRequest(creator.getId(), requestee.getId(), recipient.getId(), templateId, sendDate, null, status, submitDate, reviewPeriod.getId()));
}
diff --git a/server/src/test/java/com/objectcomputing/checkins/services/fixture/ReviewPeriodFixture.java b/server/src/test/java/com/objectcomputing/checkins/services/fixture/ReviewPeriodFixture.java
index cd2cf0eded..af3e3863d0 100644
--- a/server/src/test/java/com/objectcomputing/checkins/services/fixture/ReviewPeriodFixture.java
+++ b/server/src/test/java/com/objectcomputing/checkins/services/fixture/ReviewPeriodFixture.java
@@ -3,6 +3,7 @@
import com.objectcomputing.checkins.services.reviews.ReviewPeriod;
import com.objectcomputing.checkins.services.reviews.ReviewStatus;
+import java.time.temporal.TemporalUnit;
import java.util.UUID;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
@@ -10,12 +11,11 @@
public interface ReviewPeriodFixture extends RepositoryFixture {
default ReviewPeriod createADefaultReviewPeriod() {
- LocalDateTime launchDate = LocalDateTime.now().plusMinutes(1)
- .truncatedTo(ChronoUnit.MILLIS);
- LocalDateTime selfReviewCloseDate = launchDate.plusDays(1);
- LocalDateTime closeDate = selfReviewCloseDate.plusDays(1);
- LocalDateTime startDate = launchDate.minusDays(30);
- LocalDateTime endDate = closeDate.minusDays(1);
+ LocalDateTime launchDate = LocalDateTime.now().plusDays(1).truncatedTo(ChronoUnit.DAYS);
+ LocalDateTime selfReviewCloseDate = launchDate.plusDays(2);
+ LocalDateTime closeDate = selfReviewCloseDate.plusDays(2);
+ LocalDateTime startDate = launchDate.minusDays(31);
+ LocalDateTime endDate = launchDate.minusDays(1);
return getReviewPeriodRepository().save(
new ReviewPeriod("Period of Time", ReviewStatus.OPEN, null, null,
launchDate, selfReviewCloseDate, closeDate,
@@ -27,12 +27,11 @@ default ReviewPeriod createADefaultReviewPeriod(ReviewStatus reviewStatus) {
}
default ReviewPeriod createADefaultReviewPeriod(ReviewStatus reviewStatus, UUID templateId) {
- LocalDateTime launchDate = LocalDateTime.now().plusMinutes(1)
- .truncatedTo(ChronoUnit.MILLIS);
- LocalDateTime selfReviewCloseDate = launchDate.plusDays(1);
- LocalDateTime closeDate = selfReviewCloseDate.plusDays(1);
- LocalDateTime startDate = launchDate.minusDays(30);
- LocalDateTime endDate = closeDate.minusDays(1);
+ LocalDateTime launchDate = LocalDateTime.now().plusDays(1).truncatedTo(ChronoUnit.DAYS);
+ LocalDateTime selfReviewCloseDate = launchDate.plusDays(2);
+ LocalDateTime closeDate = selfReviewCloseDate.plusDays(2);
+ LocalDateTime startDate = launchDate.minusDays(31);
+ LocalDateTime endDate = launchDate.minusDays(1);
return getReviewPeriodRepository().save(
new ReviewPeriod("Period of Time", reviewStatus, templateId, null,
launchDate, selfReviewCloseDate, closeDate,
@@ -43,12 +42,12 @@ default ReviewPeriod createADefaultReviewPeriod(
LocalDateTime launchDate,
ReviewStatus reviewStatus,
UUID templateId, UUID selfReviewTemplateId) {
- launchDate = launchDate.truncatedTo(ChronoUnit.MILLIS);
+ launchDate = launchDate.truncatedTo(ChronoUnit.DAYS);
LocalDateTime selfReviewCloseDate = launchDate.plusDays(4);
- LocalDateTime closeDate = selfReviewCloseDate.plusDays(1);
- LocalDateTime startDate = launchDate.minusDays(30);
- LocalDateTime endDate = closeDate.minusDays(1);
+ LocalDateTime closeDate = selfReviewCloseDate.plusDays(2);
+ LocalDateTime startDate = launchDate.minusDays(31);
+ LocalDateTime endDate = launchDate.minusDays(1);
return getReviewPeriodRepository().save(
new ReviewPeriod("Specific Launch Date", reviewStatus, templateId,
selfReviewTemplateId,
@@ -57,12 +56,11 @@ default ReviewPeriod createADefaultReviewPeriod(
}
default ReviewPeriod createASecondaryReviewPeriod() {
- LocalDateTime launchDate = LocalDateTime.now().plusMinutes(1)
- .truncatedTo(ChronoUnit.MILLIS);
- LocalDateTime selfReviewCloseDate = launchDate.plusDays(1);
- LocalDateTime closeDate = selfReviewCloseDate.plusDays(1);
- LocalDateTime startDate = launchDate.minusDays(30);
- LocalDateTime endDate = closeDate.minusDays(1);
+ LocalDateTime launchDate = LocalDateTime.now().plusDays(1).truncatedTo(ChronoUnit.DAYS);
+ LocalDateTime selfReviewCloseDate = launchDate.plusDays(2);
+ LocalDateTime closeDate = selfReviewCloseDate.plusDays(2);
+ LocalDateTime startDate = launchDate.minusDays(31);
+ LocalDateTime endDate = launchDate.minusDays(1);
return getReviewPeriodRepository().save(
new ReviewPeriod("Period of Play", ReviewStatus.OPEN, null, null,
launchDate, selfReviewCloseDate, closeDate,
@@ -70,19 +68,15 @@ default ReviewPeriod createASecondaryReviewPeriod() {
}
default ReviewPeriod createAClosedReviewPeriod() {
- LocalDateTime launchDate = LocalDateTime.now().plusMinutes(1)
- .truncatedTo(ChronoUnit.MILLIS);
- LocalDateTime selfReviewCloseDate = launchDate.plusDays(1);
- LocalDateTime closeDate = selfReviewCloseDate.plusDays(1);
- LocalDateTime startDate = launchDate.minusDays(30);
- LocalDateTime endDate = closeDate.minusDays(1);
+ LocalDateTime launchDate = LocalDateTime.now().plusDays(1).truncatedTo(ChronoUnit.DAYS);
+ LocalDateTime startDate = launchDate.minusDays(31);
+ LocalDateTime endDate = launchDate.minusDays(1);
return createAClosedReviewPeriod(startDate, endDate);
}
default ReviewPeriod createAClosedReviewPeriod(
LocalDateTime periodStart, LocalDateTime periodEnd) {
- LocalDateTime launchDate = periodEnd.plusMinutes(1)
- .truncatedTo(ChronoUnit.MILLIS).plusDays(1);
+ LocalDateTime launchDate = periodEnd.plusDays(1).truncatedTo(ChronoUnit.DAYS);
LocalDateTime selfReviewCloseDate = launchDate.plusDays(3);
LocalDateTime closeDate = selfReviewCloseDate.plusDays(7);
return getReviewPeriodRepository().save(
diff --git a/server/src/test/java/com/objectcomputing/checkins/services/reviews/ReviewPeriodControllerTest.java b/server/src/test/java/com/objectcomputing/checkins/services/reviews/ReviewPeriodControllerTest.java
index 4ce4768577..261501737c 100644
--- a/server/src/test/java/com/objectcomputing/checkins/services/reviews/ReviewPeriodControllerTest.java
+++ b/server/src/test/java/com/objectcomputing/checkins/services/reviews/ReviewPeriodControllerTest.java
@@ -833,7 +833,7 @@ void testSelfReviewThreeDaysEmail() {
// launch date, the self-review closes 4 days after the launch date.
// So, to get the three day email, we just need to add 1 day to the
// launch date.
- LocalDateTime launchDate = LocalDateTime.now().plusMinutes(1);
+ LocalDateTime launchDate = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS);
checkSelfReviewEmail(launchDate, launchDate.plusDays(1),
" closes in three days!");
}
@@ -844,7 +844,7 @@ void testSelfReviewOneDayEmail() {
// launch date, the self-review closes 4 days after the launch date.
// So, to get the one day email, we just need to add 3 days to the
// launch date.
- LocalDateTime launchDate = LocalDateTime.now().plusMinutes(1);
+ LocalDateTime launchDate = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS);
checkSelfReviewEmail(launchDate, launchDate.plusDays(3),
" closes in one day!");
}
diff --git a/server/src/test/resources/META-INF/native-image/com.objectcomputing/checkins-test/reflect-config.json b/server/src/test/resources/META-INF/native-image/com.objectcomputing/checkins-test/reflect-config.json
index fadf978ec5..e50773f532 100644
--- a/server/src/test/resources/META-INF/native-image/com.objectcomputing/checkins-test/reflect-config.json
+++ b/server/src/test/resources/META-INF/native-image/com.objectcomputing/checkins-test/reflect-config.json
@@ -8,7 +8,6 @@
{
"name": "",
"parameterTypes": [
-
]
},
{
@@ -18,5 +17,200 @@
]
}
]
+ },
+ {
+ "name": "org.flywaydb.core.api.migration.baseline.BaselineMigrationConfigurationExtension",
+ "condition": {
+ "typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration"
+ },
+ "allDeclaredFields": true
+ },
+ {
+ "name": "org.flywaydb.core.api.migration.baseline.BaselineMigrationConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "getBaselineMigrationPrefix",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setBaselineMigrationPrefix",
+ "parameterTypes": [
+ "java.lang.String"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "org.flywaydb.core.extensibility.ConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ }
+ },
+ {
+ "name": "org.flywaydb.core.extensibility.Plugin",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ }
+ },
+ {
+ "name": "org.flywaydb.core.internal.command.clean.CleanModeConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "getClean",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setClean",
+ "parameterTypes": [
+ "org.flywaydb.core.internal.command.clean.CleanModel"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "org.flywaydb.core.internal.command.clean.CleanModel",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.command.clean.SchemaModel",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.configuration.extensions.DeployScriptFilenameConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "getScriptFilename",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setScriptFilename",
+ "parameterTypes": [
+ "java.lang.String"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "org.flywaydb.core.internal.configuration.extensions.PrepareScriptFilenameConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "getScriptFilename",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setScriptFilename",
+ "parameterTypes": [
+ "java.lang.String"
+ ]
+ }
+ ]
+ },
+ {
+ "name": "org.flywaydb.core.internal.proprietaryStubs.LicensingConfigurationExtensionStub",
+ "condition": {
+ "typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration"
+ },
+ "allDeclaredFields": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.proprietaryStubs.PATTokenConfigurationExtensionStub",
+ "condition": {
+ "typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration"
+ },
+ "allDeclaredFields": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.publishing.PublishingConfigurationExtension",
+ "condition": {
+ "typeReachable": "org.flywaydb.core.api.configuration.ClassicConfiguration"
+ },
+ "allDeclaredFields": true
+ },
+ {
+ "name": "org.flywaydb.core.internal.publishing.PublishingConfigurationExtension",
+ "queryAllDeclaredMethods": true,
+ "condition": {
+ "typeReachable": "org.flywaydb.core.extensibility.ConfigurationExtension"
+ },
+ "allDeclaredFields": true,
+ "queryAllDeclaredConstructors": true,
+ "methods": [
+ {
+ "name": "",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "isPublishResult",
+ "parameterTypes": [
+ ]
+ },
+ {
+ "name": "setPublishResult",
+ "parameterTypes": [
+ "boolean"
+ ]
+ }
+ ]
}
]
\ No newline at end of file
diff --git a/web-ui/package.json b/web-ui/package.json
index db08625fcc..32ee428d5e 100644
--- a/web-ui/package.json
+++ b/web-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "web-ui",
- "version": "0.8.10",
+ "version": "0.8.11",
"private": true,
"type": "module",
"dependencies": {
diff --git a/web-ui/src/components/action_item/ActionItemsPanel.test.jsx b/web-ui/src/components/action_item/ActionItemsPanel.test.jsx
index 5476f74548..5f00dcf947 100644
--- a/web-ui/src/components/action_item/ActionItemsPanel.test.jsx
+++ b/web-ui/src/components/action_item/ActionItemsPanel.test.jsx
@@ -71,7 +71,7 @@ const server = setupServer(
)
);
-beforeAll(() => server.listen());
+beforeAll(() => server.listen({ onUnhandledRequest(request, print) {} }));
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
diff --git a/web-ui/src/components/agenda/Agenda.jsx b/web-ui/src/components/agenda/Agenda.jsx
index e005b9bf02..82bdd2e1ef 100644
--- a/web-ui/src/components/agenda/Agenda.jsx
+++ b/web-ui/src/components/agenda/Agenda.jsx
@@ -43,7 +43,7 @@ const AgendaItems = () => {
const currentUserId = memberProfile?.id;
const currentCheckin = selectCheckin(state, checkinId);
- const [agendaItems, setAgendaItems] = useState();
+ const [agendaItems, setAgendaItems] = useState([]);
const [description, setDescription] = useState('');
const [isLoading, setIsLoading] = useState(false);
diff --git a/web-ui/src/components/celebrations/MyAnniversary.test.jsx b/web-ui/src/components/celebrations/MyAnniversary.test.jsx
index ae44737e12..bfbea022fb 100644
--- a/web-ui/src/components/celebrations/MyAnniversary.test.jsx
+++ b/web-ui/src/components/celebrations/MyAnniversary.test.jsx
@@ -3,7 +3,7 @@ import MyAnniversary from './MyAnniversary';
import { AppContextProvider } from '../../context/AppContext';
import { BrowserRouter } from 'react-router-dom';
-const hideMyAnniversary = false;
+const hideMyAnniversary = () => {};
const myAnniversary = {
name: 'Suman Maroju',
anniversary: '12/29/2012',
diff --git a/web-ui/src/components/certifications/EarnedCertificationsTable.jsx b/web-ui/src/components/certifications/EarnedCertificationsTable.jsx
index a13b67e8ad..814a62ec85 100644
--- a/web-ui/src/components/certifications/EarnedCertificationsTable.jsx
+++ b/web-ui/src/components/certifications/EarnedCertificationsTable.jsx
@@ -94,7 +94,7 @@ const EarnedCertificationsTable = ({
});
if (res.error) return;
- const certs = res.payload.data;
+ const certs = res.payload.data ?? [];
setCertifications(certs.sort((c1, c2) => c1.name.localeCompare(c2.name)));
const certMap = certs.reduce((map, cert) => {
@@ -114,7 +114,7 @@ const EarnedCertificationsTable = ({
});
if (res.error) return;
- let earned = res.payload.data;
+ let earned = res.payload.data ?? [];
if (onlyMe) {
earned = earned.filter(cert => cert.memberId === currentUser.id);
}
@@ -512,7 +512,7 @@ const EarnedCertificationsTable = ({
});
if (res.error) return;
- const newEarned = res.payload.data;
+ const newEarned = res.payload.data ?? [];
setEarnedCertifications(earned => {
if (id) {
const index = earned.findIndex(c => c.id === id);
diff --git a/web-ui/src/components/checkin/documents/CheckinDocs.jsx b/web-ui/src/components/checkin/documents/CheckinDocs.jsx
index 5ef08d7b86..353e0db5c6 100644
--- a/web-ui/src/components/checkin/documents/CheckinDocs.jsx
+++ b/web-ui/src/components/checkin/documents/CheckinDocs.jsx
@@ -56,7 +56,7 @@ const UploadDocs = () => {
});
}
} catch (e) {
- console.log(e);
+ console.error("getCheckinFiles: " + e);
}
}
if (csrf) {
@@ -98,7 +98,7 @@ const UploadDocs = () => {
setFiles([...files, data]);
} catch (e) {
setFileColors(fileColors => ({ ...fileColors, [file.name]: 'red' }));
- console.log({ e });
+ console.error("addFiles: " + e);
} finally {
setLoading(false);
}
diff --git a/web-ui/src/components/contribution_hours/ProgressBar.test.jsx b/web-ui/src/components/contribution_hours/ProgressBar.test.jsx
index 4efa37168e..a82438336a 100644
--- a/web-ui/src/components/contribution_hours/ProgressBar.test.jsx
+++ b/web-ui/src/components/contribution_hours/ProgressBar.test.jsx
@@ -3,9 +3,13 @@ import ProgressBar from './ProgressBar';
import renderer from 'react-test-renderer';
it('has billable hours', () => {
- snapshot( );
+ snapshot( );
});
it('has no billable hours', () => {
- snapshot( );
+ snapshot( );
});
diff --git a/web-ui/src/components/contribution_hours/__snapshots__/ProgressBar.test.jsx.snap b/web-ui/src/components/contribution_hours/__snapshots__/ProgressBar.test.jsx.snap
index f9b1f0e150..50270e810a 100644
--- a/web-ui/src/components/contribution_hours/__snapshots__/ProgressBar.test.jsx.snap
+++ b/web-ui/src/components/contribution_hours/__snapshots__/ProgressBar.test.jsx.snap
@@ -14,13 +14,20 @@ exports[`has billable hours 1`] = `
+
+
@@ -30,9 +37,10 @@ exports[`has billable hours 1`] = `
style="display: block;"
>
Billable Hours:
+ 1200
- Contribution Hours:
- 925
+ 1500
- Target Hours:
1850
- PTO Hours:
@@ -66,13 +74,13 @@ exports[`has no billable hours 1`] = `
@@ -82,9 +90,10 @@ exports[`has no billable hours 1`] = `
style="display: block;"
>
Billable Hours:
+ 0
- Contribution Hours:
- 925
+ 1500
- Target Hours:
1850
- PTO Hours:
diff --git a/web-ui/src/components/edit_skills/EditSkillsCard.test.jsx b/web-ui/src/components/edit_skills/EditSkillsCard.test.jsx
index a5c7f197bf..94ae952868 100644
--- a/web-ui/src/components/edit_skills/EditSkillsCard.test.jsx
+++ b/web-ui/src/components/edit_skills/EditSkillsCard.test.jsx
@@ -72,7 +72,7 @@ const server = setupServer(
})
);
-beforeAll(() => server.listen());
+beforeAll(() => server.listen({ onUnhandledRequest(request, print) {} }));
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
diff --git a/web-ui/src/components/feedback_request_card/FeedbackRequestCard.jsx b/web-ui/src/components/feedback_request_card/FeedbackRequestCard.jsx
index ae439d4ef8..7bc992bba1 100644
--- a/web-ui/src/components/feedback_request_card/FeedbackRequestCard.jsx
+++ b/web-ui/src/components/feedback_request_card/FeedbackRequestCard.jsx
@@ -106,9 +106,6 @@ const FeedbackRequestCard = ({
requestDate => {
let oldestDate = new Date();
switch (dateRange) {
- case DateRange.THREE_MONTHS:
- oldestDate.setMonth(oldestDate.getMonth() - 3);
- break;
case DateRange.SIX_MONTHS:
oldestDate.setMonth(oldestDate.getMonth() - 6);
break;
@@ -117,6 +114,7 @@ const FeedbackRequestCard = ({
break;
case DateRange.ALL_TIME:
return true;
+ case DateRange.THREE_MONTHS:
default:
oldestDate.setMonth(oldestDate.getMonth() - 3);
}
@@ -181,10 +179,6 @@ const FeedbackRequestCard = ({
let sortMethod;
switch (sortType) {
- case SortOption.SENT_DATE:
- sortMethod = (a, b) =>
- new Date(a.sendDate) > new Date(b.sendDate) ? -1 : 1;
- break;
case SortOption.SUBMISSION_DATE:
sortMethod = (a, b) =>
!a.submitDate || new Date(a.submitDate) > new Date(b.submitDate)
@@ -205,6 +199,7 @@ const FeedbackRequestCard = ({
? -1
: 1;
break;
+ case SortOption.SENT_DATE:
default:
sortMethod = (a, b) =>
new Date(a.sendDate) > new Date(b.sendDate) ? -1 : 1;
diff --git a/web-ui/src/components/feedback_request_card/FeedbackRequestCard.test.jsx b/web-ui/src/components/feedback_request_card/FeedbackRequestCard.test.jsx
index 1d78434b16..89b6087bc3 100644
--- a/web-ui/src/components/feedback_request_card/FeedbackRequestCard.test.jsx
+++ b/web-ui/src/components/feedback_request_card/FeedbackRequestCard.test.jsx
@@ -8,6 +8,8 @@ it('renders correctly', () => {
{
snapshot(
-
+
) : (
-
+
{isReviewing ? 'Reviewing' : 'Submitting'} Feedback on{' '}
{requesteeName}
-{/* {!isReviewing && ( */}
-{/* */}
-{/* */}
-{/* info-icon */}
-{/* */}
-{/* */}
-{/* Tip of the day: */}
-{/* {tip} */}
-{/* */}
-{/*
*/}
-{/* )} */}
{!isReviewing && (
Notice!
diff --git a/web-ui/src/components/feedback_submit_question/FeedbackSubmitQuestion.test.jsx b/web-ui/src/components/feedback_submit_question/FeedbackSubmitQuestion.test.jsx
index c46d8e72be..fc8df5643b 100644
--- a/web-ui/src/components/feedback_submit_question/FeedbackSubmitQuestion.test.jsx
+++ b/web-ui/src/components/feedback_submit_question/FeedbackSubmitQuestion.test.jsx
@@ -10,7 +10,7 @@ it('renders the feedback submit question as text', () => {
id: '1',
question: 'How is the project going so far?',
questionNumber: 1,
- questionType: 'TEXT'
+ inputType: 'TEXT'
}}
readOnly={false}
answer={{
@@ -34,7 +34,7 @@ it('renders the feedback submit question as radio buttons', () => {
id: '1',
question: 'Do you think the project is going well so far?',
questionNumber: 1,
- questionType: 'RADIO'
+ inputType: 'RADIO'
}}
readOnly={false}
answer={{
@@ -58,7 +58,7 @@ it('renders the feedback submit question as a slider', () => {
id: '1',
question: 'Do you think the project is going well so far?',
questionNumber: 1,
- questionType: 'SLIDER'
+ inputType: 'SLIDER'
}}
readOnly={false}
answer={{
diff --git a/web-ui/src/components/feedback_submit_question/__snapshots__/FeedbackSubmitQuestion.test.jsx.snap b/web-ui/src/components/feedback_submit_question/__snapshots__/FeedbackSubmitQuestion.test.jsx.snap
index 19fa4ce493..64a5a0343e 100644
--- a/web-ui/src/components/feedback_submit_question/__snapshots__/FeedbackSubmitQuestion.test.jsx.snap
+++ b/web-ui/src/components/feedback_submit_question/__snapshots__/FeedbackSubmitQuestion.test.jsx.snap
@@ -11,6 +11,101 @@ exports[`renders the feedback submit question as a slider 1`] = `
>
Do you think the project is going well so far?
+
+
+
+
+
+ Strongly Disagree
+
+
+
+ Disagree
+
+
+
+ Neither Agree nor Disagree
+
+
+
+ Agree
+
+
+
+ Strongly Agree
+
+
+
+
+
`;
@@ -26,6 +121,108 @@ exports[`renders the feedback submit question as radio buttons 1`] = `
>
Do you think the project is going well so far?
+
`;
@@ -41,6 +238,44 @@ exports[`renders the feedback submit question as text 1`] = `
>
How is the project going so far?
+
+
+
+
+
+
+
+
+
+
+
+
+
`;
diff --git a/web-ui/src/components/guild-results/EditGuildModal.spec.jsx b/web-ui/src/components/guild-results/EditGuildModal.spec.jsx
index dced872d30..bbc3943f2d 100644
--- a/web-ui/src/components/guild-results/EditGuildModal.spec.jsx
+++ b/web-ui/src/components/guild-results/EditGuildModal.spec.jsx
@@ -20,7 +20,7 @@ const server = setupServer(
})
);
-beforeAll(() => server.listen());
+beforeAll(() => server.listen({ onUnhandledRequest(request, print) {} }));
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
diff --git a/web-ui/src/components/guild-results/GuildSummaryCard.test.jsx b/web-ui/src/components/guild-results/GuildSummaryCard.test.jsx
index 3d5f6a41e0..bd7b5c6cec 100644
--- a/web-ui/src/components/guild-results/GuildSummaryCard.test.jsx
+++ b/web-ui/src/components/guild-results/GuildSummaryCard.test.jsx
@@ -51,7 +51,7 @@ it('renders correctly', () => {
snapshot(
-
+
);
@@ -61,7 +61,7 @@ it('renders correctly for ADMIN', () => {
snapshot(
-
+
);
@@ -71,7 +71,7 @@ it('renders correctly for guild lead', () => {
snapshot(
-
+
);
diff --git a/web-ui/src/components/member_selector/MemberSelector.jsx b/web-ui/src/components/member_selector/MemberSelector.jsx
index 508282b11a..7d4e2e990f 100644
--- a/web-ui/src/components/member_selector/MemberSelector.jsx
+++ b/web-ui/src/components/member_selector/MemberSelector.jsx
@@ -153,13 +153,15 @@ const MemberSelector = ({
action={
- setDialogOpen(true)}
- disabled={disabled}
- >
-
-
+
+ setDialogOpen(true)}
+ disabled={disabled}
+ >
+
+
+
{exportable && (
diff --git a/web-ui/src/components/member_selector/__snapshots__/MemberSelector.test.jsx.snap b/web-ui/src/components/member_selector/__snapshots__/MemberSelector.test.jsx.snap
index d1dcddbe1a..7833e0e042 100644
--- a/web-ui/src/components/member_selector/__snapshots__/MemberSelector.test.jsx.snap
+++ b/web-ui/src/components/member_selector/__snapshots__/MemberSelector.test.jsx.snap
@@ -39,29 +39,33 @@ exports[`MemberSelector > renders correctly as a controlled component 1`] = `
-
-
-
+
+
+
-
-
-
+
+
renders correctly when disabled 1`] = `
@@ -195,29 +203,33 @@ exports[`MemberSelector > renders correctly with default props 1`] = `
diff --git a/web-ui/src/components/member_selector/member_selector_dialog/MemberSelectorDialog.spec.jsx b/web-ui/src/components/member_selector/member_selector_dialog/MemberSelectorDialog.spec.jsx
index 9d36237959..c919b78945 100644
--- a/web-ui/src/components/member_selector/member_selector_dialog/MemberSelectorDialog.spec.jsx
+++ b/web-ui/src/components/member_selector/member_selector_dialog/MemberSelectorDialog.spec.jsx
@@ -78,7 +78,7 @@ const server = setupServer(
)
);
-beforeAll(() => server.listen());
+beforeAll(() => server.listen({ onUnhandledRequest(request, print) {} }));
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
diff --git a/web-ui/src/components/notes/Note.jsx b/web-ui/src/components/notes/Note.jsx
index a353856fbf..df1ac56245 100644
--- a/web-ui/src/components/notes/Note.jsx
+++ b/web-ui/src/components/notes/Note.jsx
@@ -85,7 +85,7 @@ const Notes = props => {
}
}
} catch (e) {
- console.log(e);
+ console.error("getNotes: " + e);
}
setIsLoading(false);
}
diff --git a/web-ui/src/components/private-note/PrivateNote.jsx b/web-ui/src/components/private-note/PrivateNote.jsx
index d964c9c26f..4e7eaf717b 100644
--- a/web-ui/src/components/private-note/PrivateNote.jsx
+++ b/web-ui/src/components/private-note/PrivateNote.jsx
@@ -91,7 +91,7 @@ const PrivateNote = () => {
}
}
} catch (e) {
- console.log(e);
+ console.error("getPrivateNotes: " + e);
}
setIsLoading(false);
}
diff --git a/web-ui/src/components/reviews/TeamMemberReview.jsx b/web-ui/src/components/reviews/TeamMemberReview.jsx
index d22bec0b88..d87bc5515e 100644
--- a/web-ui/src/components/reviews/TeamMemberReview.jsx
+++ b/web-ui/src/components/reviews/TeamMemberReview.jsx
@@ -131,6 +131,7 @@ const TeamMemberReview = ({
: 'Self-Review'
}
{...a11yProps(0)}
+ key={0}
/>
{reviews &&
reviews.filter(r => !!r).map((review, index) => {
@@ -148,7 +149,10 @@ const TeamMemberReview = ({
}
return (
-
+
);
})}
@@ -158,7 +162,7 @@ const TeamMemberReview = ({
index={value}
onChangeIndex={handleChangeIndex}
>
-
+
{selfReview?.id ? (
+
{
: aName.localeCompare(b.name));
})
.map((period) => (
-
+
server.listen());
+beforeAll(() => server.listen({ onUnhandledRequest(request, print) {} }));
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
diff --git a/web-ui/src/components/team-results/TeamSummaryCard.test.jsx b/web-ui/src/components/team-results/TeamSummaryCard.test.jsx
index 8945e2957c..937367ce03 100644
--- a/web-ui/src/components/team-results/TeamSummaryCard.test.jsx
+++ b/web-ui/src/components/team-results/TeamSummaryCard.test.jsx
@@ -15,7 +15,7 @@ const teams = [
description: '',
teamMembers: [
{
- memberid: '3fa4-5717-4562-b3fc-2c963f66afa9',
+ memberId: '3fa4-5717-4562-b3fc-2c963f66afa9',
name: 'testname',
lead: true
}
diff --git a/web-ui/src/components/team-results/TeamsActions.test.jsx b/web-ui/src/components/team-results/TeamsActions.test.jsx
index ce3e7031bb..aaa1f51a7d 100644
--- a/web-ui/src/components/team-results/TeamsActions.test.jsx
+++ b/web-ui/src/components/team-results/TeamsActions.test.jsx
@@ -33,7 +33,7 @@ const initialState = {
it('renders correctly', () => {
snapshot(
-
+
);
});
diff --git a/web-ui/src/components/team-results/__snapshots__/TeamSummaryCard.test.jsx.snap b/web-ui/src/components/team-results/__snapshots__/TeamSummaryCard.test.jsx.snap
index 6b55c57066..e3bb03f12f 100644
--- a/web-ui/src/components/team-results/__snapshots__/TeamSummaryCard.test.jsx.snap
+++ b/web-ui/src/components/team-results/__snapshots__/TeamSummaryCard.test.jsx.snap
@@ -188,7 +188,7 @@ exports[`renders correctly for team lead 1`] = `
Team Leads:
testname
@@ -200,7 +200,48 @@ exports[`renders correctly for team lead 1`] = `
+ >
+
+
`;
diff --git a/web-ui/src/components/template-card/TemplateCard.test.jsx b/web-ui/src/components/template-card/TemplateCard.test.jsx
index 51aaf357b3..b279cc8890 100644
--- a/web-ui/src/components/template-card/TemplateCard.test.jsx
+++ b/web-ui/src/components/template-card/TemplateCard.test.jsx
@@ -8,7 +8,7 @@ it('renders correctly', () => {
);
diff --git a/web-ui/src/components/volunteer/VolunteerTables.test.jsx b/web-ui/src/components/volunteer/VolunteerTables.test.jsx
new file mode 100644
index 0000000000..0a745e7c98
--- /dev/null
+++ b/web-ui/src/components/volunteer/VolunteerTables.test.jsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import VolunteerTables from './VolunteerTables';
+import { AppContextProvider } from '../../context/AppContext';
+import { BrowserRouter } from 'react-router-dom';
+
+
+const initialState = {
+ state: {
+ userProfile: {
+ name: 'Mitch Hedberg',
+ role: ['MEMBER'],
+ },
+ },
+};
+
+it('renders correctly', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
diff --git a/web-ui/src/components/volunteer/__snapshots__/VolunteerTables.test.jsx.snap b/web-ui/src/components/volunteer/__snapshots__/VolunteerTables.test.jsx.snap
new file mode 100644
index 0000000000..91bfa13eb8
--- /dev/null
+++ b/web-ui/src/components/volunteer/__snapshots__/VolunteerTables.test.jsx.snap
@@ -0,0 +1,168 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`renders correctly 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+ Member
+ 🔼
+
+
+ Organization
+
+
+ Start Date
+
+
+ End Date
+
+
+ Actions
+
+
+
+
+
+
+
+ The administrator may edit organizations to ensure accuracy.
+
+
+
+
+
+
+
+
+`;
diff --git a/web-ui/src/pages/CertificationReportPage.test.jsx b/web-ui/src/pages/CertificationReportPage.test.jsx
new file mode 100644
index 0000000000..1e821f18a8
--- /dev/null
+++ b/web-ui/src/pages/CertificationReportPage.test.jsx
@@ -0,0 +1,34 @@
+import React from 'react';
+import CertificationReportPage from './CertificationReportPage';
+import { AppContextProvider } from '../context/AppContext';
+import { BrowserRouter } from 'react-router-dom';
+
+const userStateWithPermission = {
+ state: {
+ userProfile: {
+ name: 'Mitch Hedberg',
+ role: ['MEMBER'],
+ permissions: [{ permission: 'CAN_MANAGE_EARNED_CERTIFICATIONS' }],
+ }
+ }
+};
+
+it('renders correctly', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
+
+it('renders an error if user does not have appropriate permission', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
diff --git a/web-ui/src/pages/CheckinsReportPage.test.jsx b/web-ui/src/pages/CheckinsReportPage.test.jsx
new file mode 100644
index 0000000000..4299d33188
--- /dev/null
+++ b/web-ui/src/pages/CheckinsReportPage.test.jsx
@@ -0,0 +1,35 @@
+import React from 'react';
+import CheckinsReportPage from './CheckinsReportPage';
+import { AppContextProvider } from '../context/AppContext';
+import { BrowserRouter } from 'react-router-dom';
+
+const userStateWithPermission = {
+ state: {
+ userProfile: {
+ name: 'Mitch Hedberg',
+ role: ['MEMBER'],
+ permissions: [{ permission: 'CAN_VIEW_CHECKINS_REPORT' }],
+ },
+ terminatedMembers: [],
+ }
+};
+
+it('renders correctly', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
+
+it('renders an error if user does not have appropriate permission', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
diff --git a/web-ui/src/pages/EditPermissionsPage.jsx b/web-ui/src/pages/EditPermissionsPage.jsx
index 350f50b1e1..579080bd79 100644
--- a/web-ui/src/pages/EditPermissionsPage.jsx
+++ b/web-ui/src/pages/EditPermissionsPage.jsx
@@ -229,7 +229,7 @@ const EditPermissionsPage = () => {
}
});
} else {
- console.log(res?.error);
+ console.error(res?.error);
window.snackDispatch({
type: UPDATE_TOAST,
payload: {
@@ -253,7 +253,7 @@ const EditPermissionsPage = () => {
}
});
} else {
- console.log(res?.error);
+ console.error(res?.error);
window.snackDispatch({
type: UPDATE_TOAST,
payload: {
diff --git a/web-ui/src/pages/EmailPage.test.jsx b/web-ui/src/pages/EmailPage.test.jsx
new file mode 100644
index 0000000000..7ee3c50bf2
--- /dev/null
+++ b/web-ui/src/pages/EmailPage.test.jsx
@@ -0,0 +1,37 @@
+import React from 'react';
+import EmailPage from './EmailPage';
+import { AppContextProvider } from '../context/AppContext';
+import { BrowserRouter } from 'react-router-dom';
+
+window.scrollTo = vi.fn();
+
+const userStateWithPermission = {
+ state: {
+ userProfile: {
+ name: 'Mitch Hedberg',
+ role: ['MEMBER'],
+ permissions: [{ permission: 'CAN_SEND_EMAIL' }],
+ },
+ terminatedMembers: [],
+ }
+};
+
+it('renders correctly', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
+
+it('renders an error if user does not have appropriate permission', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
diff --git a/web-ui/src/pages/FeedbackRequestPage.jsx b/web-ui/src/pages/FeedbackRequestPage.jsx
index 6981ad8556..88486a98a6 100644
--- a/web-ui/src/pages/FeedbackRequestPage.jsx
+++ b/web-ui/src/pages/FeedbackRequestPage.jsx
@@ -191,13 +191,6 @@ const FeedbackRequestPage = () => {
return hasFor() && templateIsValid && hasFrom();
} else if (activeStep === 3) {
const dueQueryValid = query.due ? isValidDate(query.due) : true;
- console.log({
- hasFor: hasFor(),
- templateIsValid,
- hasFrom: hasFrom(),
- hasSend: hasSend(),
- dueQueryValid
- });
return (
hasFor() && templateIsValid && hasFrom() && hasSend() && dueQueryValid
);
diff --git a/web-ui/src/pages/FeedbackSubmitPage.jsx b/web-ui/src/pages/FeedbackSubmitPage.jsx
index 17a45ad91e..4475dcb3fc 100644
--- a/web-ui/src/pages/FeedbackSubmitPage.jsx
+++ b/web-ui/src/pages/FeedbackSubmitPage.jsx
@@ -7,6 +7,7 @@ import { useHistory, useLocation } from 'react-router-dom';
import {
selectCsrfToken,
selectCurrentUser,
+ selectIsSubordinateOfCurrentUser,
selectProfile
} from '../context/selectors';
import { AppContext } from '../context/AppContext';
@@ -52,11 +53,6 @@ const FeedbackSubmitPage = () => {
const [requestCanceled, setRequestCanceled] = useState(false);
const feedbackRequestFetched = useRef(false);
- function isManager(revieweeProfile) {
- const supervisorId = revieweeProfile?.supervisorid;
- return supervisorId === currentUserId;
- }
-
useEffect(() => {
if (!requestQuery && !selfRequestQuery) {
history.push('/checkins');
@@ -147,12 +143,12 @@ const FeedbackSubmitPage = () => {
feedbackRequest?.recipientId
);
- // If this is our review or we are the manager of the reviewer we are
- // allowed to view this review.
- if (recipientProfile?.id != currentUserId &&
- !isManager(recipientProfile)) {
+ // If we know the current user and it's not the recipient or someone in the person having feedback given's
+ // management heirarchy, then we should issue an error and send them home...
+ if (currentUserId && feedbackRequest?.recipientId != currentUserId &&
+ !selectIsSubordinateOfCurrentUser(feedbackRequest?.requesteeId)) {
// The current user is not the recipients's manager, we need to leave.
- history.push('/checkins');
+ history.push('/');
window.snackDispatch({
type: UPDATE_TOAST,
payload: {
@@ -170,10 +166,10 @@ const FeedbackSubmitPage = () => {
);
setRecipient(recipientProfile);
}
- }, [feedbackRequest, selfReviewRequest, state]);
+ }, [currentUserId, feedbackRequest, selfReviewRequest, state]);
return (
-
+
{requestCanceled ? (
This feedback request has been canceled.
diff --git a/web-ui/src/pages/FeedbackSubmitPage.test.jsx b/web-ui/src/pages/FeedbackSubmitPage.test.jsx
new file mode 100644
index 0000000000..40fe4ac292
--- /dev/null
+++ b/web-ui/src/pages/FeedbackSubmitPage.test.jsx
@@ -0,0 +1,88 @@
+import React from 'react';
+import FeedbackSubmitPage from './FeedbackSubmitPage';
+import { AppContextProvider } from '../context/AppContext';
+import { http, HttpResponse } from 'msw';
+import { setupServer } from 'msw/node';
+import { MemoryRouter } from 'react-router-dom';
+
+window.snackDispatch = vi.fn();
+
+const userProfile = {
+ id: 'member-id',
+ name: 'Mitch Hedberg',
+ role: ['MEMBER'],
+ workEmail: 'hedbergm@objectcomputing.com',
+ title: 'Strategic Placement Specialist',
+ location: 'Roseville, Minnesota',
+ memberProfile: {
+ id: 'member-id',
+ bioText: 'Died too young.',
+ },
+};
+
+const userStateWithPermission = {
+ state: {
+ csrf: 'csrf',
+ userProfile: userProfile,
+ teams: [],
+ memberProfiles: [
+ {
+ id: 'some-id',
+ name: 'James Johnson',
+ },
+ userProfile,
+ ],
+ },
+ dispatch: vi.fn(),
+};
+
+const server = setupServer(
+ http.get('http://localhost:8080/services/feedback/requests/request-id', ({ request }) => {
+ return HttpResponse.json(
+ {
+ 'id': 'request-id',
+ 'status': 'SUBMITTED',
+ 'requesteeId': userStateWithPermission.state.memberProfiles[0].id,
+ 'recipientId': userStateWithPermission.state.memberProfiles[1].id,
+ },
+ );
+ }),
+ http.get('http://localhost:8080/services/feedback/requests/canceled-request-id', ({ request }) => {
+ return HttpResponse.json(
+ {
+ 'id': 'canceled-request-id',
+ 'status': 'CANCELED',
+ 'requesteeId': userStateWithPermission.state.memberProfiles[0].id,
+ 'recipientId': userStateWithPermission.state.memberProfiles[1].id,
+ },
+ );
+ }),
+);
+
+beforeAll(() => server.listen({ onUnhandledRequest(request, print) {} }));
+afterEach(() => server.resetHandlers());
+afterAll(() => server.close());
+
+it('renders correctly - submitted', async () => {
+ await waitForSnapshot(
+ 'request-id',
+
+
+
+
+
+ );
+});
+
+it('renders correctly - canceled', async () => {
+ await waitForSnapshot(
+ 'canceled-request-id',
+
+
+
+
+
+ );
+});
diff --git a/web-ui/src/pages/ManageKudosPage.jsx b/web-ui/src/pages/ManageKudosPage.jsx
index e495efb5f9..8b9473a08f 100644
--- a/web-ui/src/pages/ManageKudosPage.jsx
+++ b/web-ui/src/pages/ManageKudosPage.jsx
@@ -63,6 +63,20 @@ const ManageKudosPage = () => {
const [approvedKudosLoading, setApprovedKudosLoading] = useState(true);
const [kudosTab, setKudosTab] = useState("PENDING");
const [timeRange, setTimeRange] = useState(DateRange.TWO_WEEKS);
+ const [pendingSort, setPendingSort] = useState(SortOption.OLDEST);
+
+ const sortPendingKudos = (pending) => {
+ return pending.sort((a, b) => {
+ const l = pendingSort === SortOption.NEWEST ? a : b;
+ const r = pendingSort === SortOption.NEWEST ? b : a;
+ for(let i = 0; i < l.dateCreated.length; i++) {
+ if (l.dateCreated[i] != r.dateCreated[i]) {
+ return r.dateCreated[i] - l.dateCreated[i];
+ }
+ }
+ return 0;
+ });
+ };
const loadPendingKudos = useCallback(async () => {
setPendingKudosLoading(true);
@@ -85,17 +99,21 @@ const ManageKudosPage = () => {
useEffect(() => {
loadPendingKudos().then(data => {
if (data) {
- setPendingKudos(data);
+ setPendingKudos(sortPendingKudos(data));
}
});
}, [csrf, dispatch, loadPendingKudos]);
+ useEffect(() => {
+ setPendingKudos(sortPendingKudos([...pendingKudos]));
+ }, [pendingSort]);
+
const handleTabChange = useCallback((event, newTab) => {
switch (newTab) {
case "PENDING":
loadPendingKudos().then(data => {
if (data) {
- setPendingKudos(data);
+ setPendingKudos(sortPendingKudos(data));
}
});
break;
@@ -113,6 +131,33 @@ const ManageKudosPage = () => {
setKudosTab(newTab);
}, [loadPendingKudos, loadApprovedKudos]);
+ const filterApprovedKudos = (kudos) => {
+ if (!kudos.dateApproved) {
+ return false;
+ }
+
+ const now = new Date();
+ const approved = new Date(kudos.dateApproved[0],
+ kudos.dateApproved[1] - 1,
+ kudos.dateApproved[2]).getTime();
+ switch(timeRange) {
+ case DateRange.ONE_WEEK:
+ return approved >= (new Date(now.getFullYear(), now.getMonth(),
+ now.getDate() - 7).getTime());
+ case DateRange.TWO_WEEKS:
+ return approved >= (new Date(now.getFullYear(), now.getMonth(),
+ now.getDate() - 14).getTime());
+ case DateRange.ONE_MONTH:
+ return approved >= (new Date(now.getFullYear(), now.getMonth() - 1,
+ now.getDate()).getTime());
+ case DateRange.ONE_YEAR:
+ return approved >= (new Date(now.getFullYear() - 1, now.getMonth(),
+ now.getDate()).getTime());
+ case DateRange.ALL_TIME:
+ return true;
+ }
+ };
+
return selectHasAdministerKudosPermission(state) ? (
@@ -141,6 +186,8 @@ const ManageKudosPage = () => {
select
label="Sort by"
variant="outlined"
+ value={pendingSort}
+ onChange={(event) => setPendingSort(event.target.value)}
>
Newest
Oldest
@@ -176,7 +223,7 @@ const ManageKudosPage = () => {
? Array.from({length: 5}).map((_, index) => )
: (
- {approvedKudos.map(k =>
+ {approvedKudos.filter(filterApprovedKudos).map(k =>
)}
diff --git a/web-ui/src/pages/MeritReportPage.jsx b/web-ui/src/pages/MeritReportPage.jsx
index a590607277..dde1ff7dd3 100644
--- a/web-ui/src/pages/MeritReportPage.jsx
+++ b/web-ui/src/pages/MeritReportPage.jsx
@@ -19,6 +19,8 @@ import { useQueryParameters } from '../helpers/query-parameters';
import markdown from 'markdown-builder';
+const noneAvailable = "None available during the period covered by this review.";
+
const MeritReportPage = () => {
const { state, dispatch } = useContext(AppContext);
@@ -79,7 +81,8 @@ const MeritReportPage = () => {
if (data) {
let periods = data.reduce((result, item) => {
if (item.closeDate) {
- result.push({label: formatReviewDate(item.closeDate),
+ result.push({label: item.name + ' - ' +
+ formatReviewDate(item.closeDate),
id: item.id});
}
return result;
@@ -256,49 +259,58 @@ const MeritReportPage = () => {
let text = markdown.headers.h1("Current Information");
text += years.toFixed(1) + " years\n\n";
text += markdown.headers.h2("Biographical Notes");
- text += currentInfo.biography + "\n\n";
+ text += (currentInfo.biography ? currentInfo.biography :
+ noneAvailable) + "\n\n";
return text;
};
const markdownKudos = (data) => {
const kudosList = data.kudos;
let text = markdown.headers.h1("Kudos");
- for (let kudos of kudosList) {
- const date = dateFromArray(kudos.dateCreated);
- text += kudos.message + "\n\n";
- text += " " +
- markdown.emphasis.i("Submitted on " + formatDate(date) +
- ", by " + kudos.sender) +
- "\n\n\n";
+ if (kudosList.length > 0) {
+ for (let kudos of kudosList) {
+ const date = dateFromArray(kudos.dateCreated);
+ text += kudos.message + "\n\n";
+ text += " " +
+ markdown.emphasis.i("Submitted on " + formatDate(date) +
+ ", by " + kudos.sender) +
+ "\n\n\n";
+ }
+ } else {
+ text += noneAvailable + "\n\n";
}
return text;
};
const markdownReviewsImpl = (title, feedbackList, listMembers) => {
let text = markdown.headers.h1(title);
- for(let feedback of feedbackList) {
- const members = getUniqueMembers(feedback.answers);
- for(let member of Object.keys(members)) {
- if (listMembers) {
- text += member + ": ";
- }
- text += "Submitted - " + formatDate(members[member]) + "\n\n";
- }
- text += "\n";
-
- const questions = getUniqueQuestions(feedback.answers);
- for(let question of Object.keys(questions)) {
- text += markdown.headers.h4(question) + "\n";
- for(let answer of questions[question]) {
+ if (feedbackList.length > 0) {
+ for(let feedback of feedbackList) {
+ const members = getUniqueMembers(feedback.answers);
+ for(let member of Object.keys(members)) {
if (listMembers) {
- text += answer[0] + ": ";
+ text += member + ": ";
}
- text += answer[1] + "\n\n";
+ text += "Submitted - " + formatDate(members[member]) + "\n\n";
}
text += "\n";
+
+ const questions = getUniqueQuestions(feedback.answers);
+ for(let question of Object.keys(questions)) {
+ text += markdown.headers.h4(question) + "\n";
+ for(let answer of questions[question]) {
+ if (listMembers) {
+ text += answer[0] + ": ";
+ }
+ text += answer[1] + "\n\n";
+ }
+ text += "\n";
+ }
}
+ text += "\n";
+ } else {
+ text += noneAvailable + "\n\n";
}
- text += "\n";
return text;
}
@@ -347,31 +359,35 @@ const MeritReportPage = () => {
const markdownFeedback = (data) => {
let text = markdown.headers.h1("Feedback");
const feedbackList = data.feedback;
- for(let feedback of feedbackList) {
- text += markdown.headers.h2("Template: " + feedback.name);
- const members = getUniqueMembers(feedback.answers);
- for(let member of Object.keys(members)) {
- text += member + ": " + formatDate(members[member]) + "\n\n";
- }
- text += "\n";
-
- const questions = getUniqueQuestions(feedback.answers);
- for(let question of Object.keys(questions)) {
- text += markdown.headers.h4(question) + "\n";
- for(let answer of questions[question]) {
- text += answer[0] + ": " + answer[1] + "\n\n";
+ if (feedbackList.length > 0) {
+ for(let feedback of feedbackList) {
+ text += markdown.headers.h2("Template: " + feedback.name);
+ const members = getUniqueMembers(feedback.answers);
+ for(let member of Object.keys(members)) {
+ text += member + ": " + formatDate(members[member]) + "\n\n";
}
text += "\n";
+
+ const questions = getUniqueQuestions(feedback.answers);
+ for(let question of Object.keys(questions)) {
+ text += markdown.headers.h4(question) + "\n";
+ for(let answer of questions[question]) {
+ text += answer[0] + ": " + answer[1] + "\n\n";
+ }
+ text += "\n";
+ }
}
+ text += "\n";
+ } else {
+ text += noneAvailable + "\n\n";
}
- text += "\n";
return text;
};
const markdownTitleHistory = (data) => {
// Get the position history sorted latest to earliest
const posHistory = data.positionHistory.sort((a, b) => {
- for(let i = 0; i < a.length; i++) {
+ for(let i = 0; i < a.date.length; i++) {
if (a.date[i] != b.date[i]) {
return b.date[i] - a.date[i];
}
@@ -537,6 +553,7 @@ const MeritReportPage = () => {
option.label || ""}
value={reviewPeriodId}
onChange={onReviewPeriodChange}
renderInput={params => (
diff --git a/web-ui/src/pages/MeritReportPage.test.jsx b/web-ui/src/pages/MeritReportPage.test.jsx
new file mode 100644
index 0000000000..0012ead967
--- /dev/null
+++ b/web-ui/src/pages/MeritReportPage.test.jsx
@@ -0,0 +1,34 @@
+import React from 'react';
+import MeritReportPage from './MeritReportPage';
+import { AppContextProvider } from '../context/AppContext';
+import { BrowserRouter } from 'react-router-dom';
+
+const userStateWithPermission = {
+ state: {
+ userProfile: {
+ name: 'Mitch Hedberg',
+ role: ['MEMBER'],
+ permissions: [{ permission: 'CAN_CREATE_MERIT_REPORT' }],
+ }
+ }
+};
+
+it('renders correctly', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
+
+it('renders an error if user does not have appropriate permission', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
diff --git a/web-ui/src/pages/PeoplePage.jsx b/web-ui/src/pages/PeoplePage.jsx
index 04d3a7723e..f35b2c3679 100644
--- a/web-ui/src/pages/PeoplePage.jsx
+++ b/web-ui/src/pages/PeoplePage.jsx
@@ -42,7 +42,7 @@ const PeoplePage = () => {
const { state } = useContext(AppContext);
const loading = selectMemberProfilesLoading(state);
- const [kudosDialogOpen, setKudosDialogOpen] = useState(null);
+ const [kudosDialogOpen, setKudosDialogOpen] = useState(false);
const [searchText, setSearchText] = useState('');
const normalizedMembers = selectNormalizedMembers(state, searchText);
diff --git a/web-ui/src/pages/ProfilePage.test.jsx b/web-ui/src/pages/ProfilePage.test.jsx
new file mode 100644
index 0000000000..a5ef9e2caf
--- /dev/null
+++ b/web-ui/src/pages/ProfilePage.test.jsx
@@ -0,0 +1,34 @@
+import React from 'react';
+import ProfilePage from './ProfilePage';
+import { AppContextProvider } from '../context/AppContext';
+import { BrowserRouter } from 'react-router-dom';
+
+const userProfile = {
+ id: 'member-id',
+ name: 'Mitch Hedberg',
+ role: ['MEMBER'],
+ workEmail: 'hedbergm@objectcomputing.com',
+ title: 'Strategic Placement Specialist',
+ location: 'Roseville, Minnesota',
+ memberProfile: {
+ id: 'member-id',
+ bioText: 'Died too young.',
+ },
+};
+
+const userStateWithPermission = {
+ state: {
+ memberProfiles: [ userProfile ],
+ userProfile: userProfile,
+ }
+};
+
+it('renders correctly', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
diff --git a/web-ui/src/pages/PulseReportPage.jsx b/web-ui/src/pages/PulseReportPage.jsx
index f7152f8310..108051804e 100644
--- a/web-ui/src/pages/PulseReportPage.jsx
+++ b/web-ui/src/pages/PulseReportPage.jsx
@@ -145,7 +145,7 @@ const PulseReportPage = () => {
// This creates data in the format that recharts needs from pulse data.
useEffect(() => {
const averageData = {}; // key is member id
- const lineChartData = [];
+ const lineChartDataPoints = [];
const frequencies = [];
for (let i = 1; i <= 5; i++) {
frequencies.push({ score: i, internal: 0, external: 0 });
@@ -162,11 +162,16 @@ const PulseReportPage = () => {
const [year, month, day] = submissionDate;
const monthPadded = month.toString().padStart(2, '0');
const dayPadded = day.toString().padStart(2, '0');
- lineChartData.push({
- date: `${year}-${monthPadded}-${dayPadded}`,
- internal: internalScore,
- external: externalScore
- });
+ const date = `${year}-${monthPadded}-${dayPadded}`;
+ const found = lineChartDataPoints.find(points => points.date === date)
+ if(found) {
+ found?.datapoints?.push(pulse);
+ } else {
+ lineChartDataPoints.push({
+ date,
+ datapoints: [pulse]
+ });
+ }
frequencies[internalScore - 1].internal++;
frequencies[externalScore - 1].external++;
@@ -200,7 +205,13 @@ const PulseReportPage = () => {
}
}
- setLineChartData(lineChartData);
+ setLineChartData(lineChartDataPoints.map(day => (
+ {
+ date: day.date,
+ internal: day.datapoints.reduce((acc, current) => acc + current.internalScore, 0)/day.datapoints.length,
+ external: day.datapoints.reduce((acc, current) => acc + current.externalScore, 0)/day.datapoints.length
+ }
+ )));
setBarChartData(frequencies);
for (const memberId of Object.keys(averageData)) {
diff --git a/web-ui/src/pages/ReceivedRequestsPage.test.jsx b/web-ui/src/pages/ReceivedRequestsPage.test.jsx
new file mode 100644
index 0000000000..e8aae91492
--- /dev/null
+++ b/web-ui/src/pages/ReceivedRequestsPage.test.jsx
@@ -0,0 +1,24 @@
+import React from 'react';
+import ReceivedRequestsPage from './ReceivedRequestsPage';
+import { AppContextProvider } from '../context/AppContext';
+import { BrowserRouter } from 'react-router-dom';
+
+
+const initialState = {
+ state: {
+ userProfile: {
+ name: 'Mitch Hedberg',
+ role: ['MEMBER'],
+ },
+ },
+};
+
+it('renders correctly', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
diff --git a/web-ui/src/pages/ReviewsPage.test.jsx b/web-ui/src/pages/ReviewsPage.test.jsx
new file mode 100644
index 0000000000..be95217b18
--- /dev/null
+++ b/web-ui/src/pages/ReviewsPage.test.jsx
@@ -0,0 +1,38 @@
+import React from 'react';
+import ReviewsPage from './ReviewsPage';
+import { AppContextProvider } from '../context/AppContext';
+import { BrowserRouter } from 'react-router-dom';
+
+window.snackDispatch = vi.fn();
+
+const initialState = {
+ state: {
+ userProfile: {
+ name: 'Mitch Hedberg',
+ role: ['MEMBER'],
+ },
+ // Review Period 2 should be listed before Review Period 1 because it's OPEN
+ reviewPeriods: [
+ {
+ id: 'a44fc66a-86b0-4f15-8459-e7d4b4ecc330',
+ name: 'Review Period 1',
+ reviewStatus: 'CLOSED',
+ },
+ {
+ id: 'a44fc66a-86b0-4f15-8459-e7d4b4ecc331',
+ name: 'Review Period 2',
+ reviewStatus: 'OPEN',
+ },
+ ],
+ },
+};
+
+it('renders correctly', () => {
+ snapshot(
+
+
+
+
+
+ );
+});
diff --git a/web-ui/src/pages/SettingsPage.test.jsx b/web-ui/src/pages/SettingsPage.test.jsx
index d1d7c25022..4f114b8ce7 100644
--- a/web-ui/src/pages/SettingsPage.test.jsx
+++ b/web-ui/src/pages/SettingsPage.test.jsx
@@ -47,7 +47,7 @@ const server = setupServer(
}),
);
-beforeAll(() => server.listen());
+beforeAll(() => server.listen({ onUnhandledRequest(request, print) {} }));
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
diff --git a/web-ui/src/pages/__snapshots__/CertificationReportPage.test.jsx.snap b/web-ui/src/pages/__snapshots__/CertificationReportPage.test.jsx.snap
new file mode 100644
index 0000000000..3aa7fb840a
--- /dev/null
+++ b/web-ui/src/pages/__snapshots__/CertificationReportPage.test.jsx.snap
@@ -0,0 +1,145 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`renders an error if user does not have appropriate permission 1`] = `
+
+
+ You do not have permission to view this page.
+
+
+`;
+
+exports[`renders correctly 1`] = `
+
+
+
+ Manage Certifications
+
+
+
+
+
+
+
+
+
+
+
+ Member
+ 🔼
+
+
+ Name
+
+
+ Description
+
+
+ Earned On
+
+
+ Expiration
+
+
+ Validation Image
+
+
+ Badge
+
+
+ Actions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/web-ui/src/pages/__snapshots__/CheckinsReportPage.test.jsx.snap b/web-ui/src/pages/__snapshots__/CheckinsReportPage.test.jsx.snap
new file mode 100644
index 0000000000..9553f57e44
--- /dev/null
+++ b/web-ui/src/pages/__snapshots__/CheckinsReportPage.test.jsx.snap
@@ -0,0 +1,218 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`renders an error if user does not have appropriate permission 1`] = `
+
+
+ You do not have permission to view this page.
+
+
+`;
+
+exports[`renders correctly 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Q4 2024
+
+
+
+
+
+
+
+
+
+
+
+
+ Start of Quarter
+
+
+ Tue Oct 01 2024
+
+
+
+
+ End of Quarter
+
+
+ Tue Dec 31 2024
+
+
+
+
+
+
+
+ No PDLs selected
+
+
+ Please select some PDLs using the Member Selector.
+
+
+
+
+
+`;
diff --git a/web-ui/src/pages/__snapshots__/EmailPage.test.jsx.snap b/web-ui/src/pages/__snapshots__/EmailPage.test.jsx.snap
new file mode 100644
index 0000000000..94d95652a9
--- /dev/null
+++ b/web-ui/src/pages/__snapshots__/EmailPage.test.jsx.snap
@@ -0,0 +1,305 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`renders an error if user does not have appropriate permission 1`] = `
+
+
+ You do not have permission to view this page.
+
+
+`;
+
+exports[`renders correctly 1`] = `
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+ Choose Email Format
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+ Compose Email
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3
+
+
+
+
+
+ Select Recipients
+
+
+
+
+
+
+
+
+
+`;
diff --git a/web-ui/src/pages/__snapshots__/FeedbackSubmitPage.test.jsx.snap b/web-ui/src/pages/__snapshots__/FeedbackSubmitPage.test.jsx.snap
new file mode 100644
index 0000000000..bc9357ff5f
--- /dev/null
+++ b/web-ui/src/pages/__snapshots__/FeedbackSubmitPage.test.jsx.snap
@@ -0,0 +1,143 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`renders correctly - canceled 1`] = `
+
+
+
+ This feedback request has been canceled.
+
+
+
+`;
+
+exports[`renders correctly - submitted 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reviewing
+ Feedback on
+
+
+ James Johnson
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/web-ui/src/pages/__snapshots__/MeritReportPage.test.jsx.snap b/web-ui/src/pages/__snapshots__/MeritReportPage.test.jsx.snap
new file mode 100644
index 0000000000..470a70b25a
--- /dev/null
+++ b/web-ui/src/pages/__snapshots__/MeritReportPage.test.jsx.snap
@@ -0,0 +1,277 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`renders an error if user does not have appropriate permission 1`] = `
+
+
+ You do not have permission to view this page.
+
+
+`;
+
+exports[`renders correctly 1`] = `
+
+
+
+
+
+ Compensation History File
+
+
+
+
+
+
+
+
+ Current Information File
+
+
+
+
+
+
+
+
+ Position History File
+
+
+
+
+
+
+
+ Upload Files
+
+
+
+
+
+
+
+
+
+
+
+ Generate Report
+
+
+
+
+
+
+`;
diff --git a/web-ui/src/pages/__snapshots__/ProfilePage.test.jsx.snap b/web-ui/src/pages/__snapshots__/ProfilePage.test.jsx.snap
new file mode 100644
index 0000000000..257c38b7cf
--- /dev/null
+++ b/web-ui/src/pages/__snapshots__/ProfilePage.test.jsx.snap
@@ -0,0 +1,746 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`renders correctly 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No teams found
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Organization
+
+
+ Start Date
+
+
+ End Date
+
+
+ Actions
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The administrator may edit organizations to ensure accuracy.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Description
+
+
+ Earned On
+
+
+ Expiration
+
+
+ Validation Image
+
+
+ Badge
+
+
+ Actions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/web-ui/src/pages/__snapshots__/ReceivedRequestsPage.test.jsx.snap b/web-ui/src/pages/__snapshots__/ReceivedRequestsPage.test.jsx.snap
new file mode 100644
index 0000000000..97e4df06f6
--- /dev/null
+++ b/web-ui/src/pages/__snapshots__/ReceivedRequestsPage.test.jsx.snap
@@ -0,0 +1,288 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`renders correctly 1`] = `
+
+`;
diff --git a/web-ui/src/pages/__snapshots__/ReviewsPage.test.jsx.snap b/web-ui/src/pages/__snapshots__/ReviewsPage.test.jsx.snap
new file mode 100644
index 0000000000..042cf8bedf
--- /dev/null
+++ b/web-ui/src/pages/__snapshots__/ReviewsPage.test.jsx.snap
@@ -0,0 +1,107 @@
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
+
+exports[`renders correctly 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+ Review Period 2 - Open
+
+
+
+
+
+
+
+
+
+
+
+ Review Period 1 - Closed
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/web-ui/src/pages/__snapshots__/TeamSkillReportPage.test.jsx.snap b/web-ui/src/pages/__snapshots__/TeamSkillReportPage.test.jsx.snap
index 7ffd85457c..b7b15e4007 100644
--- a/web-ui/src/pages/__snapshots__/TeamSkillReportPage.test.jsx.snap
+++ b/web-ui/src/pages/__snapshots__/TeamSkillReportPage.test.jsx.snap
@@ -49,29 +49,33 @@ exports[`renders correctly 1`] = `
diff --git a/web-ui/yarn.lock b/web-ui/yarn.lock
index 6808808764..51d7dff66c 100644
--- a/web-ui/yarn.lock
+++ b/web-ui/yarn.lock
@@ -548,9 +548,9 @@
integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==
"@eslint/plugin-kit@^0.2.0":
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz#5eff371953bc13e3f4d88150e2c53959f64f74f6"
- integrity sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz#812980a6a41ecf3a8341719f92a6d1e784a2e0e8"
+ integrity sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==
dependencies:
levn "^0.4.1"
@@ -6094,9 +6094,9 @@ mute-stream@^2.0.0:
integrity sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==
nanoid@^3.3.7:
- version "3.3.7"
- resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
- integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
+ version "3.3.8"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf"
+ integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==
natural-compare@^1.4.0:
version "1.4.0"