Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Fix issue #66 and #62 #67

Merged
merged 4 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Build/BuildVersion.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
1.0.0
1.0.1
1.0.2
1.0.3
1.0.3
1.0.4
4 changes: 2 additions & 2 deletions Module/Functions/Private/Save-MVPActivity.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ function Save-MVPActivity {
Test-SEDriver

# Validate that HTML Form Strucuture Prior to Submission

$missingRequiredEntries = $Script:MVPHTMLFormStructure.Where{$_.isSet -contains $false}
# Ensure that all required items are set.
$missingRequiredEntries = $Script:MVPHTMLFormStructure.Where{($_.isSet -eq $false) -and ($_.isRequired -eq $true)}
if ($missingRequiredEntries) {
Throw ($LocalizedData.ErrorMissingRequiredEntries -f (-join $missingRequiredEntries.Name))
# Fail the Submission and Tidy Up
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ As newer browsers are released, older versions of the WebDrivers need to be upda

To update the Web Driver, head over to the following links:

> Note: Please download the x64 bit build of the driver. The x86 version will not work.

- [Microsoft Edge](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/)
- [Mozilla Firefox](https://github.com/mozilla/geckodriver/releases)
- [Google Chrome](https://sites.google.com/a/chromium.org/chromedriver/downloads)
Expand Down
4 changes: 3 additions & 1 deletion Tests/Private/Save-MVPActivity.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Describe "Save-MVPActivity" -Tag Unit {
$Script:MVPHTMLFormStructure = @(
[PSCustomObject]@{
isSet = $true
isRequired = $true
}
)

Expand Down Expand Up @@ -63,13 +64,14 @@ Describe "Save-MVPActivity" -Tag Unit {

}

it "Alternative Execution with non-set HTML values - will Throw an Error " {
it "Alternative Execution with required non-set HTML values - will Throw an Error " {

Mock -CommandName Test-SEDriver -MockWith {}

$Script:MVPHTMLFormStructure = @(
[PSCustomObject]@{
isSet = $false
isRequired = $true
}
)

Expand Down