Skip to content

Commit a8e7c7d

Browse files
authored
chore(tests): Tab-bar-hidden test refactor with new manual scenario (#3840)
## Description test-tabs-hidden name change to follow rules, text added to screen and manual scenario created in new folder ## Changes - Updated `tab-bar-hidden.tsx` file name to - 'test-tabs-hidden.tsx.' to follow test naming convention - Above file was also updated in Scenario secotion + test on the screen was added - New folder - scenarios were created to store scenarios related to tabs - new scenario was added - 'test-tabs-hidden.md' ## Before & after - visual documentation Test above button was added. <img width="300" height="650" alt="Simulator Screenshot - iPhone 17 Pro - 2026-04-03 at 11 50 51" src="https://github.com/user-attachments/assets/6b09a67c-47ea-4b6f-8596-881cc6078d16" />
1 parent 48d1538 commit a8e7c7d

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

apps/src/tests/single-feature-tests/tabs/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { ScenarioGroup } from '@apps/tests/shared/helpers';
22

33
import BottomAccessoryScenario from './bottom-accessory-layout';
44
import OverrideScrollViewContentInsetScenario from './override-scroll-view-content-inset';
5-
import TabBarHiddenScenario from './tab-bar-hidden';
5+
import TestTabsTabBarHidden from './test-tabs-tab-bar-hidden';
66
import TabsScreenOrientationScenario from './tabs-screen-orientation';
77
import TabBarAppearanceDefinedBySelectedTabScenario from './test-tabs-appearance-defined-by-selected-tab';
88
import TestTabsColorScheme from './test-tabs-color-scheme';
@@ -16,7 +16,7 @@ const scenarios = {
1616
BottomAccessoryScenario,
1717
OverrideScrollViewContentInsetScenario,
1818
TabBarAppearanceDefinedBySelectedTabScenario,
19-
TabBarHiddenScenario,
19+
TestTabsTabBarHidden,
2020
TabsScreenOrientationScenario,
2121
TestTabsColorScheme,
2222
TestTabsLayoutDirection,

apps/src/tests/single-feature-tests/tabs/tab-bar-hidden.tsx renamed to apps/src/tests/single-feature-tests/tabs/test-tabs-tab-bar-hidden/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { SettingsSwitch } from '@apps/shared/SettingsSwitch';
22
import React from 'react';
3-
import { ScrollView } from 'react-native';
3+
import { ScrollView, Text } from 'react-native';
44
import type { Scenario } from '@apps/tests/shared/helpers';
55
import {
66
TabsContainerWithHostConfigContext,
@@ -11,7 +11,7 @@ import {
1111

1212
const SCENARIO: Scenario = {
1313
name: 'Tab Bar Hidden',
14-
key: 'tab-bar-hidden',
14+
key: 'test-tabs-tab-bar-hidden',
1515
platforms: ['ios', 'android'],
1616
AppComponent: App,
1717
};
@@ -23,7 +23,9 @@ function ConfigScreen() {
2323

2424
return (
2525
<ScrollView style={{ padding: 40 }}>
26+
<Text style={{ textAlign: 'center' }}>Change flag value by clicking on button.</Text>
2627
<SettingsSwitch
28+
style={{ marginTop: 20, marginBottom: 15 }}
2729
label="tabBarHidden"
2830
value={hostConfig.tabBarHidden ?? false}
2931
onValueChange={value => updateHostConfig({ tabBarHidden: value })}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Test Scenario: tabBarHidden
2+
3+
**E2E test:** No - to be automated
4+
5+
## Prerequisites
6+
- iOS 18+ device or simulator
7+
- Android emulator
8+
9+
---
10+
11+
### Steps
12+
13+
1. Launch the app and navigate to the screen Tab Bar Hidden.
14+
15+
- [ ] Expected: Screen with one Tab in tab bar should be displayed.
16+
2. Toggle `tabBarHidden` to `true`.
17+
18+
- [ ] Expected: Tab bar should disappear immediately.
19+
3. Toggle back to `false`.
20+
21+
- [ ] Expected: Tab bar should reappear.

0 commit comments

Comments
 (0)