tests: don't run window minimize/maximize tests on Linux CI

xvfb doesn't support those operations.
This commit is contained in:
Sasha Szpakowski
2024-10-16 22:24:27 -03:00
parent 31ce65b9d2
commit 1ecc8a1fd9
+28
View File
@@ -63,6 +63,10 @@ end
-- love.window.getFullscreen
love.test.window.getFullscreen = function(test)
if GITHUB_RUNNER and test:isOS('Linux') then
return test:skipTest("xvfb on Linux doesn't support fullscreen")
end
-- check not fullscreen to start
test:assertFalse(love.window.getFullscreen(), 'check not fullscreen')
love.window.setFullscreen(true)
@@ -164,6 +168,10 @@ end
-- love.window.isMaximized
love.test.window.isMaximized = function(test)
if GITHUB_RUNNER and test:isOS('Linux') then
return test:skipTest("xvfb on Linux doesn't support window maximization")
end
test:assertFalse(love.window.isMaximized(), 'check window not maximized')
love.window.maximize()
test:waitFrames(10)
@@ -175,6 +183,10 @@ end
-- love.window.isMinimized
love.test.window.isMinimized = function(test)
if GITHUB_RUNNER and test:isOS('Linux') then
return test:skipTest("xvfb on Linux doesn't support window minimization")
end
-- check not minimized to start
test:assertFalse(love.window.isMinimized(), 'check window not minimized')
-- try to minimize
@@ -204,6 +216,10 @@ end
-- love.window.maximize
love.test.window.maximize = function(test)
if GITHUB_RUNNER and test:isOS('Linux') then
return test:skipTest("xvfb on Linux doesn't support window maximization")
end
test:assertFalse(love.window.isMaximized(), 'check window not maximized')
-- check maximizing is set
love.window.maximize()
@@ -216,6 +232,10 @@ end
-- love.window.minimize
love.test.window.minimize = function(test)
if GITHUB_RUNNER and test:isOS('Linux') then
return test:skipTest("xvfb on Linux doesn't support window minimization")
end
test:assertFalse(love.window.isMinimized(), 'check window not minimized')
-- check minimizing is set
love.window.minimize()
@@ -234,6 +254,10 @@ end
-- love.window.restore
love.test.window.restore = function(test)
if GITHUB_RUNNER and test:isOS('Linux') then
return test:skipTest("xvfb on Linux doesn't support window minimization")
end
-- check minimized to start
love.window.minimize()
test:waitFrames(10)
@@ -257,6 +281,10 @@ end
-- love.window.setFullscreen
love.test.window.setFullscreen = function(test)
if GITHUB_RUNNER and test:isOS('Linux') then
return test:skipTest("xvfb on Linux doesn't support fullscreen")
end
-- check fullscreen is set
love.window.setFullscreen(true)
test:assertTrue(love.window.getFullscreen(), 'check fullscreen')