.circleci
.dependabot
.github
app
chewy
controllers
helpers
javascript
fonts
images
mastodon
actions
components
__tests__
__snapshots__
autosuggest_emoji-test.js
avatar-test.js
avatar_overlay-test.js
button-test.js
display_name-test.js
account.js
attachment_list.js
autosuggest_emoji.js
autosuggest_hashtag.js
autosuggest_input.js
autosuggest_textarea.js
avatar.js
avatar_composite.js
avatar_overlay.js
button.js
column.js
column_back_button.js
column_back_button_slim.js
column_header.js
display_name.js
domain.js
dropdown_menu.js
error_boundary.js
extended_video_player.js
hashtag.js
icon.js
icon_button.js
icon_with_badge.js
intersection_observer_article.js
load_gap.js
load_more.js
load_pending.js
loading_indicator.js
media_gallery.js
missing_indicator.js
modal_root.js
permalink.js
poll.js
radio_button.js
relative_timestamp.js
scrollable_list.js
setting_text.js
status.js
status_action_bar.js
status_content.js
status_list.js
containers
features
locales
middleware
reducers
selectors
service_worker
storage
store
utils
api.js
base_polyfills.js
common.js
compare_id.js
extra_polyfills.js
initial_state.js
is_mobile.js
load_polyfills.js
main.js
performance.js
ready.js
rtl.js
scroll.js
settings.js
stream.js
test_setup.js
uuid.js
packs
styles
lib
mailers
models
policies
presenters
serializers
services
validators
views
workers
bin
config
db
dist
lib
log
nanobox
public
spec
streaming
vendor
.buildpacks
.codeclimate.yml
.dockerignore
.editorconfig
.env.nanobox
.env.production.sample
.env.test
.env.vagrant
.eslintignore
.eslintrc.js
.foreman
.gitattributes
.gitignore
.haml-lint.yml
.nanoignore
.nvmrc
.profile
.rspec
.rubocop.yml
.ruby-version
.sass-lint.yml
.slugignore
.yarnclean
AUTHORS.md
Aptfile
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Capfile
Dockerfile
Gemfile
Gemfile.lock
LICENSE
Procfile
Procfile.dev
README.md
Rakefile
Vagrantfile
app.json
babel.config.js
boxfile.yml
config.ru
crowdin.yml
docker-compose.yml
package.json
postcss.config.js
priv-config
scalingo.json
yarn.lock
* Revert "Fix some icon names changed by the Font Awesome 5. (#8796)" This reverts commit3f9ec3de82
. * Revert "Migrate to font-awesome 5.0. (#8799)" This reverts commit8bae14591b
. * Revert "Fix some icons names, unavailable in fontawesome5 (free license). (#8792)" This reverts commitb9c727a945
. * Revert "Update the icon name changed by the Font Awesome 5. (#8776)" This reverts commit17af4d27da
. * Revert "Add bot icon to bot avatars and migrate to newer version of Font Awesome (#8484)" This reverts commit4b794e134d
.
37 lines
932 B
JavaScript
37 lines
932 B
JavaScript
import React from 'react';
|
|
import renderer from 'react-test-renderer';
|
|
import { fromJS } from 'immutable';
|
|
import Avatar from '../avatar';
|
|
|
|
describe('<Avatar />', () => {
|
|
const account = fromJS({
|
|
username: 'alice',
|
|
acct: 'alice',
|
|
display_name: 'Alice',
|
|
avatar: '/animated/alice.gif',
|
|
avatar_static: '/static/alice.jpg',
|
|
});
|
|
|
|
const size = 100;
|
|
|
|
describe('Autoplay', () => {
|
|
it('renders a animated avatar', () => {
|
|
const component = renderer.create(<Avatar account={account} animate size={size} />);
|
|
const tree = component.toJSON();
|
|
|
|
expect(tree).toMatchSnapshot();
|
|
});
|
|
});
|
|
|
|
describe('Still', () => {
|
|
it('renders a still avatar', () => {
|
|
const component = renderer.create(<Avatar account={account} size={size} />);
|
|
const tree = component.toJSON();
|
|
|
|
expect(tree).toMatchSnapshot();
|
|
});
|
|
});
|
|
|
|
// TODO add autoplay test if possible
|
|
});
|