Create text stories

This commit is contained in:
Josh Perez 2022-06-16 20:48:57 -04:00 committed by GitHub
parent 973b2264fe
commit d970d427f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 2433 additions and 1106 deletions

View file

@ -117,35 +117,6 @@ describe('both/state/ducks/composer', () => {
});
});
describe('setLinkPreviewResult', () => {
it('sets loading state when loading', () => {
const { setLinkPreviewResult } = actions;
const state = getEmptyState();
const nextState = reducer(state, setLinkPreviewResult(true));
assert.isTrue(nextState.linkPreviewLoading);
});
it('sets the link preview result', () => {
const { setLinkPreviewResult } = actions;
const state = getEmptyState();
const nextState = reducer(
state,
setLinkPreviewResult(false, {
domain: 'https://www.signal.org/',
title: 'Signal >> Careers',
url: 'https://www.signal.org/workworkwork',
description:
'Join an organization that empowers users by making private communication simple.',
date: null,
})
);
assert.isFalse(nextState.linkPreviewLoading);
assert.equal(nextState.linkPreviewResult?.title, 'Signal >> Careers');
});
});
describe('setMediaQualitySetting', () => {
it('toggles the media quality setting', () => {
const { setMediaQualitySetting } = actions;

View file

@ -26,7 +26,7 @@ describe('both/state/ducks/linkPreviews', () => {
it('updates linkPreview', () => {
const state = getEmptyState();
const linkPreview = getMockLinkPreview();
const nextState = reducer(state, addLinkPreview(linkPreview));
const nextState = reducer(state, addLinkPreview(linkPreview, 0));
assert.strictEqual(nextState.linkPreview, linkPreview);
});