Skip to content

Commit 7cf5158

Browse files
authored
fix: fix schedule stack background color (#167)
1 parent aab6750 commit 7cf5158

2 files changed

Lines changed: 39 additions & 27 deletions

File tree

__tests__/SchedulePage.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ describe('SchedulePage', () => {
1010
// The real ScheduleService will call fetch() which is mocked
1111
// to return XML data, which the service will parse and display
1212
expect(screen.getByText('Africa Kabisa')).toBeTruthy();
13-
expect(screen.getByText('Post-tentious')).toBeTruthy();
13+
expect(screen.getByText(/Post-tentious.*/)).toBeTruthy();
1414
});
1515

1616
test('navigates to ShowDetails when tapping a show with archives', async () => {
1717
const user = userEvent.setup();
1818
await renderAsync(<ScheduleStack />, { wrapper: TestWrapper });
1919

20-
expect(screen.getByText('Post-tentious')).toBeTruthy();
20+
expect(screen.getByText(/Post-tentious.*/)).toBeTruthy();
2121

2222
// Tap on the Post-tentious show
23-
const showButton = screen.getByText('Post-tentious');
23+
const showButton = screen.getByText(/Post-tentious.*/);
2424
await user.press(showButton);
2525

2626
// Look for content that's unique to the ShowDetails page
@@ -34,8 +34,8 @@ describe('SchedulePage', () => {
3434
await renderAsync(<ScheduleStack />, { wrapper: TestWrapper });
3535

3636
// Wait for schedule to load and tap on a show
37-
expect(screen.getByText('Post-tentious')).toBeTruthy();
38-
await user.press(screen.getByText('Post-tentious'));
37+
expect(screen.getByText(/Post-tentious.*/)).toBeTruthy();
38+
await user.press(screen.getByText(/Post-tentious.*/));
3939

4040
// Wait for ShowDetails to load with archives
4141
expect(screen.getByText('Archives')).toBeTruthy();
@@ -48,7 +48,7 @@ describe('SchedulePage', () => {
4848

4949
// Verify we're on the ArchivedShowView page by looking for playlist content
5050
// The mock playlist has songs: "Waiting Room" by Fugazi and "Breadcrumb Trail" by Slint
51-
expect(screen.getByText('Waiting Room')).toBeTruthy();
52-
expect(screen.getByText('Fugazi')).toBeTruthy();
51+
expect(screen.getByText(/Waiting Room.*/)).toBeTruthy();
52+
expect(screen.getByText(/Fugazi.*/)).toBeTruthy();
5353
});
5454
});

src/app/Schedule/index.tsx

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
import { StyleSheet, View } from 'react-native';
12
import { RouteProp } from '@react-navigation/native';
23
import { createNativeStackNavigator } from '@react-navigation/native-stack';
4+
35
import ArchivedShowView from './ArchivedShowView';
46
import ShowDetailsPage from './ShowDetailsPage';
57
import SchedulePage from './SchedulePage';
8+
import { COLORS } from '@utils/Colors';
69

710
const Stack = createNativeStackNavigator();
811

@@ -30,25 +33,34 @@ export const ScheduleStack = () => {
3033
});
3134

3235
return (
33-
<Stack.Navigator
34-
screenOptions={{
35-
headerShown: true,
36-
headerTransparent: true,
37-
title: 'Schedule',
38-
headerTintColor: '#ffffff',
39-
}}
40-
>
41-
<Stack.Screen name="ScheduleMain" component={SchedulePage} />
42-
<Stack.Screen
43-
name="ShowDetails"
44-
component={ShowDetailsPage}
45-
options={getShowDetailsOptions}
46-
/>
47-
<Stack.Screen
48-
name="ArchivedShowView"
49-
component={ArchivedShowView}
50-
options={getArchivedShowViewOptions}
51-
/>
52-
</Stack.Navigator>
36+
<View style={styles.gradient}>
37+
<Stack.Navigator
38+
screenOptions={{
39+
headerShown: true,
40+
headerTransparent: true,
41+
title: 'Schedule',
42+
headerTintColor: '#ffffff',
43+
}}
44+
>
45+
<Stack.Screen name="ScheduleMain" component={SchedulePage} />
46+
<Stack.Screen
47+
name="ShowDetails"
48+
component={ShowDetailsPage}
49+
options={getShowDetailsOptions}
50+
/>
51+
<Stack.Screen
52+
name="ArchivedShowView"
53+
component={ArchivedShowView}
54+
options={getArchivedShowViewOptions}
55+
/>
56+
</Stack.Navigator>
57+
</View>
5358
);
5459
};
60+
61+
const styles = StyleSheet.create({
62+
gradient: {
63+
flex: 1,
64+
backgroundColor: COLORS.BACKGROUND.PRIMARY,
65+
},
66+
});

0 commit comments

Comments
 (0)