@@ -23,27 +23,78 @@ steps:
2323 inputs :
2424 script : yarn run prepublishOnly
2525
26+ - task : PowerShell@2
27+ displayName : ' Replace the AppID'
28+ inputs :
29+ targetType : ' inline'
30+ script : ' ((Get-Content -path example/Setup.ts -Raw) -replace "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App","Microsoft.WindowsCalculator.Dev_8wekyb3d8bbwe!App") | Set-Content -Path example/Setup.ts'
31+ - task : PowerShell@2
32+ displayName : ' Show the AppID'
33+ inputs :
34+ targetType : ' inline'
35+ script : ' Get-Content example/Setup.ts | foreach {Write-Output $_}'
36+
2637- task : CmdLine@2
38+ displayName : yarn install
39+ inputs :
40+ script : yarn install
41+ workingDirectory : ' example'
42+
43+ - task : DeleteFiles@1
44+ displayName : Remove offical selenium-appium\dist
2745 inputs :
28- script : |
29- npm pack
46+ SourceFolder : ' example\node_modules\selenium-appium\dist '
47+ Contents : ' * '
3048
3149- task : CopyFiles@2
50+ displayName : copy built selenium-appium\dist
3251 inputs :
33- sourceFolder : ' $(Build.SourcesDirectory) '
34- contents : ' *.tgz '
35- targetFolder : $(Build.ArtifactStagingDirectory)/npm
36- displayName : ' Copy npm package '
52+ SourceFolder : ' dist '
53+ Contents : ' ** '
54+ TargetFolder : ' example\node_modules\selenium-appium\dist '
55+ OverWrite : true
3756
38- - task : CopyFiles@2
57+ - task : DownloadGitHubRelease@0
58+ inputs :
59+ connection : ' react-native-windows'
60+ userRepository : ' react-native-windows/CalculatorPackage'
61+ defaultVersionType : ' latest'
62+ downloadPath : ' $(System.ArtifactsDirectory)'
63+
64+ - task : ExtractFiles@1
65+ inputs :
66+ archiveFilePatterns : ' $(System.ArtifactsDirectory)/*.zip'
67+ destinationFolder : ' TestApp'
68+ cleanDestinationFolder : true
69+
70+ - task : PowerShell@1
71+ displayName : ' Install Calculator Cert'
72+ inputs :
73+ scriptType : inlineScript
74+ arguments : ' -NonInteractive -Verb RunAs'
75+ inlineScript : |
76+ $file = ( Get-ChildItem -Path TestApp\Calculator_$(PackageManifest)_Test\Calculator_$(PackageManifest)_x64.cer )
77+ $file | Import-Certificate -CertStoreLocation cert:\LocalMachine\Root
78+
79+
80+ - task : PowerShell@1
81+ displayName : ' Install Calculator Packages'
82+ inputs :
83+ scriptName : ' TestApp\Calculator_$(PackageManifest)_Test\Add-AppDevPackage.ps1'
84+ arguments : ' -NonInteractive -Force:$true -Verb RunAs'
85+
86+ - task : Windows Application Driver@0
87+ inputs :
88+ OperationType : ' Start'
89+ WADArguments : 127.0.0.1 4723/wd/hub
90+ AgentResolution : 1080p
91+
92+ - task : CmdLine@2
3993 inputs :
40- sourceFolder : ' $(Build.SourcesDirectory)'
41- contents : ' package.json'
42- targetFolder : $(Build.ArtifactStagingDirectory)/npm
43- displayName : ' Copy package.json'
94+ script : ' yarn run jest'
95+ workingDirectory : ' example'
4496
45- - task : PublishBuildArtifacts@1
97+ - task : Windows Application Driver@0
4698 inputs :
47- pathtoPublish : ' $(Build.ArtifactStagingDirectory)/npm'
48- artifactName : npm
49- displayName : ' Publish npm artifact'
99+ OperationType : ' Stop'
100+ condition : succeededOrFailed()
0 commit comments