local S=require(((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")):WaitForChild("\078\101\120\117\115\066\117\116\116\111\110")):WaitForChild("\084\104\101\109\101\100\070\114\097\109\101"))return function()describe("\065 \084\104\101\109\101\100\070\114\097\109\101",function()local K=nil beforeEach(function()K=S.new()end)afterEach(function()K:Destroy()end)it("\115\104\111\117\108\100 \105\110\105\116\105\097\108\105\122\101 \119\105\116\104 \100\101\102\097\117\108\116\115\046",function()(expect(K.BackgroundColor3)).to.equal(Color3.fromRGB(255,255,255));(expect(K.BackgroundTransparency)).to.equal(0);(expect(K.ScaleType)).to.equal(Enum.ScaleType.Slice);(expect(K.Size)).to.equal(UDim2.new(0,100,0,100))local S=K:GetWrappedInstance();(expect(S.BackgroundTransparency)).to.equal(1);(expect(S.ImageTransparency)).to.equal(0);(expect(S.ImageColor3)).to.equal(Color3.fromRGB(255,255,255));(expect(S.Image)).to.equal("\114\098\120\097\115\115\101\116\105\100\058\047\047\057\055\048\056\056\049\056\056\048\050");(expect(S.SliceCenter)).to.equal(Rect.new(500,500,524,524))end)it("\115\104\111\117\108\100 \099\104\097\110\103\101 \116\104\101 \098\097\099\107\103\114\111\117\110\100 \099\111\108\111\114\046",function()K.BackgroundColor3=Color3.fromRGB(0,0,0)local S=K:GetWrappedInstance();(expect(S.ImageColor3)).to.equal(Color3.fromRGB(0,0,0))end)it("\115\104\111\117\108\100 \099\104\097\110\103\101 \116\104\101 \098\097\099\107\103\114\111\117\110\100 \116\114\097\110\115\112\097\114\101\110\099\121\046",function()K.BackgroundTransparency=.5 local S=K:GetWrappedInstance();(expect(S.BackgroundTransparency)).to.equal(1);(expect(S.ImageTransparency)).to.equal(.5)end)it("\115\104\111\117\108\100 \099\104\097\110\103\101 \116\104\101\109\101\115\046",function()K.Theme="\082\111\117\110\100\101\100\067\111\114\110\101\114\115"task.wait()local S=K:GetWrappedInstance();(expect(S.Image)).to.equal("\114\098\120\097\115\115\101\116\105\100\058\047\047\057\055\048\052\055\050\053\054\048\049");(expect(S.SliceCenter)).to.equal(Rect.new(500,500,524,524))end)it("\115\104\111\117\108\100 \099\104\097\110\103\101 \115\117\098\116\104\101\109\101\115\046",function()K.SubTheme="\071\097\109\101\112\097\100\073\099\111\110\066\097\099\107\103\114\111\117\110\100"task.wait()local S=K:GetWrappedInstance();(expect(S.Image)).to.equal("\114\098\120\097\115\115\101\116\105\100\058\047\047\057\055\048\056\056\050\052\051\055\050");(expect(S.SliceCenter)).to.equal(Rect.new(500,500,524,524))end)end)end
--Tests ThemedFrame.
--!strict

local ThemedFrame = require(game:GetService("ReplicatedStorage"):WaitForChild("NexusButton"):WaitForChild("ThemedFrame"))

return function()
    describe("A ThemedFrame", function()
        local TestThemedFrame = nil
        beforeEach(function()
            TestThemedFrame = ThemedFrame.new()
        end)
        afterEach(function()
            TestThemedFrame:Destroy()
        end)

        it("should initialize with defaults.", function()
            expect(TestThemedFrame.BackgroundColor3).to.equal(Color3.fromRGB(255, 255, 255))
            expect(TestThemedFrame.BackgroundTransparency).to.equal(0)
            expect(TestThemedFrame.ScaleType).to.equal(Enum.ScaleType.Slice)
            expect(TestThemedFrame.Size).to.equal(UDim2.new(0, 100, 0, 100))

            local WrappedInstance = TestThemedFrame:GetWrappedInstance()
            expect(WrappedInstance.BackgroundTransparency).to.equal(1)
            expect(WrappedInstance.ImageTransparency).to.equal(0)
            expect(WrappedInstance.ImageColor3).to.equal(Color3.fromRGB(255, 255, 255))
            expect(WrappedInstance.Image).to.equal("rbxassetid://9708818802")
            expect(WrappedInstance.SliceCenter).to.equal(Rect.new(500, 500, 524, 524))
        end)

        it("should change the background color.", function()
            TestThemedFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)

            local WrappedInstance = TestThemedFrame:GetWrappedInstance()
            expect(WrappedInstance.ImageColor3).to.equal(Color3.fromRGB(0, 0, 0))
        end)

        it("should change the background transparency.", function()
            TestThemedFrame.BackgroundTransparency = 0.5

            local WrappedInstance = TestThemedFrame:GetWrappedInstance()
            expect(WrappedInstance.BackgroundTransparency).to.equal(1)
            expect(WrappedInstance.ImageTransparency).to.equal(0.5)
        end)

        it("should change themes.", function()
            TestThemedFrame.Theme = "RoundedCorners"
            task.wait()

            local WrappedInstance = TestThemedFrame:GetWrappedInstance()
            expect(WrappedInstance.Image).to.equal("rbxassetid://9704725601")
            expect(WrappedInstance.SliceCenter).to.equal(Rect.new(500, 500, 524, 524))
        end)

        it("should change subthemes.", function()
            TestThemedFrame.SubTheme = "GamepadIconBackground"
            task.wait()
            
            local WrappedInstance = TestThemedFrame:GetWrappedInstance()
            expect(WrappedInstance.Image).to.equal("rbxassetid://9708824372")
            expect(WrappedInstance.SliceCenter).to.equal(Rect.new(500, 500, 524, 524))
        end)
    end)
end