Skip to content
Draft
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
54 changes: 54 additions & 0 deletions e2e-tests/MaestroTestApp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# OSX
.DS_Store

# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
**/.xcode.env.local

# Android/IntelliJ
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# node.js
node_modules/
npm-debug.log
yarn-error.log

# Ruby / CocoaPods
**/Pods/
/vendor/bundle/

# Bundle artifact
*.jsbundle

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
34 changes: 34 additions & 0 deletions e2e-tests/MaestroTestApp/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React, {useEffect} from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import Purchases from 'react-native-purchases';
import TestCasesScreen from './src/TestCasesScreen';
import PurchaseThroughPaywallScreen from './src/PurchaseThroughPaywallScreen';

const Stack = createNativeStackNavigator();

const API_KEY = 'MAESTRO_TESTS_REVENUECAT_API_KEY';

export default function App() {
useEffect(() => {
Purchases.setLogLevel(Purchases.LOG_LEVEL.DEBUG);
Purchases.configure({apiKey: API_KEY});
}, []);

return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="TestCases"
component={TestCasesScreen}
options={{title: 'Test Cases'}}
/>
<Stack.Screen
name="PurchaseThroughPaywall"
component={PurchaseThroughPaywallScreen}
options={{title: 'Purchase through paywall'}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
4 changes: 4 additions & 0 deletions e2e-tests/MaestroTestApp/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "MaestroTestApp",
"displayName": "MaestroTestApp"
}
3 changes: 3 additions & 0 deletions e2e-tests/MaestroTestApp/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
};
5 changes: 5 additions & 0 deletions e2e-tests/MaestroTestApp/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => App);
11 changes: 11 additions & 0 deletions e2e-tests/MaestroTestApp/ios/.xcode.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This `.xcode.env` file is versioned and is used to source the environment
# used when running script phases inside Xcode.
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.

# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_BINARY variable here.
# For example, to use nvm with brew, add the following line
# . "$(brew --prefix nvm)/nvm.sh" --no-use
export NODE_BINARY=$(command -v node)
Loading