mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 09:36:27 +00:00
drop notification for service worker success action
This isn't particularly useful information.
This commit is contained in:
@@ -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.'"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user