From 83a6526d193f21f0b4aa9a8f54f39069e559fec1 Mon Sep 17 00:00:00 2001 From: Jared Henderson Date: Tue, 10 Dec 2024 13:53:31 -0500 Subject: [PATCH] dash: support app blocking canary testing --- dash/app/cypress/e2e/create-key.cy.ts | 2 +- dash/app/src/reducers/__tests__/mocks.ts | 2 +- dash/app/src/reducers/user-reducer.ts | 6 ++-- .../components/src/Keychains/KeychainCard.tsx | 4 +-- .../Keychains/schedule/KeychainSchedule.tsx | 6 ++-- .../schedule/SpecifyingActiveOrInactive.tsx | 6 ++-- .../src/Keychains/schedule/WhatDays.tsx | 6 ++-- .../src/Keychains/schedule/WhatTime.tsx | 6 ++-- .../src/Users/AddKeychainDrawer.tsx | 4 +-- dash/components/src/Users/EditUser.tsx | 8 ++--- dash/types/src/defaults.ts | 4 +-- .../src/pairql/pairs/GetIdentifiedApps.ts | 2 +- dash/types/src/pairql/pairs/SaveUser.ts | 4 +-- dash/types/src/pairql/shared.ts | 30 +++++++++---------- 14 files changed, 45 insertions(+), 45 deletions(-) diff --git a/dash/app/cypress/e2e/create-key.cy.ts b/dash/app/cypress/e2e/create-key.cy.ts index 013f35adf..b8ed693b0 100644 --- a/dash/app/cypress/e2e/create-key.cy.ts +++ b/dash/app/cypress/e2e/create-key.cy.ts @@ -10,7 +10,7 @@ describe(`create key flow`, () => { id: `app-123`, name: `Brave`, slug: `brave`, - selectable: true, + launchable: true, bundleIds: [], }, ]); diff --git a/dash/app/src/reducers/__tests__/mocks.ts b/dash/app/src/reducers/__tests__/mocks.ts index a715cd754..175886c38 100644 --- a/dash/app/src/reducers/__tests__/mocks.ts +++ b/dash/app/src/reducers/__tests__/mocks.ts @@ -35,7 +35,7 @@ export function identifiedApp( id: uuid(), name: `Brave Browser`, slug: `brave`, - selectable: true, + launchable: true, bundleIds: [{ id: uuid(), bundleId: `com.brave.Browser` }], ...override, }; diff --git a/dash/app/src/reducers/user-reducer.ts b/dash/app/src/reducers/user-reducer.ts index 2a2d43600..1f026eb63 100644 --- a/dash/app/src/reducers/user-reducer.ts +++ b/dash/app/src/reducers/user-reducer.ts @@ -4,7 +4,7 @@ import type { UserKeychainSummary, PlainTimeWindow, User, - KeychainSchedule, + RuleSchedule, } from '@dash/types'; import { commit, editable } from '../lib/helpers'; @@ -25,9 +25,9 @@ export type Action = | { type: 'setDowntime'; downtime: PlainTimeWindow } | { type: 'setShowSuspensionActivity'; show: boolean } | { type: 'removeKeychain'; id: UUID } - | { type: 'setKeychainSchedule'; id: UUID; schedule?: KeychainSchedule } + | { type: 'setKeychainSchedule'; id: UUID; schedule?: RuleSchedule } | { type: 'addKeychain'; keychain: UserKeychainSummary } - | { type: 'setAddingKeychainSchedule'; schedule?: KeychainSchedule } + | { type: 'setAddingKeychainSchedule'; schedule?: RuleSchedule } | { type: 'setAddingKeychain'; keychain?: UserKeychainSummary | null }; function reducer(state: State, action: Action): State | undefined { diff --git a/dash/components/src/Keychains/KeychainCard.tsx b/dash/components/src/Keychains/KeychainCard.tsx index b37e69e96..3266ea158 100644 --- a/dash/components/src/Keychains/KeychainCard.tsx +++ b/dash/components/src/Keychains/KeychainCard.tsx @@ -4,7 +4,7 @@ import { inflect } from '@shared/string'; import { Button, Badge } from '@shared/components'; import { ChevronDownIcon, ClockIcon, TrashIcon } from '@heroicons/react/24/outline'; import { UsersIcon } from '@heroicons/react/24/solid'; -import { defaults, type KeychainSchedule as Schedule } from '@dash/types'; +import { defaults, type RuleSchedule as Schedule } from '@dash/types'; import GradientIcon from '../GradientIcon'; import KeychainSchedule from './schedule/KeychainSchedule'; @@ -118,7 +118,7 @@ const KeychainCard: React.FC = ({ {props.mode === `assign_to_child` && !props.schedule && (