Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions app/components/Nav/Main/__snapshots__/MainNavigator.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,39 @@ exports[`MainNavigator Tab Bar Visibility hides tab bar when browser is active 1
}
}
/>
<Screen
component={[Function]}
name="ExploreSearch"
options={
{
"animationEnabled": true,
"cardStyleInterpolator": [Function],
"headerShown": false,
}
}
/>
<Screen
component={[Function]}
name="SitesFullView"
options={
{
"animationEnabled": true,
"cardStyleInterpolator": [Function],
"headerShown": false,
}
}
/>
<Screen
component={[Function]}
name="BrowserTabHome"
options={
{
"animationEnabled": true,
"cardStyleInterpolator": [Function],
"headerShown": false,
}
}
/>
<Screen
component={[Function]}
headerStyle={
Expand Down Expand Up @@ -571,6 +604,39 @@ exports[`MainNavigator Tab Bar Visibility shows tab bar when not in browser 1`]
}
}
/>
<Screen
component={[Function]}
name="ExploreSearch"
options={
{
"animationEnabled": true,
"cardStyleInterpolator": [Function],
"headerShown": false,
}
}
/>
<Screen
component={[Function]}
name="SitesFullView"
options={
{
"animationEnabled": true,
"cardStyleInterpolator": [Function],
"headerShown": false,
}
}
/>
<Screen
component={[Function]}
name="BrowserTabHome"
options={
{
"animationEnabled": true,
"cardStyleInterpolator": [Function],
"headerShown": false,
}
}
/>
<Screen
component={[Function]}
headerStyle={
Expand Down Expand Up @@ -889,6 +955,39 @@ exports[`MainNavigator matches rendered snapshot 1`] = `
}
}
/>
<Screen
component={[Function]}
name="ExploreSearch"
options={
{
"animationEnabled": true,
"cardStyleInterpolator": [Function],
"headerShown": false,
}
}
/>
<Screen
component={[Function]}
name="SitesFullView"
options={
{
"animationEnabled": true,
"cardStyleInterpolator": [Function],
"headerShown": false,
}
}
/>
<Screen
component={[Function]}
name="BrowserTabHome"
options={
{
"animationEnabled": true,
"cardStyleInterpolator": [Function],
"headerShown": false,
}
}
/>
<Screen
component={[Function]}
headerStyle={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jest.mock('../../../core/Engine', () => ({
init: () => mockedEngine.init(),
}));

jest.mock('../../../util/test/utils', () => ({
isE2E: true,
}));

beforeEach(() => {
jest.clearAllMocks();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createSelector } from 'reselect';
import { selectRemoteFeatureFlags } from '..';
import compareVersions from 'compare-versions';
import packageJson from '../../../../package.json';
import { isE2E } from '../../../util/test/utils';

const APP_VERSION = packageJson.version;

Expand Down Expand Up @@ -81,6 +82,9 @@ export const isAssetsTrendingTokensFeatureEnabled = (
return evaluateAssetsTrendingTokensRemoteFlag(flagValue);
};

// We are enabling this feature flag to be enabled by default for non-E2E builds
const forcedTrueOverride = () => (!isE2E ? 'true' : undefined);

/**
* Selector to check if the assets trending tokens feature flag is enabled.
* Supports environment variable override (OVERRIDE_REMOTE_FEATURE_FLAGS + ASSETS_TRENDING_TOKENS_ENABLED).
Expand All @@ -103,7 +107,7 @@ export const selectAssetsTrendingTokensEnabled = createSelector(

return isAssetsTrendingTokensFeatureEnabled(
value,
envOverride || undefined,
forcedTrueOverride() || envOverride || undefined,
);
},
);
Loading