add gs
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"language": {
|
||||
"mode": "nonstrict"
|
||||
},
|
||||
"lint": {
|
||||
"ImplicitReturn": "fatal"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(user)
|
||||
return {
|
||||
user = user
|
||||
}
|
||||
end)
|
||||
@@ -0,0 +1,8 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(users)
|
||||
return {
|
||||
users = users
|
||||
}
|
||||
end)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(userId)
|
||||
return {
|
||||
userId = userId
|
||||
}
|
||||
end)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(userId, response)
|
||||
return {
|
||||
userId = userId,
|
||||
response = response
|
||||
}
|
||||
end)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(userId)
|
||||
return {
|
||||
userId = userId
|
||||
}
|
||||
end)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(placesInfos)
|
||||
return {
|
||||
placesInfos = placesInfos,
|
||||
}
|
||||
end)
|
||||
@@ -0,0 +1,8 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(userId)
|
||||
return {
|
||||
userId = userId,
|
||||
}
|
||||
end)
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(deviceOrientation)
|
||||
return {
|
||||
deviceOrientation = deviceOrientation,
|
||||
}
|
||||
end)
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Common = CorePackages.AppTempCommon.Common
|
||||
|
||||
local Action = require(Common.Action)
|
||||
|
||||
return Action(script.Name, function(count)
|
||||
return {
|
||||
count = count,
|
||||
}
|
||||
end)
|
||||
@@ -0,0 +1,14 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
local ArgCheck = require(CorePackages.ArgCheck)
|
||||
|
||||
--[[
|
||||
Each entry in the table is a type of GameIcon with the universe id as key
|
||||
]]
|
||||
return Action(script.Name, function(iconsTable)
|
||||
ArgCheck.isType(iconsTable, "table", "iconsTable")
|
||||
|
||||
return {
|
||||
gameIcons = iconsTable
|
||||
}
|
||||
end)
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
return function()
|
||||
local SetGameIcons = require(script.Parent.SetGameIcons)
|
||||
|
||||
it("should assert if given a non-table for thumbnailsTable", function()
|
||||
SetGameIcons({})
|
||||
|
||||
expect(function()
|
||||
SetGameIcons("string")
|
||||
end).to.throw()
|
||||
|
||||
expect(function()
|
||||
SetGameIcons(0)
|
||||
end).to.throw()
|
||||
|
||||
expect(function()
|
||||
SetGameIcons(nil)
|
||||
end).to.throw()
|
||||
|
||||
expect(function()
|
||||
SetGameIcons(false)
|
||||
end).to.throw()
|
||||
|
||||
expect(function()
|
||||
SetGameIcons(function() end)
|
||||
end).to.throw()
|
||||
end)
|
||||
end
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
--[[
|
||||
Passes a table that looks like this : { "universeId" : {json}, ... }
|
||||
|
||||
{
|
||||
"26034470" : {
|
||||
universeId : "26034470",
|
||||
placeId : "70542190",
|
||||
url : https://t5.rbxcdn.com/ed422c6fbb22280971cfb289f40ac814,
|
||||
final : true
|
||||
}, {...}, ...
|
||||
}
|
||||
|
||||
]]
|
||||
|
||||
--TODO MOBLUAPP-778 Refactor improper Setter Actions.
|
||||
return Action(script.Name, function(thumbnailsTable)
|
||||
assert(type(thumbnailsTable) == "table",
|
||||
string.format("SetGameThumbnails action expects thumbnailsTable to be a table, was %s", type(thumbnailsTable)))
|
||||
|
||||
return {
|
||||
thumbnails = thumbnailsTable
|
||||
}
|
||||
end)
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Common = CorePackages.AppTempCommon.Common
|
||||
|
||||
local Action = require(Common.Action)
|
||||
|
||||
return Action(script.Name, function(userId, universeId)
|
||||
return {
|
||||
userId = userId,
|
||||
universeId = universeId,
|
||||
}
|
||||
end)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(userId, isFriend)
|
||||
return {
|
||||
userId = userId,
|
||||
isFriend = isFriend,
|
||||
}
|
||||
end)
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Common = CorePackages.AppTempCommon.Common
|
||||
|
||||
local Action = require(Common.Action)
|
||||
|
||||
return Action(script.Name, function(userId, membershipType)
|
||||
return {
|
||||
userId = userId,
|
||||
membershipType = membershipType,
|
||||
}
|
||||
end)
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(userId, presence, lastLocation)
|
||||
return {
|
||||
userId = tostring(userId),
|
||||
presence = presence,
|
||||
lastLocation = lastLocation,
|
||||
}
|
||||
end)
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Common = CorePackages.AppTempCommon.Common
|
||||
|
||||
local Action = require(Common.Action)
|
||||
|
||||
return Action(script.Name, function(userId, image, thumbnailType, thumbnailSize)
|
||||
return {
|
||||
userId = userId,
|
||||
image = image,
|
||||
thumbnailType = thumbnailType,
|
||||
thumbnailSize = thumbnailSize,
|
||||
}
|
||||
end)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local Action = require(CorePackages.AppTempCommon.Common.Action)
|
||||
|
||||
return Action(script.Name, function(key, status)
|
||||
return {
|
||||
key = key,
|
||||
status = status
|
||||
}
|
||||
end)
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
return function()
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
local UpdateFetchingStatus = require(CorePackages.AppTempCommon.LuaApp.Actions.UpdateFetchingStatus)
|
||||
|
||||
describe("Action UpdateFetchingStatus", function()
|
||||
it("should return correct action name", function()
|
||||
expect(UpdateFetchingStatus.name).to.equal("UpdateFetchingStatus")
|
||||
end)
|
||||
|
||||
it("should return correct action type name", function()
|
||||
local action = UpdateFetchingStatus()
|
||||
expect(action.type).to.equal(UpdateFetchingStatus.name)
|
||||
end)
|
||||
|
||||
it("should return a table with the correct key and status", function()
|
||||
local action = UpdateFetchingStatus("key", "status")
|
||||
expect(action.key).to.equal("key")
|
||||
expect(action.status).to.equal("status")
|
||||
end)
|
||||
end)
|
||||
end
|
||||
Reference in New Issue
Block a user