File tree Expand file tree Collapse file tree 2 files changed +1
-34
lines changed Expand file tree Collapse file tree 2 files changed +1
-34
lines changed Original file line number Diff line number Diff line change @@ -5,17 +5,6 @@ import { serviceConfig } from '../config/service-config';
5
5
* @typedef {import('../../types/api').Profile } Profile
6
6
*/
7
7
8
- /**
9
- * Returns true if the sidebar tutorial has to be shown to a user for a given session.
10
- * @deprecated To be removed once preact help/tutorial panel is in place
11
- */
12
- export function shouldShowSidebarTutorial ( sessionState ) {
13
- if ( sessionState . preferences . show_sidebar_tutorial ) {
14
- return true ;
15
- }
16
- return false ;
17
- }
18
-
19
8
/**
20
9
* The following things must all be true for the tutorial component to auto-display
21
10
* on app launch:
Original file line number Diff line number Diff line change 1
1
import * as sessionUtil from '../session' ;
2
2
3
3
describe ( 'sidebar/helpers/session' , ( ) => {
4
- describe ( '#shouldShowSidebarTutorial' , ( ) => {
5
- it ( 'shows sidebar tutorial if the settings object has the show_sidebar_tutorial key set' , ( ) => {
6
- const sessionState = {
7
- preferences : {
8
- show_sidebar_tutorial : true ,
9
- } ,
10
- } ;
11
-
12
- assert . isTrue ( sessionUtil . shouldShowSidebarTutorial ( sessionState ) ) ;
13
- } ) ;
14
-
15
- it ( 'hides sidebar tutorial if the settings object does not have the show_sidebar_tutorial key set' , ( ) => {
16
- const sessionState = {
17
- preferences : {
18
- show_sidebar_tutorial : false ,
19
- } ,
20
- } ;
21
-
22
- assert . isFalse ( sessionUtil . shouldShowSidebarTutorial ( sessionState ) ) ;
23
- } ) ;
24
- } ) ;
25
-
26
- describe ( '#shouldAutoDisplayTutorial' , ( ) => {
4
+ describe ( 'shouldAutoDisplayTutorial' , ( ) => {
27
5
[
28
6
{
29
7
// The only "true" state
You can’t perform that action at this time.
0 commit comments