forked from react-native-webview/react-native-webview
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into proj-davinci-dev
* master: (186 commits) chore(release): 11.3.1 [skip ci] fix(windows): Check UAP contract version before calling FrameworkElement.IsLoaded (react-native-webview#1858) fix(android:) enable DRM protected content (react-native-webview#1862) chore(release): 11.3.0 [skip ci] feat(ios): Add support for `limitsNavigationsToAppBoundDomains` (react-native-webview#1662) chore(release): 11.2.6 [skip ci] fix(ios): Add missing nullability specifiers; fix if block warning (react-native-webview#1898) chore(release): 11.2.5 [skip ci] chore(docs): Clarify that navigationType and isTopFrame is iOS only (react-native-webview#1880) chore(docs): fixed "postMessage" url in Reference.md (react-native-webview#1913) fix(iOS): webview retain cycle (react-native-webview#1916) chore(release): 11.2.4 [skip ci] fix(iOS): Send cookies with resource requests (react-native-webview#1803) chore(release): 11.2.3 [skip ci] fix(android): Fix full=screen video when in modals (react-native-webview#1748 by @cristianoccazinsp) chore(release): 11.2.2 [skip ci] fix(windows): Resolve Deploy Issue (react-native-webview#1850) chore(ci): Upgrade react-native-windows to 0.62.17 (react-native-webview#1768) chore(release): 11.2.1 [skip ci] fix(ios): error on iOS < 13(react-native-webview#1843) ... # Conflicts: # android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java # apple/RNCWebView.h # apple/RNCWebView.m # docs/Reference.md # index.d.ts # yarn.lock
- Loading branch information
Showing
195 changed files
with
18,587 additions
and
2,723 deletions.
There are no files selected for viewing
This file contains 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 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 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,12 @@ | ||
* text=auto | ||
|
||
*.bat text eol=crlf | ||
*.def text eol=crlf | ||
*.filters text eol=crlf | ||
*.idl text eol=crlf | ||
*.props text eol=crlf | ||
*.ps1 text eol=crlf | ||
*.sln text eol=crlf | ||
*.vcxproj text eol=crlf | ||
*.xaml text eol=crlf | ||
|
This file contains 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: 'Detox CI Tests' | ||
on: [push] | ||
on: [pull_request] | ||
|
||
jobs: | ||
tests: | ||
|
This file contains 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,108 @@ | ||
param ( | ||
[Parameter(Mandatory=$true)] | ||
[string[]] $Components, | ||
|
||
[uri] $InstallerUri = "https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe", | ||
|
||
[string] $VsInstaller = "${env:System_DefaultWorkingDirectory}\vs_Enterprise.exe", | ||
|
||
[string] $VsInstallOutputDir = "${env:System_DefaultWorkingDirectory}\vs", | ||
|
||
[System.IO.FileInfo] $VsInstallPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\Enterprise", | ||
|
||
[System.IO.FileInfo] $VsInstallerPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer", | ||
|
||
[switch] $Collect = $false, | ||
|
||
[switch] $Cleanup = $false, | ||
|
||
[switch] $UseWebInstaller = $false | ||
) | ||
|
||
$Components | ForEach-Object { | ||
$componentList += '--add', $_ | ||
} | ||
|
||
$LocalVsInstaller = "$VsInstallerPath\vs_installershell.exe" | ||
|
||
$UseWebInstaller = $UseWebInstaller -or -not (Test-Path -Path "$LocalVsInstaller") | ||
|
||
if ($UseWebInstaller) { | ||
Write-Host "Downloading web installer..." | ||
|
||
Invoke-WebRequest -Method Get ` | ||
-Uri $InstallerUri ` | ||
-OutFile $VsInstaller | ||
|
||
New-Item -ItemType directory -Path $VsInstallOutputDir | ||
|
||
Write-Host "Running web installer to download requested components..." | ||
|
||
Start-Process ` | ||
-FilePath "$VsInstaller" ` | ||
-ArgumentList ( ` | ||
'--layout', "$VsInstallOutputDir", | ||
'--wait', | ||
'--norestart', | ||
'--quiet' + ` | ||
$componentList | ||
) ` | ||
-Wait ` | ||
-PassThru | ||
|
||
Write-Host "Running downloaded VS installer to add requested components..." | ||
|
||
Start-Process ` | ||
-FilePath "$VsInstallOutputDir\vs_Enterprise.exe" ` | ||
-ArgumentList ( | ||
'modify', | ||
'--installPath', "`"$VsInstallPath`"" , | ||
'--wait', | ||
'--norestart', | ||
'--quiet' + ` | ||
$componentList | ||
) ` | ||
-Wait ` | ||
-PassThru ` | ||
-OutVariable returnCode | ||
|
||
if ($Cleanup) { | ||
Write-Host "Cleaning up..." | ||
|
||
Remove-Item -Path $VsInstaller | ||
Remove-Item -Path $VsInstallOutputDir -Recurse | ||
} | ||
|
||
} else { | ||
Write-Host "Running local installer to add requested components..." | ||
|
||
Start-Process ` | ||
-FilePath "$LocalVsInstaller" ` | ||
-ArgumentList ( | ||
'modify', | ||
'--installPath', "`"$VsInstallPath`"" , | ||
'--norestart', | ||
'--quiet' + ` | ||
$componentList | ||
) ` | ||
-Wait ` | ||
-OutVariable returnCode | ||
} | ||
|
||
if ($Collect) { | ||
Invoke-WebRequest -Method Get ` | ||
-Uri 'https://download.microsoft.com/download/8/3/4/834E83F6-C377-4DCE-A757-69A418B6C6DF/Collect.exe' ` | ||
-OutFile ${env:System_DefaultWorkingDirectory}\Collect.exe | ||
|
||
# Should generate ${env:Temp}\vslogs.zip | ||
Start-Process ` | ||
-FilePath "${env:System_DefaultWorkingDirectory}\Collect.exe" ` | ||
-Wait ` | ||
-PassThru | ||
|
||
New-Item -ItemType Directory -Force ${env:System_DefaultWorkingDirectory}\vslogs | ||
Expand-Archive -Path ${env:TEMP}\vslogs.zip -DestinationPath ${env:System_DefaultWorkingDirectory}\vslogs\ | ||
|
||
Write-Host "VC versions after installation:" | ||
Get-ChildItem -Name "$VsInstallPath\VC\Tools\MSVC\" | ||
} |
This file contains 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 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,59 @@ | ||
name: Windows CI | ||
on: [pull_request] | ||
|
||
jobs: | ||
run-windows-tests: | ||
name: Build & run tests | ||
runs-on: windows-2019 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout Code | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.9.1' | ||
|
||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v1.0.2 | ||
|
||
- name: Check node modules cache | ||
uses: actions/cache@v1 | ||
id: yarn-cache | ||
with: | ||
path: ./node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install node modules | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: yarn --pure-lockfile | ||
|
||
- name: yarn build | ||
if: steps.yarn-cache.outputs.cache-hit == 'true' | ||
run: | | ||
yarn build | ||
yarn tsc | ||
- name: Build x64 release | ||
shell: powershell | ||
run: npx react-native run-windows --root example --arch x64 --release --no-packager --no-deploy --logging | ||
|
||
# Workaround for a bug in package searching during deploy. | ||
# The deploy script only searches windows/{*/bin/x64/Release,Release/*}, but the build step above placed the pakcages at windows/x64/Release. | ||
# Copy the packages to Windows/Release before deploying. | ||
- name: Deploy | ||
shell: powershell | ||
run: | | ||
cd example | ||
Copy-Item -Path windows\x64\Release -Recurse -Destination windows\ | ||
npx react-native run-windows --arch x64 --release --no-build --no-packager | ||
- name: Start Appium server | ||
shell: powershell | ||
run: Start-Process PowerShell -ArgumentList "yarn appium" | ||
|
||
- name: Run tests | ||
run: yarn test:windows |
This file contains 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 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 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,31 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
import { driver, By2 } from 'selenium-appium' | ||
import { until } from 'selenium-webdriver'; | ||
|
||
const setup = require('../jest-setups/jest.setup'); | ||
jest.setTimeout(50000); | ||
|
||
beforeAll(() => { | ||
return driver.startWithCapabilities(setup.capabilites); | ||
}); | ||
|
||
afterAll(() => { | ||
return driver.quit(); | ||
}); | ||
|
||
describe('Alert Tests', () => { | ||
|
||
test('Show Alert', async () => { | ||
const showAlertButton = await driver.wait(until.elementLocated(By2.nativeName('Show alert'))); | ||
await showAlertButton.click(); | ||
await driver.wait(until.elementLocated(By2.nativeName('Hello! I am an alert box!'))); | ||
await By2.nativeName('OK').click(); | ||
const dismissMessage = await driver.wait(until.elementLocated(By2.nativeName('Alert dismissed!'))); | ||
expect(dismissMessage).not.toBeNull(); | ||
}); | ||
|
||
}); |
Oops, something went wrong.