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

New summary charts #4498

Merged
merged 43 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
edb2e55
create summaries for web connections(https+hsts), ssl(TLS), spf, and …
lcampbell2 Apr 13, 2023
1dda1cc
create api queries
lcampbell2 Apr 13, 2023
80e45d0
create frontend queries for tiered summaries
lcampbell2 Apr 13, 2023
ee73052
fix ssl summary name
lcampbell2 Apr 14, 2023
caedfb5
update faked schema
lcampbell2 Apr 14, 2023
9235dba
create components for tiered summaries
lcampbell2 Apr 14, 2023
f453fa3
add new summaries to org summaries
lcampbell2 Apr 17, 2023
ceb9bdf
make tabbed summary component
lcampbell2 Apr 17, 2023
d5c2590
give orgs summary stats for hidden domains
lcampbell2 Apr 18, 2023
d913f0d
move arrow btns to top of TieredSummaries component
lcampbell2 Apr 18, 2023
b436883
add new org summaries to api
lcampbell2 Apr 18, 2023
f3af39c
add chart dmarc summary
lcampbell2 Apr 18, 2023
4c24c04
replace dmarcPhase summary with dmarcSummary on landing page
lcampbell2 Apr 18, 2023
5752ddd
refactor to use tiered summaries on landing page and org pages
lcampbell2 Apr 19, 2023
a26a735
put tier 2 and 3 behind AB testing
lcampbell2 Apr 19, 2023
709e40c
add show btn for tier one org summaries
lcampbell2 Apr 19, 2023
7c7a475
use SummaryGroup for rendering SummaryCards
lcampbell2 Apr 19, 2023
0c58c48
remove unused org summary component
lcampbell2 Apr 19, 2023
26d9b0a
add dmarc summary to myTracker result
lcampbell2 Apr 20, 2023
d0738e8
put tooltip on button
lcampbell2 Apr 20, 2023
046ee5a
remove unused icon
lcampbell2 Apr 20, 2023
7014631
change tabs to accordions
lcampbell2 Apr 24, 2023
3d780b7
add AB testing to tiered summaries
lcampbell2 Apr 25, 2023
4a08777
remove hide/show btn from A stream
lcampbell2 Apr 25, 2023
41fb4ac
update SummaryGroup test
lcampbell2 Apr 25, 2023
d01a99b
tests
lcampbell2 Apr 26, 2023
0669d49
fix summaries test
lcampbell2 Apr 27, 2023
180f89f
fix my-tracker test
lcampbell2 Apr 27, 2023
4c3dc1b
fix summaries test
lcampbell2 Apr 27, 2023
b462aac
fix web_connections summary key
lcampbell2 Apr 27, 2023
c20f457
fix summaries test
lcampbell2 Apr 27, 2023
c03d436
Merge branch 'master' into new-summary-charts
lcampbell2 Apr 27, 2023
4236874
Merge branch 'master' into new-summary-charts
lcampbell2 Apr 27, 2023
06d7aba
add certificates status to filter tags
lcampbell2 Apr 27, 2023
40ffced
translations
lcampbell2 Apr 27, 2023
5508cbe
summary card matching formatting
lcampbell2 Apr 28, 2023
fd841d6
remove comment
lcampbell2 Apr 28, 2023
387f8d3
update faked schema
lcampbell2 Apr 28, 2023
d09a40a
fix tier2 dmarcPhase legend
lcampbell2 May 10, 2023
061d384
refactor summaries service for optimized time
lcampbell2 May 10, 2023
ee52cf6
remove tests for deprecated function
lcampbell2 May 10, 2023
61974ca
Merge branch 'master' into new-summary-charts
lcampbell2 May 15, 2023
42497b5
fix ABTestVariant import
lcampbell2 May 15, 2023
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
80 changes: 34 additions & 46 deletions api/src/organization/objects/__tests__/organization-summary.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,30 @@ describe('given the organization summary object', () => {
expect(demoType).toHaveProperty('dmarcPhase')
expect(demoType.dmarcPhase.type).toMatchObject(categorizedSummaryType)
})
it('has a webConnections field', () => {
const demoType = organizationSummaryType.getFields()

expect(demoType).toHaveProperty('webConnections')
expect(demoType.dmarcPhase.type).toMatchObject(categorizedSummaryType)
})
it('has a ssl field', () => {
const demoType = organizationSummaryType.getFields()

expect(demoType).toHaveProperty('ssl')
expect(demoType.dmarcPhase.type).toMatchObject(categorizedSummaryType)
})
it('has a spf field', () => {
const demoType = organizationSummaryType.getFields()

expect(demoType).toHaveProperty('spf')
expect(demoType.dmarcPhase.type).toMatchObject(categorizedSummaryType)
})
it('has a dkim field', () => {
const demoType = organizationSummaryType.getFields()

expect(demoType).toHaveProperty('dkim')
expect(demoType.dmarcPhase.type).toMatchObject(categorizedSummaryType)
})
})

