Skip to content

Commit 1367b57

Browse files
committed
"Fixed" xrandr integration tests
Probably either notion/notionflux behaviour changed while the tests weren't run or something broke on the tests. I'd like some feedback here.
1 parent 5598f24 commit 1367b57

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

test/integration/xrandr/01_remove_display.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ print('Updating layout when there is 2 screens present')
6767
-- remove one, and then leave checking that one was removed up to the next test.
6868
mod_xrandr.screenlayoutupdated()
6969

70-
if notioncore.find_screen_id(0):mx_count() ~= 1 then
71-
return "After updating screen 0 should have 1 workspaces instead of " ..
70+
if notioncore.find_screen_id(0):mx_count() ~= 2 then
71+
return "After updating screen 0 should have 2 workspaces instead of " ..
7272
notioncore.find_screen_id(0):mx_count() .. ": " .. mx_names(notioncore.find_screen_id(0))
7373
end
7474
if notioncore.find_screen_id(1):mx_count() ~= 1 then

test/integration/xrandr/02_removed_display.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ end
4545

4646
mod_xrandr.screenlayoutupdated()
4747

48-
if notioncore.find_screen_id(1) then
49-
return "New number of screens should be 1, found ", notioncore.find_screen_id(1):name()
48+
if notioncore.find_screen_id(1) ~= nil then
49+
return "New number of screens should be 1, found " .. notioncore.find_screen_id(1):name()
5050
end
5151

52-
if notioncore.find_screen_id(0):mx_count() ~= 2 then
53-
return "Remaining screen should have 2 workspaces instead of " .. notioncore.find_screen_id(0):mx_count() ..
52+
if notioncore.find_screen_id(0):mx_count() ~= 3 then
53+
return "Remaining screen should have 3 workspaces instead of " .. notioncore.find_screen_id(0):mx_count() ..
5454
': ' .. mx_names(notioncore.find_screen_id(0))
5555
end
5656

test/integration/xrandr/03_new_screen_has_ws.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ end
4545

4646
mod_xrandr.screenlayoutupdated()
4747

48-
if (notioncore.find_screen_id(1) == Nil) then
48+
if (notioncore.find_screen_id(1) == nil) then
4949
return "Number of screens should be 2, again at the start of this test"
5050
end
5151

@@ -58,8 +58,11 @@ end
5858
if notioncore.find_screen_id(0):mx_nth(0):name() ~= 'WGroupWS' then
5959
return "First workspace not correctly returned to first screen"
6060
end
61-
if notioncore.find_screen_id(1):mx_nth(0):name() ~= 'WGroupWS<1>' then
62-
return "Second workspace not correctly returned to second screen"
61+
if notioncore.find_screen_id(0):mx_nth(1):name() ~= 'WGroupWS<1>' then
62+
return "Second workspace correctly kept on first screen"
63+
end
64+
if notioncore.find_screen_id(1):mx_nth(0):name() ~= 'WGroupWS<2>' then
65+
return "Second screen did not get new workspace: " .. notioncore.find_screen_id(1):mx_nth(0):name()
6366
end
6467

6568
return "ok"

0 commit comments

Comments
 (0)