final for now
This commit is contained in:
parent
50ea766684
commit
846f78119e
|
@ -33,31 +33,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
yarn --frozen-lockfile --network-timeout 100000
|
yarn --frozen-lockfile --network-timeout 100000
|
||||||
|
|
||||||
- name: Decode google-services.json
|
|
||||||
env:
|
|
||||||
FIREBASE_SECRET: ${{ secrets.GOOGLE_KEY }}
|
|
||||||
run: echo $FIREBASE_SECRET > android/app/google-services.json
|
|
||||||
|
|
||||||
- name: Generate Temporary Keystore
|
|
||||||
run: |
|
|
||||||
cd android
|
|
||||||
echo -e "" > ./gradle.properties
|
|
||||||
echo -e "android.useAndroidX=true" >> ./gradle.properties
|
|
||||||
echo -e "android.enableJetifier=true" >> ./gradle.properties
|
|
||||||
echo -e "FLIPPER_VERSION=0.51.0" >> ./gradle.properties
|
|
||||||
echo -e "APPLICATION_ID=chat.rocket.reactnative" >> ./gradle.properties
|
|
||||||
echo -e "VERSIONCODE=99999" >> ./gradle.
|
|
||||||
echo -e "BugsnagAPIKey=\"\"" >> ./gradle.properties
|
|
||||||
echo -e "KEYSTORE=debug.keystore" >> ./gradle.properties
|
|
||||||
echo -e "KEYSTORE_PASSWORD=android" >> ./gradle.properties
|
|
||||||
echo -e "KEY_ALIAS=androiddebugkey" >> ./gradle.properties
|
|
||||||
echo -e "KEY_PASSWORD=android" >> ./gradle.properties
|
|
||||||
cd ..
|
|
||||||
keytool -genkey -noprompt -dname "CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown" -keystore android/app/debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
|
|
||||||
|
|
||||||
- name: Build for detox
|
- name: Build for detox
|
||||||
run: |
|
run: |
|
||||||
yarn detox build e2e --configuration android.experimental.play.emu.release
|
yarn detox build e2e/tests --configuration android.experimental.play.emu.debug
|
||||||
|
|
||||||
- name: Android Emulator
|
- name: Android Emulator
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
@ -70,4 +49,4 @@ jobs:
|
||||||
echo "Emulator started"
|
echo "Emulator started"
|
||||||
|
|
||||||
- name: Android Detox
|
- name: Android Detox
|
||||||
run: yarn start & yarn detox test --configuration android.experimental.play.emu.release
|
run: yarn start & yarn detox test e2e/tests --configuration android.experimental.play.emu.debug
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import isEqual from 'lodash/isEqual';
|
import { dequal } from 'dequal';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
import Image from './Image';
|
import Image from './Image';
|
||||||
|
@ -15,20 +15,20 @@ const Attachments = React.memo(({
|
||||||
}
|
}
|
||||||
|
|
||||||
return attachments.map((file, index) => {
|
return attachments.map((file, index) => {
|
||||||
if (file.type === 'file' && file.image_url) {
|
if (file.image_url) {
|
||||||
return <Image key={file.image_url} file={file} showAttachment={showAttachment} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
return <Image key={file.image_url} file={file} showAttachment={showAttachment} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
||||||
}
|
}
|
||||||
if (file.type === 'file' && file.audio_url) {
|
if (file.audio_url) {
|
||||||
return <Audio key={file.audio_url} file={file} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
return <Audio key={file.audio_url} file={file} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
||||||
}
|
}
|
||||||
if (file.type === 'file' && file.video_url) {
|
if (file.video_url) {
|
||||||
return <Video key={file.video_url} file={file} showAttachment={showAttachment} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
return <Video key={file.video_url} file={file} showAttachment={showAttachment} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line react/no-array-index-key
|
// eslint-disable-next-line react/no-array-index-key
|
||||||
return <Reply key={index} index={index} attachment={file} timeFormat={timeFormat} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
return <Reply key={index} index={index} attachment={file} timeFormat={timeFormat} getCustomEmoji={getCustomEmoji} theme={theme} />;
|
||||||
});
|
});
|
||||||
}, (prevProps, nextProps) => isEqual(prevProps.attachments, nextProps.attachments) && prevProps.theme === nextProps.theme);
|
}, (prevProps, nextProps) => dequal(prevProps.attachments, nextProps.attachments) && prevProps.theme === nextProps.theme);
|
||||||
|
|
||||||
Attachments.propTypes = {
|
Attachments.propTypes = {
|
||||||
attachments: PropTypes.array,
|
attachments: PropTypes.array,
|
||||||
|
|
|
@ -346,21 +346,13 @@ export default ({ theme }) => {
|
||||||
attachments={[{
|
attachments={[{
|
||||||
title: 'This is a title',
|
title: 'This is a title',
|
||||||
description: 'This is a description',
|
description: 'This is a description',
|
||||||
image_url: '/dummypath',
|
image_url: '/dummypath'
|
||||||
type: 'file'
|
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
<Message
|
<Message
|
||||||
attachments={[{
|
attachments={[{
|
||||||
title: 'This is a title',
|
title: 'This is a title',
|
||||||
description: 'This is a description :nyan_rocket:',
|
description: 'This is a description :nyan_rocket:',
|
||||||
image_url: '/dummypath',
|
|
||||||
type: 'file'
|
|
||||||
}]}
|
|
||||||
/>
|
|
||||||
<Message
|
|
||||||
msg='Image should not render'
|
|
||||||
attachments={[{
|
|
||||||
image_url: '/dummypath'
|
image_url: '/dummypath'
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
|
@ -370,15 +362,13 @@ export default ({ theme }) => {
|
||||||
attachments={[{
|
attachments={[{
|
||||||
title: 'This is a title',
|
title: 'This is a title',
|
||||||
description: 'This is a description :nyan_rocket:',
|
description: 'This is a description :nyan_rocket:',
|
||||||
video_url: '/dummypath',
|
video_url: '/dummypath'
|
||||||
type: 'file'
|
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
<Message
|
<Message
|
||||||
attachments={[{
|
attachments={[{
|
||||||
title: 'This is a title',
|
title: 'This is a title',
|
||||||
video_url: '/dummypath',
|
video_url: '/dummypath'
|
||||||
type: 'file'
|
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -387,8 +377,7 @@ export default ({ theme }) => {
|
||||||
attachments={[{
|
attachments={[{
|
||||||
title: 'This is a title',
|
title: 'This is a title',
|
||||||
description: 'This is a description :nyan_rocket:',
|
description: 'This is a description :nyan_rocket:',
|
||||||
audio_url: '/dummypath',
|
audio_url: '/dummypath'
|
||||||
type: 'file'
|
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
<Message msg='First message' isHeader={false} />
|
<Message msg='First message' isHeader={false} />
|
||||||
|
@ -396,24 +385,21 @@ export default ({ theme }) => {
|
||||||
attachments={[{
|
attachments={[{
|
||||||
title: 'This is a title',
|
title: 'This is a title',
|
||||||
description: 'This is a description',
|
description: 'This is a description',
|
||||||
audio_url: '/dummypath',
|
audio_url: '/dummypath'
|
||||||
type: 'file'
|
|
||||||
}]}
|
}]}
|
||||||
isHeader={false}
|
isHeader={false}
|
||||||
/>
|
/>
|
||||||
<Message
|
<Message
|
||||||
attachments={[{
|
attachments={[{
|
||||||
title: 'This is a title',
|
title: 'This is a title',
|
||||||
audio_url: '/dummypath',
|
audio_url: '/dummypath'
|
||||||
type: 'file'
|
|
||||||
}]}
|
}]}
|
||||||
isHeader={false}
|
isHeader={false}
|
||||||
/>
|
/>
|
||||||
<Message
|
<Message
|
||||||
attachments={[{
|
attachments={[{
|
||||||
title: 'This is a title',
|
title: 'This is a title',
|
||||||
audio_url: '/dummypath',
|
audio_url: '/dummypath'
|
||||||
type: 'file'
|
|
||||||
}]}
|
}]}
|
||||||
isHeader={false}
|
isHeader={false}
|
||||||
/>
|
/>
|
||||||
|
@ -440,7 +426,8 @@ export default ({ theme }) => {
|
||||||
author_name: 'I\'m a very long long title and I\'ll break',
|
author_name: 'I\'m a very long long title and I\'ll break',
|
||||||
ts: date,
|
ts: date,
|
||||||
timeFormat: 'LT',
|
timeFormat: 'LT',
|
||||||
text: 'How are you?'
|
text: 'How are you?',
|
||||||
|
message_link: 'http:///example.com'
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
<Message
|
<Message
|
||||||
|
@ -449,7 +436,8 @@ export default ({ theme }) => {
|
||||||
author_name: 'rocket.cat',
|
author_name: 'rocket.cat',
|
||||||
ts: date,
|
ts: date,
|
||||||
timeFormat: 'LT',
|
timeFormat: 'LT',
|
||||||
text: 'How are you? :nyan_rocket:'
|
text: 'How are you? :nyan_rocket:',
|
||||||
|
message_link: 'http:///example.com'
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -577,8 +565,7 @@ export default ({ theme }) => {
|
||||||
attachments={[{
|
attachments={[{
|
||||||
title: 'This is a title',
|
title: 'This is a title',
|
||||||
description: 'This is a description',
|
description: 'This is a description',
|
||||||
audio_url: '/file-upload/c4wcNhrbXJLBvAJtN/1535569819516.aac',
|
audio_url: '/file-upload/c4wcNhrbXJLBvAJtN/1535569819516.aac'
|
||||||
type: 'file'
|
|
||||||
}]}
|
}]}
|
||||||
tmid='1'
|
tmid='1'
|
||||||
isThreadSequential
|
isThreadSequential
|
||||||
|
@ -702,6 +689,7 @@ export default ({ theme }) => {
|
||||||
ts: date,
|
ts: date,
|
||||||
timeFormat: 'LT',
|
timeFormat: 'LT',
|
||||||
text: 'Custom fields',
|
text: 'Custom fields',
|
||||||
|
message_link: 'http:///example.com',
|
||||||
fields: [{
|
fields: [{
|
||||||
title: 'Field 1',
|
title: 'Field 1',
|
||||||
value: 'Value 1'
|
value: 'Value 1'
|
||||||
|
@ -721,7 +709,7 @@ export default ({ theme }) => {
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Separator title='Two short custom fields' theme={theme} />
|
<Separator title='Two short custom fields with markdown' theme={theme} />
|
||||||
<Message
|
<Message
|
||||||
msg='Message'
|
msg='Message'
|
||||||
attachments={[{
|
attachments={[{
|
||||||
|
@ -729,6 +717,38 @@ export default ({ theme }) => {
|
||||||
ts: date,
|
ts: date,
|
||||||
timeFormat: 'LT',
|
timeFormat: 'LT',
|
||||||
text: 'Custom fields',
|
text: 'Custom fields',
|
||||||
|
message_link: 'http:///example.com',
|
||||||
|
fields: [{
|
||||||
|
title: 'Field 1',
|
||||||
|
value: 'Value 1',
|
||||||
|
short: true
|
||||||
|
}, {
|
||||||
|
title: 'Field 2',
|
||||||
|
value: '[Value 2](https://google.com/)',
|
||||||
|
short: true
|
||||||
|
}]
|
||||||
|
}, {
|
||||||
|
author_name: 'rocket.cat',
|
||||||
|
ts: date,
|
||||||
|
timeFormat: 'LT',
|
||||||
|
text: 'Custom fields 2',
|
||||||
|
message_link: 'http:///example.com',
|
||||||
|
fields: [{
|
||||||
|
title: 'Field 1',
|
||||||
|
value: 'Value 1',
|
||||||
|
short: true
|
||||||
|
}, {
|
||||||
|
title: 'Field 2',
|
||||||
|
value: '**Value 2**',
|
||||||
|
short: true
|
||||||
|
}]
|
||||||
|
}]}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Separator title='Colored attachments' theme={theme} />
|
||||||
|
<Message
|
||||||
|
attachments={[{
|
||||||
|
color: 'red',
|
||||||
fields: [{
|
fields: [{
|
||||||
title: 'Field 1',
|
title: 'Field 1',
|
||||||
value: 'Value 1',
|
value: 'Value 1',
|
||||||
|
@ -739,10 +759,7 @@ export default ({ theme }) => {
|
||||||
short: true
|
short: true
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
author_name: 'rocket.cat',
|
color: 'green',
|
||||||
ts: date,
|
|
||||||
timeFormat: 'LT',
|
|
||||||
text: 'Custom fields 2',
|
|
||||||
fields: [{
|
fields: [{
|
||||||
title: 'Field 1',
|
title: 'Field 1',
|
||||||
value: 'Value 1',
|
value: 'Value 1',
|
||||||
|
@ -752,6 +769,23 @@ export default ({ theme }) => {
|
||||||
value: 'Value 2',
|
value: 'Value 2',
|
||||||
short: true
|
short: true
|
||||||
}]
|
}]
|
||||||
|
}, {
|
||||||
|
color: 'blue',
|
||||||
|
fields: [{
|
||||||
|
title: 'Field 1',
|
||||||
|
value: 'Value 1',
|
||||||
|
short: true
|
||||||
|
}, {
|
||||||
|
title: 'Field 2',
|
||||||
|
value: 'Value 2',
|
||||||
|
short: true
|
||||||
|
}]
|
||||||
|
}, {
|
||||||
|
color: 'ASDASD',
|
||||||
|
fields: [{
|
||||||
|
title: 'Invalid color',
|
||||||
|
short: true
|
||||||
|
}]
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -789,6 +823,7 @@ export default ({ theme }) => {
|
||||||
author_name: 'rocket.cat',
|
author_name: 'rocket.cat',
|
||||||
ts: date,
|
ts: date,
|
||||||
timeFormat: 'LT',
|
timeFormat: 'LT',
|
||||||
|
message_link: 'http:///example.com',
|
||||||
text: 'First message'
|
text: 'First message'
|
||||||
}]}
|
}]}
|
||||||
/>
|
/>
|
||||||
|
@ -836,6 +871,10 @@ export default ({ theme }) => {
|
||||||
<Separator title='Changed type' theme={theme} />
|
<Separator title='Changed type' theme={theme} />
|
||||||
<Message msg='public' type='room_changed_privacy' isInfo />
|
<Message msg='public' type='room_changed_privacy' isInfo />
|
||||||
|
|
||||||
|
<Separator title='Toggle e2e encryption' theme={theme} />
|
||||||
|
<Message type='room_e2e_disabled' isInfo />
|
||||||
|
<Message type='room_e2e_enabled' isInfo />
|
||||||
|
|
||||||
<Separator title='Ignored' theme={theme} />
|
<Separator title='Ignored' theme={theme} />
|
||||||
<Message isIgnored />
|
<Message isIgnored />
|
||||||
|
|
||||||
|
@ -858,6 +897,9 @@ export default ({ theme }) => {
|
||||||
<Separator title='Markdown links' theme={theme} />
|
<Separator title='Markdown links' theme={theme} />
|
||||||
<Message msg='Support <http://google.com|Google> [I`m an inline-style link](https://www.google.com) https://google.com' />
|
<Message msg='Support <http://google.com|Google> [I`m an inline-style link](https://www.google.com) https://google.com' />
|
||||||
|
|
||||||
|
<Separator title='Starting with empty link' theme={theme} />
|
||||||
|
<Message msg='[ ](https://www.google.com) <- No link should render' />
|
||||||
|
|
||||||
<Separator title='Markdown image' theme={theme} />
|
<Separator title='Markdown image' theme={theme} />
|
||||||
<Message msg='![alt text](https://play.google.com/intl/en_us/badges/images/badge_new.png)' />
|
<Message msg='![alt text](https://play.google.com/intl/en_us/badges/images/badge_new.png)' />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue