about summary refs log tree commit diff stats
path: root/sandbox
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-06-23 23:06:21 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-06-23 23:06:21 -0700
commitbb97f580fb1c769ba0cc362d1c751e69377050a8 (patch)
tree1221dc9faa32f57ca9e60546e7e10eb837609b7d /sandbox
parent54edd3d25e990cdf6ead2f0cdf685bc23de85edf (diff)
downloadmu-bb97f580fb1c769ba0cc362d1c751e69377050a8.tar.gz
3944
Reintroduce the failing test of commit 3938. It has two problems:

a) it's failing, and
b) it's not failing the same way as with a real screen.
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/005-sandbox.mu26
1 files changed, 25 insertions, 1 deletions
diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu
index cc7892d6..2b671a07 100644
--- a/sandbox/005-sandbox.mu
+++ b/sandbox/005-sandbox.mu
@@ -251,7 +251,7 @@ def! render-sandbox-side screen:&:screen, env:&:environment, render-editor:rende
   row, screen <- render-sandboxes screen, sandbox, left, right, row, render-from, 0, env
   clear-rest-of-screen screen, row, left, right
   #
-  assert-no-scroll screen, old-top-idx
+#?   assert-no-scroll screen, old-top-idx
 ]
 
 def render-sandboxes screen:&:screen, sandbox:&:sandbox, left:num, right:num, row:num, render-from:num, idx:num -> row:num, screen:&:screen, sandbox:&:sandbox [
@@ -326,6 +326,30 @@ def render-sandbox-menu screen:&:screen, sandbox-index:num, left:num, right:num
   clear-line-until screen, right, 52/background-red
 ]
 
+scenario skip-rendering-sandbox-menu-past-bottom-row [
+  trace-until 100/app  # trace too long
+  assume-screen 50/width, 6/height
+  # recipes.mu is empty
+  assume-resources [
+    [lesson/0] <- [|add 2, 2|]
+    [lesson/1] <- [|add 1, 1|]
+  ]
+  # create two sandboxes such that the top one just barely fills the screen
+  env:&:environment <- new-programming-environment resources, screen, []
+  env <- restore-sandboxes env, resources
+  run [
+    render-all screen, env, render
+  ]
+  screen-should-contain [
+    .                               run (F4)           .
+    .                                                  .
+    .──────────────────────────────────────────────────.
+    .0   edit           copy           delete          .
+    .add 2, 2                                          .
+    .──────────────────────────────────────────────────.
+  ]
+]
+
 # divide up the menu bar for a sandbox into 3 segments, for edit/copy/delete buttons
 # delete-button-right == right
 # all left/right pairs are inclusive