Skip to content

Commit

Permalink
fix(avatar): use a single pic in the screener test (#1240)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadiia committed May 7, 2019
1 parent 1615434 commit d86d04f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .storybook/webpack.config.js
Expand Up @@ -13,6 +13,14 @@ module.exports = {
loader: 'import-glob',
include: [path.resolve(__dirname)],
},
{
test: /\.(png|jpe?g|gif)$/,
use: [
{
loader: 'file-loader',
},
],
},
],
},
};
1 change: 1 addition & 0 deletions scripts/flow-copy-src.js
Expand Up @@ -21,6 +21,7 @@ async function run() {
ignore: [
'**/*.test.js',
'**/*.setup.js',
'**/*.scenario.js',
'**/*stories.js',
'test/**/*.js',
'**/__mocks__/*.js',
Expand Down
3 changes: 2 additions & 1 deletion src/avatar/__tests__/avatar.scenario.js
Expand Up @@ -9,6 +9,7 @@ LICENSE file in the root directory of this source tree.
import React from 'react';

import {Avatar} from '../index.js';
import imageFile from './static/adorable.png';

export const name = 'avatar';

Expand All @@ -19,7 +20,7 @@ export const component = () => (
<Avatar
name={`user name # ${index}`}
size={size}
src={`https://api.adorable.io/avatars/285/${index}@adorable.io.png`}
src={imageFile}
key={size}
/>
),
Expand Down
Binary file added src/avatar/__tests__/static/adorable.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion webpack.e2e.config.js
Expand Up @@ -28,7 +28,7 @@ module.exports = {
},
},
{
test: /\.svg$/,
test: /\.(png|jpe?g|gif|svg)$/,
loader: 'file-loader',
},
{
Expand Down

0 comments on commit d86d04f

Please sign in to comment.