Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Sprint 121 Merge to Master #6300

Merged
merged 9 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"23": 1,
"29": 1,
"36": 1,
"57": 2
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import "cypress-real-events/support";
// midnight on 2022-07-02, the middle of the year
const utcDate = new Date(Date.UTC(2022, 7 - 1, 2));
const localDate = new Date(2022, 7 - 1, 2);
const defaultMobileCount = 3;
const salesForceCount = 2;
const webCount = 4;

function getPastDate(daysAgo) {
// initialize date to utcDate minus a number of days
Expand All @@ -20,7 +23,7 @@ function getPastDate(daysAgo) {
}

function setupAppLoginCountsFixtures(
mobileCount = 3,
mobileCount = defaultMobileCount,
androidCount = 1,
iosCount = 1
) {
Expand All @@ -29,8 +32,8 @@ function setupAppLoginCountsFixtures(
mobile: mobileCount,
android: androidCount,
ios: iosCount,
web: 4,
salesforce: 2,
web: webCount,
salesforce: salesForceCount,
},
});
}
Expand Down Expand Up @@ -62,6 +65,10 @@ describe("Dashboard", () => {
},
});

cy.intercept("GET", "**/Dashboard/AgeCounts*", {
fixture: "DashboardService/age-count.json",
});

// used to calculate [data-testid=average-rating]
cy.intercept("GET", "**/Dashboard/Ratings/Summary*", {
fixture: "DashboardService/summary.json",
Expand Down Expand Up @@ -93,9 +100,11 @@ describe("Dashboard", () => {
cy.get("[data-testid=total-dependents]").contains(2);
cy.get("[data-testid=average-rating]").contains("4.00");
cy.get("[data-testid=recurring-user-count]").contains(2);
cy.get("[data-testid=total-mobile-users]").contains(3);
cy.get("[data-testid=total-web-users]").contains(4);
cy.get("[data-testid=total-salesforce-users]").contains(2);
cy.get("[data-testid=total-mobile-users]").contains(defaultMobileCount);
cy.get("[data-testid=total-web-users]").contains(webCount);
cy.get("[data-testid=total-salesforce-users]").contains(
salesForceCount
);

cy.get("[data-testid=daily-data-table]")
.find("tbody tr.mud-table-row")
Expand Down Expand Up @@ -138,7 +147,17 @@ describe("Dashboard Mobile Login Count Tooltip", () => {
});

cy.intercept("GET", "**/Dashboard/DailyUsageCounts*", {
fixture: "DashboardService/daily-usage-counts.json",
body: {
userRegistrations: {
[getPastDate(0)]: 2,
},
userLogins: {
[getPastDate(0)]: 6,
},
dependentRegistrations: {
[getPastDate(0)]: 2,
},
},
});

cy.intercept("GET", "**/Dashboard/Ratings/Summary*", {
Expand All @@ -148,6 +167,10 @@ describe("Dashboard Mobile Login Count Tooltip", () => {
cy.intercept("GET", "**/Dashboard/RecurringUserCount?days=3*", {
body: 2,
});

cy.intercept("GET", "**/Dashboard/AgeCounts*", {
fixture: "DashboardService/age-count.json",
});
});

it("Verify tooltip exists with android count > 0 and ios count > 0.", () => {
Expand Down
7 changes: 6 additions & 1 deletion Apps/Admin/Tests/Functional/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"compilerOptions": {
"allowJs": true,
"baseUrl": "../node_modules",
"types": ["cypress", "cy-verify-downloads"],
"types": [
"cypress",
"cy-verify-downloads",
"node",
"cypress-real-events"
],
"noEmit": true
},
"include": ["**/*.*"]
Expand Down
9 changes: 5 additions & 4 deletions Apps/Admin/Tests/Functional/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Apps/Admin/Tests/Functional/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@cypress/skip-test": "^2.6.1",
"cy-verify-downloads": "^0.1.17",
"cypress": "^13.6.0",
"cypress-real-events": "^1.12.0",
"cypress-real-events": "^1.13.0",
"cypress-xpath": "^1.8.0",
"eslint": "^8.54.0",
"eslint-plugin-chai-friendly": "^0.7.2",
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Apps/GatewayApi/src/Assets/Templates/ImmunizationReport.docx
Binary file not shown.
2 changes: 1 addition & 1 deletion Apps/GatewayApi/src/MapProfiles/UserProfileProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public UserProfileProfile()
.ForMember(dest => dest.IsEmailVerified, opt => opt.MapFrom(src => !string.IsNullOrEmpty(src.Email)))
.ForMember(dest => dest.IsSmsNumberVerified, opt => opt.MapFrom(src => !string.IsNullOrEmpty(src.SmsNumber)))
.ForMember(dest => dest.AcceptedTermsOfService, opt => opt.MapFrom(src => src.TermsOfServiceId != Guid.Empty))
.ForMember(dest => dest.BetaFeatures, opt => opt.MapFrom(src => GetBetaFeaturesFromCodes(src.BetaFeatureCodes)))
.ForMember(dest => dest.BetaFeatures, opt => opt.MapFrom(src => GetBetaFeaturesFromCodes(src.BetaFeatureCodes).Append(Database.Constants.BetaFeature.Salesforce).Distinct()))
.ReverseMap();

this.CreateMap<Database.Constants.BetaFeature, BetaFeature>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@ private static UpdateAcceptedTermsMock SetupUpdateAcceptedTermsMock(DbStatusCode
HasTermsOfServiceUpdated = true,
LastLoginDateTime = lastLoginDateTime,
HasTourUpdated = false,
BetaFeatures = [GatewayApi.Constants.BetaFeature.Salesforce],
}
: null,
ResultStatus = updateResult.Status != DbStatusCode.Updated || !userProfileExists
Expand Down Expand Up @@ -1024,6 +1025,7 @@ private static CloseUserProfileMock SetupCloseUerProfileMock(DbStatusCode update
IsEmailVerified = true,
Email = updatedUserProfile.Email,
ClosedDateTime = updatedUserProfile.ClosedDateTime,
BetaFeatures = [GatewayApi.Constants.BetaFeature.Salesforce],
}
: null,
ResultStatus = updateResult.Status != DbStatusCode.Updated || !userProfileExists
Expand Down Expand Up @@ -1146,6 +1148,7 @@ private static RecoverUserProfileMock SetupRecoverUserProfileMock(DbStatusCode u
IsEmailVerified = true,
Email = updatedUserProfile.Email,
ClosedDateTime = updatedUserProfile.ClosedDateTime,
BetaFeatures = [GatewayApi.Constants.BetaFeature.Salesforce],
}
: null,
ResultStatus = updateResult.Status != DbStatusCode.Updated || !userProfileExists
Expand Down
2 changes: 1 addition & 1 deletion Apps/WebClient/src/ClientApp/src/models/configData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export interface ServicesSettings {

export interface ServiceSettings {
name: string;
enabled: string;
enabled: boolean;
}

// Various timeout values used by the VUE WebClient application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ describe("Beta Features", () => {
cy.get("[data-testid=beta-alert]").should("be.visible");
});

it("No Link to Beta Site on Home Page for Unapproved User", () => {
it("Link to Beta Site on Home Page for Unapproved User", () => {
cy.login(
Cypress.env("keycloak.username"),
Cypress.env("keycloak.password"),
AuthMethod.KeyCloak,
homeUrl
);
cy.get("[data-testid=add-quick-link-button]").should("be.visible");
cy.get("[data-testid=beta-alert]").should("not.exist");
cy.get("[data-testid=beta-alert]").should("be.visible");
});
});
Loading
Loading