Skip to content

Commit f78876e

Browse files
author
RoFlection Bot
committed
APT-696 - address some mistranslations and fix CI (#101)
* restore test * temporarily point to latest jest with new promise dep * Use robloxdev-cli * Use new promise features and correct closure structure to fix bug in wait-for * update wait-for logic to match upstream properly * unskip fixed test * didn't need latest promise after all * Align more closely, remove unhelpful promise wrappers * Fix lint and align accompanying test * upgrade jest to get proper regex matching * adjust test to match implemented behavior * revert + adjust some wait-for changes to accommodate the roblox scheduler and accommodate jest deviations * Address a couple extra lints * remove extraneous deviation comment * bump patch version for integrating fixes
1 parent d6029ec commit f78876e

File tree

6 files changed

+427
-494
lines changed

6 files changed

+427
-494
lines changed

bin/ci.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ find Packages/_Index -name "*.robloxrc" | xargs rm -f
88

99
echo "Run static analysis"
1010
selene src
11-
roblox-cli analyze analyze.project.json
11+
robloxdev-cli analyze analyze.project.json
1212
stylua -c src
1313

1414
echo "Run tests"
15-
roblox-cli run --load.place tests.project.json --run bin/spec.lua --lua.globals=__DEV__=true --fastFlags.allOnLuau --fastFlags.overrides EnableLoadModule=true --fs.read=$PWD --load.asRobloxScript --headlessRenderer 1 --virtualInput 1
15+
robloxdev-cli run --load.place tests.project.json --run bin/spec.lua --lua.globals=__DEV__=true --fastFlags.allOnLuau --fastFlags.overrides EnableLoadModule=true --fs.read=$PWD --load.asRobloxScript --headlessRenderer 1 --virtualInput 1

rotriever.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
name = "DomTestingLibrary"
3-
version = "8.14.1"
3+
version = "8.14.2"
44
authors = [
55
"Ignacio Falk <flakolefluk@gmail.com>",
66
"Allan Jeremy <dev@allanjeremy.com>",
7-
"Paul Doyle <pdoyle@roblox.com>"
7+
"Paul Doyle <pdoyle@roblox.com>",
88
]
99
content_root = "src"
1010
files = ["*", "!**/__tests__/**"]
@@ -13,11 +13,11 @@ files = ["*", "!**/__tests__/**"]
1313
LuauPolyfill = "github.com/roblox/luau-polyfill@1"
1414
LuauRegExp = "github.com/Roblox/luau-regexp@0.2.0"
1515
Chalk = "github.com/roblox/chalk-lua@0.2.0"
16-
Promise = "github.com/roblox/roblox-lua-promise@~3.3.0"
17-
JestGetType = "github.com/roblox/jest-roblox@3"
18-
PrettyFormat = "github.com/roblox/jest-roblox@3"
19-
RobloxShared = "github.com/roblox/jest-roblox@3"
20-
JestGlobals = "github.com/roblox/jest-roblox@3"
16+
Promise = "github.com/roblox/roblox-lua-promise@3.3.0"
17+
JestGetType = "github.com/roblox/jest-roblox@3.6.1"
18+
PrettyFormat = "github.com/roblox/jest-roblox@3.6.1"
19+
RobloxShared = "github.com/roblox/jest-roblox@3.6.1"
20+
JestGlobals = "github.com/roblox/jest-roblox@3.6.1"
2121

2222
[dev_dependencies]
23-
Jest = "github.com/roblox/jest-roblox@3"
23+
Jest = "github.com/roblox/jest-roblox@3.6.1"

src/__tests__/suggestions.spec.lua

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -538,21 +538,14 @@ test("getSuggestedQuery returns rich data for tooling", function()
538538
a.Text = "cancel"
539539
local div = render({ a }).container:GetChildren()[1]
540540

541-
-- ROBLOX deviation START: splitted the tests. Possible bug in toMatchObject with regex
542-
local suggestedQuery = getSuggestedQuery(div) :: Suggestion
543-
expect(suggestedQuery).toMatchObject({
541+
expect(getSuggestedQuery(div)).toMatchObject({
544542
queryName = "Text",
545543
queryMethod = "getByText",
544+
queryArgs = { RegExp("cancel") },
546545
variant = "get",
547546
})
548547

549-
expect(suggestedQuery.queryArgs).toEqual({
550-
RegExp("cancel"),
551-
})
552-
-- ROBLOX deviation END
553-
554-
local suggested = getSuggestedQuery(div)
555-
expect(if suggested then suggested.toString() else suggested).toEqual("getByText(/cancel/)")
548+
expect((getSuggestedQuery(div) :: Suggestion).toString()).toEqual("getByText(/cancel/)")
556549
end)
557550
test("getSuggestedQuery can return specified methods in addition to the best", function()
558551
local label = Instance.new("TextLabel")

0 commit comments

Comments
 (0)