mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Tests statuses improve
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 " {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user