describe('field resolvers', () => {
Expand All @@ -48,10 +72,7 @@ describe('given the organization summary object', () => {
}

const i18n = {
_: jest
.fn()
.mockReturnValueOnce('pass')
.mockReturnValueOnce('fail'),
_: jest.fn().mockReturnValueOnce('pass').mockReturnValueOnce('fail'),
}

expect(demoType.dmarc.resolve({ dmarc }, {}, { i18n })).toEqual({
Expand Down Expand Up @@ -83,10 +104,7 @@ describe('given the organization summary object', () => {
}

const i18n = {
_: jest
.fn()
.mockReturnValueOnce('pass')
.mockReturnValueOnce('fail'),
_: jest.fn().mockReturnValueOnce('pass').mockReturnValueOnce('fail'),
}

expect(demoType.dmarc.resolve({ dmarc }, {}, { i18n })).toEqual({
Expand Down Expand Up @@ -120,10 +138,7 @@ describe('given the organization summary object', () => {
}

const i18n = {
_: jest
.fn()
.mockReturnValueOnce('pass')
.mockReturnValueOnce('fail'),
_: jest.fn().mockReturnValueOnce('pass').mockReturnValueOnce('fail'),
}

expect(demoType.https.resolve({ https }, {}, { i18n })).toEqual({
Expand Down Expand Up @@ -155,10 +170,7 @@ describe('given the organization summary object', () => {
}

const i18n = {
_: jest
.fn()
.mockReturnValueOnce('pass')
.mockReturnValueOnce('fail'),
_: jest.fn().mockReturnValueOnce('pass').mockReturnValueOnce('fail'),
}

expect(demoType.https.resolve({ https }, {}, { i18n })).toEqual({
Expand Down Expand Up @@ -191,10 +203,7 @@ describe('given the organization summary object', () => {
}

const i18n = {
_: jest
.fn()
.mockReturnValueOnce('pass')
.mockReturnValueOnce('fail'),
_: jest.fn().mockReturnValueOnce('pass').mockReturnValueOnce('fail'),
}

expect(demoType.mail.resolve({ mail }, {}, { i18n })).toEqual({
Expand Down Expand Up @@ -226,10 +235,7 @@ describe('given the organization summary object', () => {
}

const i18n = {
_: jest
.fn()
.mockReturnValueOnce('pass')
.mockReturnValueOnce('fail'),
_: jest.fn().mockReturnValueOnce('pass').mockReturnValueOnce('fail'),
}

expect(demoType.mail.resolve({ mail }, {}, { i18n })).toEqual({
Expand Down Expand Up @@ -262,10 +268,7 @@ describe('given the organization summary object', () => {
}

const i18n = {
_: jest
.fn()
.mockReturnValueOnce('pass')
.mockReturnValueOnce('fail'),
_: jest.fn().mockReturnValueOnce('pass').mockReturnValueOnce('fail'),
}

expect(demoType.web.resolve({ web }, {}, { i18n })).toEqual({
Expand Down Expand Up @@ -296,10 +299,7 @@ describe('given the organization summary object', () => {
}

const i18n = {
_: jest
.fn()
.mockReturnValueOnce('pass')
.mockReturnValueOnce('fail'),
_: jest.fn().mockReturnValueOnce('pass').mockReturnValueOnce('fail'),
}

expect(demoType.web.resolve({ web }, {}, { i18n })).toEqual({
Expand Down Expand Up @@ -344,13 +344,7 @@ describe('given the organization summary object', () => {
.mockReturnValueOnce('maintain'),
}

expect(
demoType.dmarcPhase.resolve(
{ dmarc_phase: dmarcPhase },
{},
{ i18n },
),
).toEqual({
expect(demoType.dmarcPhase.resolve({ dmarc_phase: dmarcPhase }, {}, { i18n })).toEqual({
categories: [
{
count: 0,
Expand Down Expand Up @@ -406,13 +400,7 @@ describe('given the organization summary object', () => {
.mockReturnValueOnce('maintain'),
}

expect(
demoType.dmarcPhase.resolve(
{ dmarc_phase: dmarcPhase },
{},
{ i18n },
),
).toEqual({
expect(demoType.dmarcPhase.resolve({ dmarc_phase: dmarcPhase }, {}, { i18n })).toEqual({
categories: [
{
count: 50,
Expand Down
Loading