From 1356c4682507fe3c7bdfebc7316fcad1b67594a1 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 18 Apr 2018 13:25:48 +0300 Subject: Modified Tech_IOS according to Avidan spec. Added Tango.Documents library. Implemented Ports List Generator. --- .../Tango.MachineStudio.Technician/Editors/DigitalInElementEditor.xaml | 2 +- .../Tango.MachineStudio.Technician/Editors/DigitalOutElementEditor.xaml | 2 +- .../PropertiesTemplates/DigitalInTemplate.xaml | 2 +- .../PropertiesTemplates/DigitalOutTemplate.xaml | 2 +- .../Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs | 2 +- .../Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalInElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalInElementEditor.xaml index 29eab7042..8c72798d5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalInElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalInElementEditor.xaml @@ -45,7 +45,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalOutElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalOutElementEditor.xaml index dcf78ca69..5fd92c336 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalOutElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/DigitalOutElementEditor.xaml @@ -56,7 +56,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalInTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalInTemplate.xaml index 1121fe9e1..3f830de65 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalInTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalInTemplate.xaml @@ -25,7 +25,7 @@ Selected Pin - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalOutTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalOutTemplate.xaml index dafceefcb..13840d4b1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalOutTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/DigitalOutTemplate.xaml @@ -25,7 +25,7 @@ Selected Pin - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs index b7231b10f..177d44489 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs @@ -25,7 +25,7 @@ namespace Tango.MachineStudio.Technician.TechItems public TechIo TechIo { get { return _techIo; } - set { _techIo = value; RaisePropertyChangedAuto(); TechName = _techIo != null ? _techIo.Description : null; ItemGuid = value != null ? value.Guid : null; } + set { _techIo = value; RaisePropertyChangedAuto(); TechName = _techIo != null ? _techIo.InterfaceName : null; ItemGuid = value != null ? value.Guid : null; } } private bool _value; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs index 5fd02c4a9..84e727b97 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs @@ -30,7 +30,7 @@ namespace Tango.MachineStudio.Technician.TechItems public TechIo TechIo { get { return _techIo; } - set { _techIo = value; RaisePropertyChangedAuto(); TechName = _techIo != null ? _techIo.Description : null; ItemGuid = value != null ? value.Guid : null; } + set { _techIo = value; RaisePropertyChangedAuto(); TechName = _techIo != null ? _techIo.InterfaceName : null; ItemGuid = value != null ? value.Guid : null; } } private bool _value; -- cgit v1.3.1 From 30dbc28131a53925dd8cb17f3ca3e84922f0cb3d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 18 Apr 2018 14:02:16 +0300 Subject: Started working on UI automation testing! --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 1572864 -> 1572864 bytes .../Tango.MachineStudio.UI/Views/MainView.xaml | 2 +- .../Visual_Studio/Tango.UnitTesting/App.config | 40 ++++++++++++++++++ Software/Visual_Studio/Tango.UnitTesting/Helper.cs | 9 ++++ .../Tango.UnitTesting/MachineStudio_TST.cs | 46 +++++++++++++++++++++ .../Tango.UnitTesting/Tango.UnitTesting.csproj | 7 ++++ .../Tango.UnitTesting/packages.config | 2 + 8 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs (limited to 'Software/Visual_Studio/MachineStudio') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 81851ee03..8d6fbc4df 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 990fa690e..95a1bc387 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index 030e26898..a841a72cb 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -365,7 +365,7 @@ - diff --git a/Software/Visual_Studio/Tango.UnitTesting/App.config b/Software/Visual_Studio/Tango.UnitTesting/App.config index 80fd5e3fa..516b46de6 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/App.config +++ b/Software/Visual_Studio/Tango.UnitTesting/App.config @@ -23,6 +23,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.UnitTesting/Helper.cs b/Software/Visual_Studio/Tango.UnitTesting/Helper.cs index 7c0e639c5..8a4cd57e8 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/Helper.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/Helper.cs @@ -34,6 +34,15 @@ namespace Tango.UnitTesting return Path.GetFullPath(@"..\..\..\PMR\Messages\"); } + /// + /// Gets the machine studio exe path. + /// + /// + public static String GetMachineStudioPath() + { + return Path.GetFullPath(@"..\..\Build\Debug\Tango.MachineStudio.UI.exe"); + } + /// /// Gets the SQLite database file path in DB folder. /// diff --git a/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs new file mode 100644 index 000000000..c56a177f8 --- /dev/null +++ b/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs @@ -0,0 +1,46 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using TestStack.White; +using TestStack.White.Factory; +using TestStack.White.UIItems; +using TestStack.White.UIItems.Finders; +using TestStack.White.UIItems.WindowItems; + +namespace Tango.UnitTesting +{ + [TestClass] + [TestCategory("Machine Studio")] + public class MachineStudio_TST + { + [TestMethod] + public void Login() + { + var app = Application.Launch(Helper.GetMachineStudioPath()); + + var window = app.GetWindow("Tango", InitializeOption.NoCache); + + window.WaitTill(() => window.Get