Tests statuses improve

This commit is contained in:
ili101
2019-08-29 01:53:07 +03:00
parent 15eb2130b5
commit 591b854e2b
6 changed files with 17 additions and 7 deletions

View File

@@ -1,10 +1,14 @@
#Requires -Modules Pester
#Import-Module $PSScriptRoot\..\ImportExcel.psd1 -Force
if ($PSVersionTable.PSVersion.Major -gt 5) { Write-Warning "Can't test grid view on V6 and later" }
else {Add-Type -AssemblyName System.Windows.Forms }
Describe "Compare Worksheet" {
BeforeAll {
if ($PSVersionTable.PSVersion.Major -gt 5) {
It "GridView Support" {
Set-ItResult -Pending -Because "Can't test grid view on V6 and later"
}
}
else { Add-Type -AssemblyName System.Windows.Forms }
. "$PSScriptRoot\Samples\Samples.ps1"
Remove-Item -Path "TestDrive:\server*.xlsx"
[System.Collections.ArrayList]$s = get-service | Select-Object -first 25 -Property Name, RequiredServices, CanPauseAndContinue, CanShutdown, CanStop, DisplayName, DependentServices, MachineName

View File

@@ -475,8 +475,9 @@ Describe ExportExcel {
$excel.Workbook.Worksheets["Processes"].Dimension.rows | Should be 21 #20 data + 1 header
}
it "Selected the Pivottable page " {
Set-ItResult -Pending -Because "Bug in EPPLus 4.5"
$PTws.View.TabSelected | Should be $true
} -Skip # << Bug in EPPLus 4.5
}
$pt = $PTws.PivotTables[0]
it "Built the expected Pivot table " {
$pt.RowFields.Count | Should be 1

View File

@@ -51,8 +51,9 @@ Apple, New York, 1200,700
$ws2.PivotTables[0].ColumGrandTotals | Should be $true #Epplus's mis-spelling of column not mine
}
it "Made the PivotTable page active " {
Set-ItResult -Pending -Because "Bug in EPPLus 4.5"
$ws2.View.TabSelected | Should be $true
} -Skip # << Bug in EPPLus 4.5
}
it "Created the Pivot Chart " {
$ws2.Drawings[0] | Should not beNullOrEmpty
$ws2.Drawings[0].ChartType.ToString() | Should be ColumnClustered

View File

@@ -92,11 +92,12 @@ Describe "Creating small named ranges with hyperlinks" {
$sheet.ConditionalFormatting[1].StopIfTrue | Should be $true
}
It "Applied ConditionalFormatting, including Reverse " {
Set-ItResult -Pending -Because "Bug in EPPLus 4.5"
$sheet.ConditionalFormatting[3].LowValue.Color.R | Should begreaterThan 180
$sheet.ConditionalFormatting[3].LowValue.Color.G | Should beLessThan 128
$sheet.ConditionalFormatting[3].HighValue.Color.R | Should beLessThan 128
$sheet.ConditionalFormatting[3].HighValue.Color.G | Should begreaterThan 180
} -Skip # << Bug in EPPLus 4.5
}
}
Context "Adding a table" {
it "Created a table " {

View File

@@ -51,9 +51,10 @@ Describe "Join Worksheet part 1" {
$excel.Workbook.Worksheets["SummaryPivot"].Hidden | Should be 'Visible'
}
it "Activated the correct worksheet " {
Set-ItResult -Pending -Because "Bug in EPPLus 4.5"
$excel.Workbook.worksheets["SummaryPivot"].View.TabSelected | Should be $true
$excel.Workbook.worksheets["Total"].View.TabSelected | Should be $false
} -Skip # << Bug in EPPLus 4.5
}
}
Context "Merging 3 blocks" {

View File

@@ -2,7 +2,9 @@
Describe "Password Support" {
if ($PSVersionTable.PSVersion.Major -GT 5) {
Write-Warning "Can't test passwords on V6 and later"
It "Password Supported" {
Set-ItResult -Pending -Because "Can't test passwords on V6 and later"
}
return
}
Context "Password protected sheet" {