Commit 7ec8715b authored by Robert Knight's avatar Robert Knight

Remove unused function that was missing types

parent 58e1ccc3
...@@ -5,17 +5,6 @@ import { serviceConfig } from '../config/service-config'; ...@@ -5,17 +5,6 @@ import { serviceConfig } from '../config/service-config';
* @typedef {import('../../types/api').Profile} Profile * @typedef {import('../../types/api').Profile} Profile
*/ */
/**
* Returns true if the sidebar tutorial has to be shown to a user for a given session.
* @deprecated To be removed once preact help/tutorial panel is in place
*/
export function shouldShowSidebarTutorial(sessionState) {
if (sessionState.preferences.show_sidebar_tutorial) {
return true;
}
return false;
}
/** /**
* The following things must all be true for the tutorial component to auto-display * The following things must all be true for the tutorial component to auto-display
* on app launch: * on app launch:
......
import * as sessionUtil from '../session'; import * as sessionUtil from '../session';
describe('sidebar/helpers/session', () => { describe('sidebar/helpers/session', () => {
describe('#shouldShowSidebarTutorial', () => { describe('shouldAutoDisplayTutorial', () => {
it('shows sidebar tutorial if the settings object has the show_sidebar_tutorial key set', () => {
const sessionState = {
preferences: {
show_sidebar_tutorial: true,
},
};
assert.isTrue(sessionUtil.shouldShowSidebarTutorial(sessionState));
});
it('hides sidebar tutorial if the settings object does not have the show_sidebar_tutorial key set', () => {
const sessionState = {
preferences: {
show_sidebar_tutorial: false,
},
};
assert.isFalse(sessionUtil.shouldShowSidebarTutorial(sessionState));
});
});
describe('#shouldAutoDisplayTutorial', () => {
[ [
{ {
// The only "true" state // The only "true" state
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment