aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-04-22 15:58:38 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-04-22 15:58:38 +0300
commitfa5e1c45ab2da4e988cf256c0e5ec521288e537f (patch)
tree4ee0608e0382757f5a9ad7f7681c89b65691b20e /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views
parentde099bd3b50b8ea52b212b8d322626582c2648be (diff)
downloadTango-fa5e1c45ab2da4e988cf256c0e5ec521288e537f.tar.gz
Tango-fa5e1c45ab2da4e988cf256c0e5ec521288e537f.zip
Implemented some UI test automation for Job create/delete.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml13
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml9
2 files changed, 12 insertions, 10 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
index c575ef2a3..99b3a9712 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
@@ -6,6 +6,7 @@
xmlns:global="clr-namespace:Tango.MachineStudio.Developer"
xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:automation="clr-namespace:Tango.MachineStudio.Common.Automation;assembly=Tango.MachineStudio.Common"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:techViews="clr-namespace:Tango.MachineStudio.Technician.Views;assembly=Tango.MachineStudio.Technician"
xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
@@ -233,7 +234,7 @@
<TextBlock VerticalAlignment="Center">Remove</TextBlock>
</StackPanel>
</Button>
- <Button Command="{Binding AddSegmentCommand}" Background="#68B367" BorderBrush="#68B367" Height="42" Padding="10" ToolTip="Add Segment">
+ <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddSegmentButton}" Command="{Binding AddSegmentCommand}" Background="#68B367" BorderBrush="#68B367" Height="42" Padding="10" ToolTip="Add Segment">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Plus" Width="24" Height="24"></materialDesign:PackIcon>
<TextBlock VerticalAlignment="Center">New</TextBlock>
@@ -242,7 +243,7 @@
</StackPanel>
</Border>
- <controls:MultiSelectListBox Style="{StaticResource {x:Type ListBox}}" SelectionMode="Extended" SelectionChanged="ListBox_SelectionChanged" ItemsSource="{Binding SegmentsCollectionView}" SelectedItem="{Binding SelectedSegment}" SelectedItemsList="{Binding SelectedSegments,Mode=TwoWay}" HorizontalContentAlignment="Stretch">
+ <controls:MultiSelectListBox AutomationProperties.AutomationId="{x:Static automation:Developer.SegmentsListBox}" Style="{StaticResource {x:Type ListBox}}" SelectionMode="Extended" SelectionChanged="ListBox_SelectionChanged" ItemsSource="{Binding SegmentsCollectionView}" SelectedItem="{Binding SelectedSegment}" SelectedItemsList="{Binding SelectedSegments,Mode=TwoWay}" HorizontalContentAlignment="Stretch">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource basicListBoxItem}">
@@ -438,13 +439,13 @@
<Grid HorizontalAlignment="Right" Margin="0 0 10 0">
<StackPanel Orientation="Horizontal">
- <Button Height="70" Width="100" Margin="0 0 10 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding DiscardJobCommand}">
+ <Button AutomationProperties.AutomationId="{x:Static automation:Developer.ToJobsButton}" Height="70" Width="100" Margin="0 0 10 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding DiscardJobCommand}">
<StackPanel>
<materialDesign:PackIcon HorizontalAlignment="Center" Width="24" Height="24" Kind="KeyboardBackspace" />
<TextBlock VerticalAlignment="Center" Margin="0 10 0 0">TO JOBS</TextBlock>
</StackPanel>
</Button>
- <Button Height="70" Width="100" Margin="0 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding SaveJobCommand}">
+ <Button AutomationProperties.AutomationId="{x:Static automation:Developer.SaveJobButton}" Height="70" Width="100" Margin="0 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="#202020" VerticalAlignment="Bottom" BorderBrush="Transparent" Command="{Binding SaveJobCommand}">
<StackPanel>
<materialDesign:PackIcon HorizontalAlignment="Center" Width="24" Height="24" Kind="ContentSave" />
<TextBlock VerticalAlignment="Center" Margin="0 10 0 0">SAVE JOB</TextBlock>
@@ -581,7 +582,7 @@
<TextBlock VerticalAlignment="Center">Remove</TextBlock>
</StackPanel>
</Button>
- <Button Command="{Binding AddBrushStopCommand}" Background="#68B367" BorderBrush="#68B367" Height="42" Padding="10">
+ <Button AutomationProperties.AutomationId="{x:Static automation:Developer.AddBrushStopButton}" Command="{Binding AddBrushStopCommand}" Background="#68B367" BorderBrush="#68B367" Height="42" Padding="10">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Plus" Width="24" Height="24"></materialDesign:PackIcon>
<TextBlock VerticalAlignment="Center">New</TextBlock>
@@ -605,7 +606,7 @@
</Rectangle>
</Grid>
<Grid Margin="0 10 10 0">
- <controls:MultiSelectListBox SelectionMode="Extended" Style="{x:Null}" Background="Transparent" ScrollViewer.CanContentScroll="False" BorderThickness="0" ItemsSource="{Binding BrushStopsCollectionView}" SelectedItem="{Binding SelectedBrushStop}" SelectedItemsList="{Binding SelectedBrushStops,Mode=TwoWay}" HorizontalContentAlignment="Stretch">
+ <controls:MultiSelectListBox AutomationProperties.AutomationId="{x:Static automation:Developer.BrushStopsListBox}" SelectionMode="Extended" Style="{x:Null}" Background="Transparent" ScrollViewer.CanContentScroll="False" BorderThickness="0" ItemsSource="{Binding BrushStopsCollectionView}" SelectedItem="{Binding SelectedBrushStop}" SelectedItemsList="{Binding SelectedBrushStops,Mode=TwoWay}" HorizontalContentAlignment="Stretch">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource basicListBoxItem}">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
index a8274a4f7..066dc870b 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
@@ -6,6 +6,7 @@
xmlns:global="clr-namespace:Tango.MachineStudio.Developer"
xmlns:designer="clr-namespace:Tango.MachineStudio.MachineDesigner.Views;assembly=Tango.MachineStudio.MachineDesigner"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:automation="clr-namespace:Tango.MachineStudio.Common.Automation;assembly=Tango.MachineStudio.Common"
xmlns:localConverters="clr-namespace:Tango.MachineStudio.Developer.Converters"
xmlns:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
@@ -90,19 +91,19 @@
<Grid DockPanel.Dock="Bottom" Margin="0 20 0 0">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" Margin="20 0 0 0">
- <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveJobCommand}">
+ <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DeleteJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF7575" BorderBrush="#FF7575" Command="{Binding RemoveJobCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Delete" Width="20" Height="20" />
<TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock>
</StackPanel>
</Button>
- <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF995A" BorderBrush="#FF995A" Command="{Binding DuplicateJobCommand}">
+ <Button AutomationProperties.AutomationId="{x:Static automation:Developer.DuplicateJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="#FF995A" BorderBrush="#FF995A" Command="{Binding DuplicateJobCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="ContentCopy" Width="20" Height="20" />
<TextBlock Margin="5 0 0 0" FontSize="16">DUPLICATE</TextBlock>
</StackPanel>
</Button>
- <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddJobCommand}">
+ <Button AutomationProperties.AutomationId="{x:Static automation:Developer.NewJobButton}" Margin="0 0 10 0" MinWidth="160" Height="50" Background="#65C682" BorderBrush="#65C682" Command="{Binding AddJobCommand}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Plus" Width="20" Height="20" />
<TextBlock Margin="5 0 0 0" FontSize="16">NEW JOB</TextBlock>
@@ -120,7 +121,7 @@
</Grid>
<Grid Margin="0 20 0 0">
- <controls:MultiSelectDataGrid Style="{StaticResource {x:Type DataGrid}}" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeColumns="True" CanUserSortColumns="True" AutoGenerateColumns="False" Background="Transparent" ItemsSource="{Binding JobsCollectionView}" SelectedItem="{Binding SelectedMachineJob}" SelectedItemsList="{Binding SelectedJobs,Mode=TwoWay}">
+ <controls:MultiSelectDataGrid AutomationProperties.AutomationId="{x:Static automation:Developer.JobsDataGrid}" Style="{StaticResource {x:Type DataGrid}}" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeColumns="True" CanUserSortColumns="True" AutoGenerateColumns="False" Background="Transparent" ItemsSource="{Binding JobsCollectionView}" SelectedItem="{Binding SelectedMachineJob}" SelectedItemsList="{Binding SelectedJobs,Mode=TwoWay}">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="0"/>