Home Screen: Do not show store setup activity panel. (https://github.com/woocommerce/woocommerce-admin/pull/5801)
Co-authored-by: Timmy Crawford <timmyc@churro.lan>
This commit is contained in:
parent
82ae70e910
commit
5a07b44f5c
|
@ -145,7 +145,10 @@ export class ActivityPanel extends Component {
|
||||||
! isEmbedded && this.isHomescreen() && ! isPerformingSetupTask;
|
! isEmbedded && this.isHomescreen() && ! isPerformingSetupTask;
|
||||||
|
|
||||||
const showStoreSetup =
|
const showStoreSetup =
|
||||||
! taskListComplete && ! taskListHidden && ! isPerformingSetupTask;
|
! taskListComplete &&
|
||||||
|
! taskListHidden &&
|
||||||
|
! isPerformingSetupTask &&
|
||||||
|
( ! this.isHomescreen() || isEmbedded );
|
||||||
|
|
||||||
const inbox = showInbox
|
const inbox = showInbox
|
||||||
? {
|
? {
|
||||||
|
|
|
@ -159,4 +159,38 @@ describe( 'Activity Panel', () => {
|
||||||
|
|
||||||
expect( queryByText( 'Store Setup' ) ).toBeNull();
|
expect( queryByText( 'Store Setup' ) ).toBeNull();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
it( 'should not render the store setup link when on the home screen and TaskList is not complete', () => {
|
||||||
|
const { queryByText } = render(
|
||||||
|
<ActivityPanel
|
||||||
|
requestingTaskListOptions={ false }
|
||||||
|
taskListComplete={ false }
|
||||||
|
taskListHidden={ false }
|
||||||
|
getHistory={ () => ( {
|
||||||
|
location: {
|
||||||
|
pathname: '/',
|
||||||
|
},
|
||||||
|
} ) }
|
||||||
|
query={ {
|
||||||
|
task: '',
|
||||||
|
} }
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
|
expect( queryByText( 'Store Setup' ) ).toBeNull();
|
||||||
|
} );
|
||||||
|
|
||||||
|
it( 'should render the store setup link when on embedded pages and TaskList is not complete', () => {
|
||||||
|
const { queryByText } = render(
|
||||||
|
<ActivityPanel
|
||||||
|
requestingTaskListOptions={ false }
|
||||||
|
taskListComplete={ false }
|
||||||
|
taskListHidden={ false }
|
||||||
|
isEmbedded
|
||||||
|
query={ {} }
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
|
expect( queryByText( 'Store Setup' ) ).toBeDefined();
|
||||||
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Reference in New Issue