Commit 34c77da7 authored by Bas Lijnse's avatar Bas Lijnse

Updated tests

parent 1b66842d
Pipeline #28174 passed with stage
in 5 minutes and 11 seconds
...@@ -9,9 +9,8 @@ import iTasks.UI.JavaScript ...@@ -9,9 +9,8 @@ import iTasks.UI.JavaScript
Start w = doTasks task w Start w = doTasks task w
where where
task = updateInformation task = updateInformation
(Title "WebAssembly test program")
[UpdateUsing id (flip const) editor] [UpdateUsing id (flip const) editor]
() () <<@ Title "WebAssembly test program"
editor :: Editor () editor :: Editor ()
editor = leafEditorToEditor editor = leafEditorToEditor
......
...@@ -418,9 +418,9 @@ extractDownstreamChangeTest_TopLevelReplaceWithChangedAttribute = ...@@ -418,9 +418,9 @@ extractDownstreamChangeTest_TopLevelReplaceWithChangedAttribute =
extractDownstreamChangeTest_TopLevelReplaceWithOverwrittenType = extractDownstreamChangeTest_TopLevelReplaceWithOverwrittenType =
assertEqual "Top-level replace with an overwritten type" assertEqual "Top-level replace with an overwritten type"
(ReplaceUI (UI UIContainer (classAttr ["parallel"]) []) (ReplaceUI (UI UIDebug 'DM'.newMap [])
,(luiNode UIEmpty 'DM'.newMap ,(luiNode UIEmpty 'DM'.newMap
[] noChanges {noEffects & overwrittenType = ESApplied (LUINo [2],UIContainer)} [] noChanges {noEffects & overwrittenType = ESApplied (LUINo [2],UIDebug)}
,initLUIMoves) ,initLUIMoves)
) )
(extractDownstreamChange ( (extractDownstreamChange (
...@@ -428,7 +428,7 @@ extractDownstreamChangeTest_TopLevelReplaceWithOverwrittenType = ...@@ -428,7 +428,7 @@ extractDownstreamChangeTest_TopLevelReplaceWithOverwrittenType =
[luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects [luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects
,luiNode UIContainer (classAttr ["step"]) [] noChanges noEffects ,luiNode UIContainer (classAttr ["step"]) [] noChanges noEffects
] {noChanges & toBeReplaced = Just (luiNode UIEmpty 'DM'.newMap [] ] {noChanges & toBeReplaced = Just (luiNode UIEmpty 'DM'.newMap []
noChanges {noEffects & overwrittenType = ESToBeApplied (LUINo [2],UIContainer)}) noChanges {noEffects & overwrittenType = ESToBeApplied (LUINo [2],UIDebug)})
} noEffects } noEffects
,initLUIMoves)) ,initLUIMoves))
...@@ -487,18 +487,18 @@ extractDownstreamChangeTest_TopLevelReplaceWithInsertedChild = ...@@ -487,18 +487,18 @@ extractDownstreamChangeTest_TopLevelReplaceWithInsertedChild =
extractDownstreamChangeTest_TopLevelOverwrittenType = extractDownstreamChangeTest_TopLevelOverwrittenType =
assertEqual "Top-level overwritten type" assertEqual "Top-level overwritten type"
(ReplaceUI (UI UIContainer 'DM'.newMap (ReplaceUI (UI UIDebug (classAttr ["step"])
[UI UIContainer (classAttr ["interact"]) [] [UI UIContainer (classAttr ["interact"]) []
]) ])
,(luiNode UIContainer (classAttr ["step"]) ,(luiNode UIContainer (classAttr ["step"])
[luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects [luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects
] noChanges {noEffects & overwrittenType = ESApplied (LUINo [3],UIContainer)} ] noChanges {noEffects & overwrittenType = ESApplied (LUINo [3],UIDebug)}
,initLUIMoves) ,initLUIMoves)
) )
(extractDownstreamChange ( (extractDownstreamChange (
luiNode UIContainer (classAttr ["step"]) luiNode UIContainer (classAttr ["step"])
[luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects [luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects
] noChanges {noEffects & overwrittenType = ESToBeApplied (LUINo [3],UIContainer)} ] noChanges {noEffects & overwrittenType = ESToBeApplied (LUINo [3],UIDebug)}
,initLUIMoves)) ,initLUIMoves))
extractDownstreamChangeTest_RemovedChild = extractDownstreamChangeTest_RemovedChild =
...@@ -718,7 +718,7 @@ extractDownstreamChangeTest_UpdatedMovedChild = ...@@ -718,7 +718,7 @@ extractDownstreamChangeTest_UpdatedMovedChild =
,luiNode UIContainer (classAttr ["step"]) [] noChanges noEffects ,luiNode UIContainer (classAttr ["step"]) [] noChanges noEffects
,LUIMoveSource 1 ,LUIMoveSource 1
] noChanges noEffects ] noChanges noEffects
,'DM'.fromList [(1,(ESApplied (LUINo [0]),luiNode UIContainer (classAttr ["container"]) [] noChanges noEffects))]) ,'DM'.fromList [(1,(ESApplied (LUINo [0]),luiNode UIContainer (classAttr ["parallel"]) [] noChanges noEffects))])
) )
(extractDownstreamChange ( (extractDownstreamChange (
luiNode UIPanel ('DM'.fromList [("title",JSONString "Parent panel")]) luiNode UIPanel ('DM'.fromList [("title",JSONString "Parent panel")])
...@@ -1186,9 +1186,9 @@ extractUIWithEffects_Tests = ...@@ -1186,9 +1186,9 @@ extractUIWithEffects_Tests =
updateChildNodes_Tests = updateChildNodes_Tests =
[ assertEqual "Updating selected child nodes" [ assertEqual "Updating selected child nodes"
( (
[luiNode UIDebug 'DM'.newMap [] noChanges noEffects [luiNode UIDebug (classAttr ["interact"]) [] noChanges noEffects
,luiNode UIContainer (classAttr ["step"]) [] noChanges {noEffects & additional = ESApplied (LUINo [5])} ,luiNode UIContainer (classAttr ["step"]) [] noChanges {noEffects & additional = ESApplied (LUINo [5])}
,luiNode UIDebug 'DM'.newMap [] {noChanges & toBeShifted = Just 0} noEffects ,luiNode UIDebug (classAttr ["parallel"]) [] {noChanges & toBeShifted = Just 0} noEffects
,LUIShiftDestination 1 ,LUIShiftDestination 1
,luiNode UIDebug 'DM'.newMap [luiNode UIContainer (classAttr ["record"]) [] noChanges noEffects] noChanges {noEffects & wrapper = ESApplied (LUINo [7])} ,luiNode UIDebug 'DM'.newMap [luiNode UIContainer (classAttr ["record"]) [] noChanges noEffects] noChanges {noEffects & wrapper = ESApplied (LUINo [7])}
,luiNode UIDebug 'DM'.newMap [] {noChanges & toBeShifted = Just 1} noEffects ,luiNode UIDebug 'DM'.newMap [] {noChanges & toBeShifted = Just 1} noEffects
...@@ -1229,20 +1229,20 @@ updateSubNode_Tests = ...@@ -1229,20 +1229,20 @@ updateSubNode_Tests =
,luiNode UIContainer (classAttr ["parallel"]) [] {noChanges & toBeShifted = Just 0} noEffects ,luiNode UIContainer (classAttr ["parallel"]) [] {noChanges & toBeShifted = Just 0} noEffects
,LUIShiftDestination 1 ,LUIShiftDestination 1
,luiNode UIContainer (classAttr ["record"]) [] noChanges noEffects ,luiNode UIContainer (classAttr ["record"]) [] noChanges noEffects
,luiNode UIContainer (classAttr ["interact"]) [] {noChanges & toBeShifted = Just 1} noEffects ,luiNode UIDebug (classAttr ["interact"]) [] {noChanges & toBeShifted = Just 1} noEffects
,LUIShiftDestination 0 ,LUIShiftDestination 0
] noChanges noEffects ] noChanges noEffects
,initLUIMoves) ,initLUIMoves)
(updateSubNode_ (LUINo [0]) [2] (updateSubNode_ (LUINo [0]) [2]
(\(LUINode node, m) -> (LUINode {LUINode|node & type = UIContainer} ,m)) (\(LUINode node, m) -> (LUINode {LUINode|node & type = UIDebug} ,m))
(luiNode UIPanel ('DM'.fromList [("title",JSONString "Parent panel")]) (luiNode UIPanel ('DM'.fromList [("title",JSONString "Parent panel")])
[luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects [luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects
,luiNode UIContainer (classAttr ["step"]) [] noChanges noEffects ,luiNode UIContainer (classAttr ["step"]) [] noChanges noEffects
,luiNode UIContainer (classAttr ["parallel"]) [] {noChanges & toBeShifted = Just 0} noEffects ,luiNode UIContainer (classAttr ["parallel"]) [] {noChanges & toBeShifted = Just 0} noEffects
,LUIShiftDestination 1 ,LUIShiftDestination 1
,luiNode UIContainer (classAttr ["record"]) [] noChanges noEffects ,luiNode UIContainer (classAttr ["record"]) [] noChanges noEffects
,luiNode UIDebug 'DM'.newMap [] {noChanges & toBeShifted = Just 1} noEffects ,luiNode UIContainer (classAttr ["interact"]) [] {noChanges & toBeShifted = Just 1} noEffects
,LUIShiftDestination 0 ,LUIShiftDestination 0
] noChanges noEffects ] noChanges noEffects
,initLUIMoves)) ,initLUIMoves))
...@@ -1455,8 +1455,8 @@ moveSubUIsTests = ...@@ -1455,8 +1455,8 @@ moveSubUIsTests =
) )
] ]
wrapUITests = wrapUITests =
[assertEqual "Wrap rule: wrap root as step" [assertEqual "Wrap rule: wrap root as debug"
(luiNode UIContainer (classAttr ["step"]) [ (luiNode UIDebug 'DM'.newMap [
luiNode UIPanel ('DM'.fromList [("title",JSONString "A")]) luiNode UIPanel ('DM'.fromList [("title",JSONString "A")])
[luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects [luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects
,luiNode UIContainer (classAttr ["parallel"]) [] noChanges noEffects ,luiNode UIContainer (classAttr ["parallel"]) [] noChanges noEffects
...@@ -1464,7 +1464,7 @@ wrapUITests = ...@@ -1464,7 +1464,7 @@ wrapUITests =
] noChanges noEffects ] noChanges noEffects
] noChanges {noEffects & wrapper = ESToBeApplied (LUINo [0])} ] noChanges {noEffects & wrapper = ESToBeApplied (LUINo [0])}
,initLUIMoves) ,initLUIMoves)
(wrapUI UIContainer (LUINo [0]) (wrapUI UIDebug (LUINo [0])
(luiNode UIPanel ('DM'.fromList [("title",JSONString "A")]) (luiNode UIPanel ('DM'.fromList [("title",JSONString "A")])
[luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects [luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects
,luiNode UIContainer (classAttr ["parallel"]) [] noChanges noEffects ,luiNode UIContainer (classAttr ["parallel"]) [] noChanges noEffects
...@@ -1472,8 +1472,8 @@ wrapUITests = ...@@ -1472,8 +1472,8 @@ wrapUITests =
] noChanges noEffects ] noChanges noEffects
,initLUIMoves) ,initLUIMoves)
) )
,assertEqual "Wrap rule: wrap root twice. First as step, then as parallel" ,assertEqual "Wrap rule: wrap root twice. First as container, then as debug"
(luiNode UIContainer (classAttr ["parallel"]) [luiNode UIContainer (classAttr ["step"]) [ (luiNode UIDebug 'DM'.newMap [luiNode UIContainer 'DM'.newMap [
luiNode UIPanel ('DM'.fromList [("title",JSONString "A")]) luiNode UIPanel ('DM'.fromList [("title",JSONString "A")])
[luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects [luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects
,luiNode UIContainer (classAttr ["parallel"]) [] noChanges noEffects ,luiNode UIContainer (classAttr ["parallel"]) [] noChanges noEffects
...@@ -1482,7 +1482,7 @@ wrapUITests = ...@@ -1482,7 +1482,7 @@ wrapUITests =
] noChanges {noEffects & wrapper = ESToBeApplied (LUINo [0,0])} ] noChanges {noEffects & wrapper = ESToBeApplied (LUINo [0,0])}
] noChanges {noEffects & wrapper = ESToBeApplied (LUINo [0,1])} ] noChanges {noEffects & wrapper = ESToBeApplied (LUINo [0,1])}
,initLUIMoves) ,initLUIMoves)
(sequenceLayouts [wrapUI UIContainer, wrapUI UIContainer] (LUINo [0]) (sequenceLayouts [wrapUI UIContainer, wrapUI UIDebug] (LUINo [0])
(luiNode UIPanel ('DM'.fromList [("title",JSONString "A")]) (luiNode UIPanel ('DM'.fromList [("title",JSONString "A")])
[luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects [luiNode UIContainer (classAttr ["interact"]) [] noChanges noEffects
,luiNode UIContainer (classAttr ["parallel"]) [] noChanges noEffects ,luiNode UIContainer (classAttr ["parallel"]) [] noChanges noEffects
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment