-
Notifications
You must be signed in to change notification settings - Fork 200
Added react native tests #1473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ArnabChatterjee20k
wants to merge
7
commits into
master
Choose a base branch
from
realtime-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Added react native tests #1473
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d56eddd
added react native tests
ArnabChatterjee20k ef86b7c
updated the ci
ArnabChatterjee20k 8fd1fe0
updated
ArnabChatterjee20k d85481d
fix: react native test rollup typescript outDir
abnegate ffccd7d
chore: remove accidentally committed local build artifacts
abnegate 7fd7b82
fix: add Client.ping() to react native template
abnegate 8741445
fix: skip non-spec WebSocket third arg on react-native-web
abnegate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,8 @@ jobs: | |
| AppleSwift56, | ||
| Swift56, | ||
| WebChromium, | ||
| WebNode | ||
| WebNode, | ||
| ReactNative | ||
| ] | ||
|
|
||
| steps: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <?php | ||
|
|
||
| namespace Tests; | ||
|
|
||
| class ReactNativeTest extends Base | ||
| { | ||
| protected string $sdkName = 'react-native'; | ||
| protected string $sdkPlatform = 'client'; | ||
| protected string $sdkLanguage = 'reactnative'; | ||
| protected string $version = '0.0.1'; | ||
|
|
||
| protected string $language = 'react-native'; | ||
| protected string $class = 'Appwrite\SDK\Language\ReactNative'; | ||
|
|
||
| protected array $build = [ | ||
| 'cp tests/languages/react-native/tests.js tests/sdks/react-native/tests.js', | ||
| 'cp tests/languages/react-native/index.html tests/sdks/react-native/index.html', | ||
| 'cp tests/languages/react-native/browser.js tests/sdks/react-native/browser.js', | ||
| 'cp tests/languages/react-native/rollup.test.config.mjs tests/sdks/react-native/rollup.test.config.mjs', | ||
| 'mkdir -p tests/sdks/react-native/shims && cp tests/languages/react-native/shims/expo-file-system.js tests/sdks/react-native/shims/expo-file-system.js', | ||
| 'docker run --rm -v $(pwd):/app -w /app/tests/sdks/react-native mcr.microsoft.com/playwright:v1.59.0-jammy sh -c "npm install && npm install --no-save react-native-web react react-dom @rollup/plugin-alias @rollup/plugin-commonjs @rollup/plugin-node-resolve @rollup/plugin-replace"', | ||
| 'docker run --rm -v $(pwd):/app -w /app/tests/sdks/react-native mcr.microsoft.com/playwright:v1.59.0-jammy sh -c "npx rollup -c rollup.test.config.mjs"', | ||
| ]; | ||
|
|
||
| protected string $command = | ||
| 'docker run --network="mockapi" --rm -v $(pwd):/app -e BROWSER=chromium -w /app/tests/sdks/react-native mcr.microsoft.com/playwright:v1.59.0-jammy node tests.js'; | ||
|
|
||
| protected array $expectedOutput = [ | ||
| ...Base::PING_RESPONSE, | ||
| ...Base::FOO_RESPONSES, | ||
| ...Base::FOO_RESPONSES, // Object params | ||
| ...Base::BAR_RESPONSES, | ||
| ...Base::BAR_RESPONSES, // Object params | ||
| ...Base::GENERAL_RESPONSES, | ||
| ...Base::ENUM_RESPONSES, | ||
| ...Base::MODEL_RESPONSES, | ||
| ...Base::EXCEPTION_RESPONSES, | ||
| ...Base::REALTIME_RESPONSES, | ||
| ...Base::QUERY_HELPER_RESPONSES, | ||
| ...Base::PERMISSION_HELPER_RESPONSES, | ||
| ...Base::ID_HELPER_RESPONSES, | ||
| ...Base::CHANNEL_HELPER_RESPONSES, | ||
| ...Base::OPERATOR_HELPER_RESPONSES, | ||
| ]; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.