Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mironiasty committed Jun 6, 2024
1 parent 1bfa21e commit 98ea01a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/navigators/AppNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import ConnectWithRoomManagerScreen from '../screens/ConnectWithRoomManagerScree
import ConnectWithTokenScreen from '../screens/ConnectWithTokenScreen';
import PreviewScreen from '../screens/PreviewScreen';
import RoomScreen from '../screens/RoomScreen';
import { appNavigationLabels } from '../types/ComponentLabels';
import { AdditionalColors, BrandColors } from '../utils/Colors';

export type AppRootStackParamList = {
Expand Down Expand Up @@ -40,6 +41,8 @@ const Stack = createNativeStackNavigator<AppRootStackParamList>();

const Tab = createBottomTabNavigator<TabParamList>();

const { USE_ROOM_MANAGER_TAB, USE_TOKEN_TAB } = appNavigationLabels;

const TabNavigator = () => {
return (
<Tab.Navigator
Expand All @@ -52,6 +55,7 @@ const TabNavigator = () => {
tabBarActiveTintColor: BrandColors.darkBlue100,
tabBarInactiveTintColor: AdditionalColors.grey60,
tabBarIcon: tabBarIcon('room-service'),
tabBarAccessibilityLabel: USE_ROOM_MANAGER_TAB,
}}
/>
<Tab.Screen
Expand All @@ -62,6 +66,7 @@ const TabNavigator = () => {
tabBarActiveTintColor: BrandColors.darkBlue100,
tabBarInactiveTintColor: AdditionalColors.grey60,
tabBarIcon: tabBarIcon('ticket'),
tabBarAccessibilityLabel: USE_TOKEN_TAB,
}}
/>
</Tab.Navigator>
Expand Down
6 changes: 6 additions & 0 deletions example/types/ComponentLabels.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
const appNavigationLabels = {
USE_ROOM_MANAGER_TAB: 'use_room_manager_tab',
USE_TOKEN_TAB: 'use_token_tab',
};

const connectScreenLabels = {
URL_INPUT: 'url_input',
TOKEN_INPUT: 'token_input',
Expand Down Expand Up @@ -31,6 +36,7 @@ const soundOutputDevicesLabels = {
};

export {
appNavigationLabels,
connectScreenLabels,
previewScreenLabels,
roomScreenLabels,
Expand Down
3 changes: 3 additions & 0 deletions example/webdriverio-test/test/specs/test.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
roomScreenLabels,
previewScreenLabels,
soundOutputDevicesLabels,
appNavigationLabels,
} from '../../../types/ComponentLabels';
import {
getElement,
Expand All @@ -25,6 +26,7 @@ import {
typeToInput,
} from '../../utils';

const { USE_TOKEN_TAB } = appNavigationLabels;
const { URL_INPUT, TOKEN_INPUT, CONNECT_BUTTON } = connectScreenLabels;
const {
JOIN_BUTTON,
Expand Down Expand Up @@ -105,6 +107,7 @@ const tests: Test[] = [
const webSocketUrl = getWebsocketUrl(
process.env.FISHJAM_HOST_MOBILE as string,
);
await tapButton(driver, '~' + USE_TOKEN_TAB);
await typeToInput(driver, '~' + TOKEN_INPUT, peerDetail.token);
await typeToInput(driver, '~' + URL_INPUT, webSocketUrl);
},
Expand Down

0 comments on commit 98ea01a

Please sign in to comment.