-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Microsoft/sample_apps
Added Tutorial app to sample_apps branch
- Loading branch information
Showing
23 changed files
with
757 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
project.lock.json | ||
*.user |
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,62 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.23107.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BaseConverterUWP", "BaseConverterUWP\BaseConverterUWP.csproj", "{8465E874-BFC7-4B8A-B9BB-E710DB67F520}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BaseConverterUITest", "BaseConverterUITest\BaseConverterUITest.csproj", "{8D72292F-6450-4AEE-91B5-4C34A225C9CE}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|ARM = Debug|ARM | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|ARM = Release|ARM | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|Any CPU.ActiveCfg = Debug|x86 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|ARM.ActiveCfg = Debug|ARM | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|ARM.Build.0 = Debug|ARM | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|ARM.Deploy.0 = Debug|ARM | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|x64.ActiveCfg = Debug|x64 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|x64.Build.0 = Debug|x64 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|x64.Deploy.0 = Debug|x64 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|x86.ActiveCfg = Debug|x86 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|x86.Build.0 = Debug|x86 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Debug|x86.Deploy.0 = Debug|x86 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|Any CPU.ActiveCfg = Release|x86 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|ARM.ActiveCfg = Release|ARM | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|ARM.Build.0 = Release|ARM | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|ARM.Deploy.0 = Release|ARM | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|x64.ActiveCfg = Release|x64 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|x64.Build.0 = Release|x64 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|x64.Deploy.0 = Release|x64 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|x86.ActiveCfg = Release|x86 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|x86.Build.0 = Release|x86 | ||
{8465E874-BFC7-4B8A-B9BB-E710DB67F520}.Release|x86.Deploy.0 = Release|x86 | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Debug|ARM.ActiveCfg = Debug|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Debug|ARM.Build.0 = Debug|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Debug|x64.Build.0 = Debug|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Debug|x86.Build.0 = Debug|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Release|ARM.ActiveCfg = Release|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Release|ARM.Build.0 = Release|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Release|x64.ActiveCfg = Release|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Release|x64.Build.0 = Release|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Release|x86.ActiveCfg = Release|Any CPU | ||
{8D72292F-6450-4AEE-91B5-4C34A225C9CE}.Release|x86.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
91 changes: 91 additions & 0 deletions
91
Samples/BaseConverterTest/BaseConverterUITest/BaseConverterUITest.csproj
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,91 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{8D72292F-6450-4AEE-91B5-4C34A225C9CE}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>BaseConverterUITest</RootNamespace> | ||
<AssemblyName>BaseConverterUITest</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> | ||
<IsCodedUITest>False</IsCodedUITest> | ||
<TestProjectType>UnitTest</TestProjectType> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Drawing" /> | ||
<Reference Include="WebDriver, Version=2.53.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Selenium.WebDriver.2.53.0\lib\net40\WebDriver.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<Choose> | ||
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'"> | ||
<ItemGroup> | ||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | ||
</ItemGroup> | ||
</When> | ||
<Otherwise> | ||
<ItemGroup> | ||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" /> | ||
</ItemGroup> | ||
</Otherwise> | ||
</Choose> | ||
<ItemGroup> | ||
<Compile Include="UnitTest1.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Choose> | ||
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'"> | ||
<ItemGroup> | ||
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
</When> | ||
</Choose> | ||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
36 changes: 36 additions & 0 deletions
36
Samples/BaseConverterTest/BaseConverterUITest/Properties/AssemblyInfo.cs
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,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("BaseConverterUITest")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("BaseConverterUITest")] | ||
[assembly: AssemblyCopyright("Copyright © 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("8d72292f-6450-4aee-91b5-4c34a225c9ce")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
71 changes: 71 additions & 0 deletions
71
Samples/BaseConverterTest/BaseConverterUITest/UnitTest1.cs
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,71 @@ | ||
//****************************************************************************** | ||
// | ||
// Copyright (c) 2016 Microsoft Corporation. All rights reserved. | ||
// | ||
// This code is licensed under the MIT License (MIT). | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
// | ||
//****************************************************************************** | ||
|
||
using System; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using OpenQA.Selenium.Remote; | ||
|
||
namespace BaseConverterUITest | ||
{ | ||
[TestClass] | ||
public class UnitTest1 | ||
{ | ||
protected const string AppDriverUrl = "http://127.0.0.1:4723"; | ||
protected static RemoteWebDriver TestAppSession; | ||
protected static RemoteWebElement TestAppResult; | ||
|
||
[ClassInitialize] | ||
public static void Setup(TestContext context) | ||
{ | ||
DesiredCapabilities appCapabilities = new DesiredCapabilities(); | ||
appCapabilities.SetCapability("app", "67017b09-d193-4676-a8a5-9d474e2f2c74_1gb0zh1xa1sqe!App"); | ||
TestAppSession = new RemoteWebDriver(new Uri(AppDriverUrl), appCapabilities); | ||
|
||
Assert.IsNotNull(TestAppSession); | ||
} | ||
[TestMethod] | ||
public void ConvertBaseTest() | ||
{ | ||
var boxes = TestAppSession.FindElementsByClassName("TextBox"); | ||
for (int i = 0; i < boxes.Count; i++) | ||
{ | ||
var item = boxes[i]; | ||
if (i == 0) | ||
{ | ||
item.SendKeys("16"); | ||
} | ||
else if (i == 1) | ||
{ | ||
item.SendKeys("2"); | ||
} | ||
else | ||
{ | ||
//do nothing | ||
} | ||
} | ||
|
||
var button = TestAppSession.FindElementByClassName("Button"); | ||
button.Click(); | ||
|
||
/*Verify the conversion happened successfully by locating the converted item on the page | ||
*In this case, converting 16 from base 10 to base 2 should yield 10,000 as the result*/ | ||
TestAppResult = TestAppSession.FindElementByName("10000") as RemoteWebElement; | ||
Assert.IsNotNull(TestAppResult); | ||
|
||
TestAppSession.Dispose(); | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
Samples/BaseConverterTest/BaseConverterUITest/packages.config
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Selenium.WebDriver" version="2.53.0" targetFramework="net452" /> | ||
</packages> |
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,8 @@ | ||
<Application | ||
x:Class="BaseConverterUWP.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:BaseConverterUWP" | ||
RequestedTheme="Light"> | ||
|
||
</Application> |
Oops, something went wrong.