File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+
3+ import { ComponentMeta , ComponentStory } from '@storybook/react' ;
4+
5+ import { VariantAnalysisContainer } from '../../view/variant-analysis/VariantAnalysisContainer' ;
6+ import { VariantAnalysisLoading as VariantAnalysisLoadingComponent } from '../../view/variant-analysis/VariantAnalysisLoading' ;
7+
8+ export default {
9+ title : 'Variant Analysis/Variant Analysis Loading' ,
10+ component : VariantAnalysisLoadingComponent ,
11+ decorators : [
12+ ( Story ) => (
13+ < VariantAnalysisContainer >
14+ < Story />
15+ </ VariantAnalysisContainer >
16+ )
17+ ] ,
18+ argTypes : { }
19+ } as ComponentMeta < typeof VariantAnalysisLoadingComponent > ;
20+
21+ const Template : ComponentStory < typeof VariantAnalysisLoadingComponent > = ( ) => (
22+ < VariantAnalysisLoadingComponent />
23+ ) ;
24+
25+ export const VariantAnalysisLoading = Template . bind ( { } ) ;
Original file line number Diff line number Diff line change 1+ import * as React from 'react' ;
2+ import styled from 'styled-components' ;
3+
4+ const FirstRow = styled . div `
5+ font-size: x-large;
6+ font-weight: 600;
7+ text-align: center;
8+ margin-bottom: 0.5em;
9+ ` ;
10+
11+ const SecondRow = styled . div `
12+ text-align: center;
13+ color: var(--vscode-descriptionForeground);
14+ ` ;
15+
16+ export const VariantAnalysisLoading = ( ) => {
17+ return (
18+ < div >
19+ < FirstRow > We are getting everything ready</ FirstRow >
20+ < SecondRow > Results will appear here shortly</ SecondRow >
21+ </ div >
22+ ) ;
23+ } ;
Original file line number Diff line number Diff line change 1+ import * as React from 'react' ;
2+ import { render as reactRender , screen } from '@testing-library/react' ;
3+ import { VariantAnalysisLoading } from '../VariantAnalysisLoading' ;
4+
5+ describe ( VariantAnalysisLoading . name , ( ) => {
6+ const render = ( ) =>
7+ reactRender ( < VariantAnalysisLoading /> ) ;
8+
9+ it ( 'renders loading text' , async ( ) => {
10+ render ( ) ;
11+
12+ expect ( screen . getByText ( 'We are getting everything ready' ) ) . toBeInTheDocument ( ) ;
13+ expect ( screen . getByText ( 'Results will appear here shortly' ) ) . toBeInTheDocument ( ) ;
14+ } ) ;
15+ } ) ;
You can’t perform that action at this time.
0 commit comments