Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--!strict

local StarterPlayer = game:GetService("StarterPlayer");

local root = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent;
local AutoTriggerCheckbox = require(script.Parent);
local VirtualService = require(root.VirtualService);
Expand All @@ -15,6 +17,8 @@ local it = IJW.it;
local screenGui: ScreenGui?;
local reactRoot: ReactRoblox.RootType?;
local propagatedErrorMessage;
local originalLoaderScript;
local childAddedConnection: RBXScriptConnection?;

return {

Expand Down Expand Up @@ -156,10 +160,37 @@ return {
end).toFinishBeforeSeconds(1);

end);

it("can automatically create loader script from template", function()

expect(function()

verifyCheckboxFeature(true);

local createdLoaderScript = StarterPlayer.StarterPlayerScripts:FindFirstChild("DialogueLoader");

expect(createdLoaderScript).toNotBe(nil);

createdLoaderScript:Destroy();

end).toFinishBeforeSeconds(1);

end);

}

end, {
beforeAll = function()

local loaderScript = StarterPlayer.StarterPlayerScripts:FindFirstChild("DialogueMakerLoader");
if loaderScript then

originalLoaderScript = loaderScript;
loaderScript.Parent = nil;

end;

end,
beforeEach = function()

local newScreenGui = Instance.new("ScreenGui");
Expand All @@ -184,5 +215,21 @@ return {
propagatedErrorMessage = nil;

end;
afterAll = function()

if originalLoaderScript then

originalLoaderScript.Parent = StarterPlayer.StarterPlayerScripts;

end;

if childAddedConnection then

childAddedConnection:Disconnect();
childAddedConnection = nil;

end;

end;
})
};