-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63a6a29
commit 4711417
Showing
5 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module BuildingBlockView | ||
|
||
open Fable.Mocha | ||
open Client | ||
|
||
open Shared.OfficeInteropTypes | ||
open Shared.TermTypes | ||
|
||
open BuildingBlock | ||
|
||
let tests_BuildingBlockView = testList "BuildingBlockView" [ | ||
testCase "isValidBuildingBlock" <| fun _ -> | ||
|
||
// only columns which require input, the so called term columns, can be invalid if they don't have a name. | ||
let protocolREF = BuildingBlockNamePrePrint.init(BuildingBlockType.ProtocolREF) |> isValidBuildingBlock | ||
let source = BuildingBlockNamePrePrint.init(BuildingBlockType.Source) |> isValidBuildingBlock | ||
let parameter = BuildingBlockNamePrePrint.create BuildingBlockType.Parameter "instrument model" |> isValidBuildingBlock | ||
let parameter_nonsense = BuildingBlockNamePrePrint.create BuildingBlockType.Parameter "banana balloon animal" |> isValidBuildingBlock | ||
let characteristic = BuildingBlockNamePrePrint.create BuildingBlockType.Characteristics "strain" |> isValidBuildingBlock | ||
let factor = BuildingBlockNamePrePrint.create BuildingBlockType.Characteristics "temperature" |> isValidBuildingBlock | ||
/// Featured column should always be valid | ||
let protocolType = BuildingBlockNamePrePrint.init BuildingBlockType.ProtocolType |> isValidBuildingBlock | ||
|
||
let term_empty = BuildingBlockNamePrePrint.create BuildingBlockType.Characteristics "" |> isValidBuildingBlock | ||
|
||
Expect.isTrue protocolREF "protocolREF" | ||
Expect.isTrue source "source" | ||
Expect.isTrue parameter "parameter" | ||
Expect.isTrue parameter_nonsense "parameter_nonsense" | ||
Expect.isTrue characteristic "characteristic" | ||
Expect.isTrue factor "factor" | ||
Expect.isTrue protocolType "protocolType" | ||
Expect.isFalse term_empty "term_empty" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters