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

QA tool for custom data #4857

Merged
merged 18 commits into from
Jul 31, 2024
Merged

QA tool for custom data #4857

merged 18 commits into from
Jul 31, 2024

Conversation

mozilloid
Copy link
Contributor

@mozilloid mozilloid commented Jul 24, 2024

References:

Jira: MNTOR-3357, MNTOR-3424, MNTOR-3425
Figma:

Description

Separated from mock endpoints, and added complete customization. Admin is able to turn on/off custom and real data, and is able to adjust each field of the custom breach and broker objects.

Screenshot (if applicable)

Not applicable.

How to test

  • Perform db migrations
  • Sign in with an admin account
  • Enter the data
  • Make sure necessary toggles are turned on

Checklist (Definition of Done)

  • Localization strings (if needed) have been added.
  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • I've added a unit test to test for potential regressions of this bug.
  • If this PR implements a feature flag or experimentation, the Ship Behind Feature Flag status in Jira has been set
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.

@mozilloid mozilloid marked this pull request as ready for review July 24, 2024 01:07
@mozilloid mozilloid requested review from mansaj and codemist July 24, 2024 01:07
Copy link

@mozilloid mozilloid requested a review from rhelmer July 25, 2024 19:45
@mozilloid mozilloid self-assigned this Jul 29, 2024
@mozilloid mozilloid requested a review from codemist July 30, 2024 15:37
Copy link
Collaborator

@codemist codemist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work! Verified locally that the feature works. The FE could use some extra attention, but since this is an admin tool I don't see it as a blocker since it's not user facing. Opened a ticket to enhance it later down the line here.

Comment on lines +314 to +326
const qaToggles = await getQaToggleRow(sha1);
let showCustomBreaches = true;
let showRealBreaches = true;
if (qaToggles) {
showCustomBreaches = qaToggles.show_custom_breaches;
showRealBreaches = qaToggles.show_real_breaches;
}

const qaBreaches = !showCustomBreaches
? []
: await getAllQaCustomBreaches(sha1Prefix);
if (!showRealBreaches) return qaBreaches as HibpLikeDbBreach[];

Copy link
Collaborator

@codemist codemist Jul 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you leave a comment about what this is doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines of code check whether a QA toggles row exists for the current user, and if it does, either show the QA breaches or not.

@@ -37,6 +39,17 @@ export async function POST(
);
}

// This marks a QA broker as resolved. Collisions aren't a worry because a real user is never admin.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Praise: comment

@mozilloid mozilloid merged commit 7af3aac into main Jul 31, 2024
15 checks passed
@mozilloid mozilloid deleted the mntor-3423 branch July 31, 2024 04:38
Copy link

Cleanup completed - database 'blurts-server-pr-4857' destroyed, cloud run service 'blurts-server-pr-4857' destroyed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants