drop notification for service worker success action

This isn't particularly useful information.
This commit is contained in:
David Lechner
2021-01-18 17:44:26 -06:00
parent da298ab565
commit c8d499e979
4 changed files with 1 additions and 8 deletions
-1
View File
@@ -13,7 +13,6 @@
"error": "{errorMessage}"
},
"serviceWorker": {
"success": "Content is cached for offline use.",
"update": "New content is available and will be used when all tabs for this page are closed.'"
}
}
-1
View File
@@ -9,7 +9,6 @@ export enum MessageId {
BleGattServiceNotFound = 'ble.gattServiceNotFound',
BleNoWebBluetooth = 'ble.noWebBluetooth',
ProgramChanged = 'editor.programChanged',
ServiceWorkerSuccess = 'serviceWorker.success',
ServiceWorkerUpdate = 'serviceWorker.update',
YesReloadProgram = 'editor.yesReloadProgram',
MpyError = 'mpy.error',
+1 -1
View File
@@ -34,7 +34,6 @@ test.each([
add('warning', 'message'),
add('error', 'message', 'url'),
didUpdate({} as ServiceWorkerRegistration),
didSucceed({} as ServiceWorkerRegistration),
])('actions that should show notification: %o', async (action: Action) => {
const getToasts = jest.fn().mockReturnValue([]);
const show = jest.fn();
@@ -62,6 +61,7 @@ test.each([
test.each([
bleDidFailToConnect({ reason: BleDeviceFailToConnectReasonType.Canceled }),
bootloaderDidFailToConnect(BootloaderConnectionFailureReason.Canceled),
didSucceed({} as ServiceWorkerRegistration),
])('actions that should not show a notification: %o', async (action: Action) => {
const getToasts = jest.fn().mockReturnValue([]);
const show = jest.fn();
-5
View File
@@ -237,10 +237,6 @@ function* showServiceWorkerUpdate(): Generator {
);
}
function* showServiceWorkerSuccess(): Generator {
yield* showSingleton(Level.Info, MessageId.ServiceWorkerSuccess);
}
export default function* (): Generator {
yield takeEvery(
BleDeviceActionType.DidFailToConnect,
@@ -254,5 +250,4 @@ export default function* (): Generator {
yield takeEvery(MpyActionType.DidFailToCompile, showCompilerError);
yield takeEvery(NotificationActionType.Add, addNotification);
yield takeEvery(ServiceWorkerActionType.DidUpdate, showServiceWorkerUpdate);
yield takeEvery(ServiceWorkerActionType.DidSucceed, showServiceWorkerSuccess);
}