Fixes issue where retrying on image upload fails (#166)
* Fixes issue where retrying on image upload fails * Lint, longer test time * Longer waitfor time in tests * even longer timeout * longer timeout * missed file * Update src/view/com/composer/ComposePost.tsx Co-authored-by: Paul Frazee <pfrazee@gmail.com> * Update src/view/com/composer/ComposePost.tsx Co-authored-by: Paul Frazee <pfrazee@gmail.com> --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
This commit is contained in:
@@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Yarn install
|
- name: Yarn install
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: Lint Reporter
|
- name: Lint Reporter
|
||||||
@@ -30,7 +30,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Yarn install
|
- name: Yarn install
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|||||||
+4
-1
@@ -1,6 +1,9 @@
|
|||||||
/* global jest */
|
/* global jest */
|
||||||
|
import {configure} from '@testing-library/react-native'
|
||||||
import 'react-native-gesture-handler/jestSetup'
|
import 'react-native-gesture-handler/jestSetup'
|
||||||
|
|
||||||
|
configure({asyncUtilTimeout: 20000})
|
||||||
|
|
||||||
jest.mock('@react-native-async-storage/async-storage', () =>
|
jest.mock('@react-native-async-storage/async-storage', () =>
|
||||||
require('@react-native-async-storage/async-storage/jest/async-storage-mock'),
|
require('@react-native-async-storage/async-storage/jest/async-storage-mock'),
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
"web": "react-scripts start",
|
"web": "react-scripts start",
|
||||||
"start": "react-native start",
|
"start": "react-native start",
|
||||||
"clean-cache": "rm -rf node_modules/.cache/babel-loader/*",
|
"clean-cache": "rm -rf node_modules/.cache/babel-loader/*",
|
||||||
"test": "jest --forceExit",
|
"test": "jest --forceExit --testTimeout=20000",
|
||||||
"test-watch": "jest --watchAll",
|
"test-watch": "jest --watchAll",
|
||||||
"test-ci": "jest --ci --forceExit --reporters=default --reporters=jest-junit",
|
"test-ci": "jest --ci --forceExit --reporters=default --reporters=jest-junit",
|
||||||
"test-coverage": "jest --coverage",
|
"test-coverage": "jest --coverage",
|
||||||
|
|||||||
@@ -275,6 +275,11 @@ export const ComposePost = observer(function ComposePost({
|
|||||||
imageCount: selectedPhotos.length,
|
imageCount: selectedPhotos.length,
|
||||||
})
|
})
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
setExtLink({
|
||||||
|
...extLink,
|
||||||
|
isLoading: true,
|
||||||
|
localThumb: undefined,
|
||||||
|
} as apilib.ExternalEmbedDraft)
|
||||||
setError(cleanError(e.message))
|
setError(cleanError(e.message))
|
||||||
setIsProcessing(false)
|
setIsProcessing(false)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user