mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
flash-firmware: drop error on fail to connect
This error is already handled elsewhere.
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
}
|
||||
},
|
||||
"flashFirmware": {
|
||||
"connectionFailed": "Could not connect to the hub. Restart the hub and try again.",
|
||||
"timedOut": "The hub took too long to respond. Restart the hub and try again.",
|
||||
"bleError": "There was a problem with Bluetooth.",
|
||||
"disconnected": "The hub was disconnected before flashing was completed. Restart the hub and try again.",
|
||||
|
||||
@@ -10,7 +10,6 @@ export enum MessageId {
|
||||
BleGattPermission = 'ble.gattPermission',
|
||||
BleGattServiceNotFound = 'ble.gattServiceNotFound',
|
||||
BleNoWebBluetooth = 'ble.noWebBluetooth',
|
||||
FlashFirmwareConnectionFailed = 'flashFirmware.connectionFailed',
|
||||
FlashFirmwareTimedOut = 'flashFirmware.timedOut',
|
||||
FlashFirmwareBleError = 'flashFirmware.bleError',
|
||||
FlashFirmwareDisconnected = 'flashFirmware.disconnected',
|
||||
|
||||
@@ -44,7 +44,6 @@ test.each([
|
||||
add('warning', 'message'),
|
||||
add('error', 'message', 'url'),
|
||||
didUpdate({} as ServiceWorkerRegistration),
|
||||
didFailToFinish(FailToFinishReasonType.FailedToConnect),
|
||||
didFailToFinish(FailToFinishReasonType.TimedOut),
|
||||
didFailToFinish(
|
||||
FailToFinishReasonType.BleError,
|
||||
@@ -97,6 +96,7 @@ test.each([
|
||||
test.each([
|
||||
bleDidFailToConnect({ reason: BleDeviceFailToConnectReasonType.Canceled }),
|
||||
bootloaderDidFailToConnect(BootloaderConnectionFailureReason.Canceled),
|
||||
didFailToFinish(FailToFinishReasonType.FailedToConnect),
|
||||
didSucceed({} as ServiceWorkerRegistration),
|
||||
])('actions that should not show a notification: %o', async (action: Action) => {
|
||||
const getToasts = jest.fn().mockReturnValue([]);
|
||||
|
||||
@@ -235,9 +235,6 @@ function* showFlashFirmwareError(
|
||||
action: FlashFirmwareDidFailToFinishAction,
|
||||
): Generator {
|
||||
switch (action.reason.reason) {
|
||||
case FailToFinishReasonType.FailedToConnect:
|
||||
yield* showSingleton(Level.Error, MessageId.FlashFirmwareConnectionFailed);
|
||||
break;
|
||||
case FailToFinishReasonType.TimedOut:
|
||||
yield* showSingleton(Level.Error, MessageId.FlashFirmwareTimedOut);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user