Skip to content

Commit 52f2c1a

Browse files
authored
Add tests for migrations (#20)
1 parent dcdf570 commit 52f2c1a

File tree

3 files changed

+339
-0
lines changed

3 files changed

+339
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
* Roblox Studio version: 0.566.0.5660545
2+
3+
Contains a tree like the following:
4+
5+
* `ScreenGui` with `IgnoreGuiInset = true`
6+
* `ScreenGui` with `IgnoreGuiInset = false`
7+
* `TextLabel` with `Font = Enum.Font.Code (10)`
8+
* `TextLabel` with `Font = Enum.Font.SourceSansBold (4)`
9+
* `TextLabel` with `Font = Enum.Font.SourceSansItalic (6)`
10+
11+
This is used to test that the `IgnoreGuiInset -> ScreenInsets` and `Font -> FontFace` migrations work properly.
12+
13+
On read, rbx_dom should transform this into:
14+
15+
* `ScreenGui` with `ScreenInsets = CoreUISafeInsets (2)`
16+
* `ScreenGui` with `ScreenInsets = DeviceSafeInsets (1)`
17+
* `TextLabel` with `Font = { family: Inconsolata ("rbxasset://fonts/families/Inconsolata.json"), weight: Regular (400), style: Normal (0) }`
18+
* `TextLabel` with `Font = { family: Inconsolata ("rbxasset://fonts/families/SourceSansPro.json"), weight: Bold (700), style: Normal (0) }`
19+
* `TextLabel` with `Font = { family: Inconsolata ("rbxasset://fonts/families/SourceSansPro.json"), weight: Regular (400), style: Italic (1) }`
8.28 KB
Binary file not shown.
Lines changed: 320 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,320 @@
1+
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
2+
<Meta name="ExplicitAutoJoints">true</Meta>
3+
<External>null</External>
4+
<External>nil</External>
5+
<Item class="Folder" referent="RBXAC48BF685E3B459A946B847248614D26">
6+
<Properties>
7+
<BinaryString name="AttributesSerialize"></BinaryString>
8+
<string name="Name">Folder</string>
9+
<int64 name="SourceAssetId">-1</int64>
10+
<BinaryString name="Tags"></BinaryString>
11+
</Properties>
12+
<Item class="ScreenGui" referent="RBXD5975615B4E143D684F26AA40F75101E">
13+
<Properties>
14+
<BinaryString name="AttributesSerialize"></BinaryString>
15+
<bool name="AutoLocalize">true</bool>
16+
<bool name="ClipToDeviceSafeArea">true</bool>
17+
<int name="DisplayOrder">0</int>
18+
<bool name="Enabled">true</bool>
19+
<string name="Name">IgnoreGuiInset: true</string>
20+
<bool name="ResetOnSpawn">true</bool>
21+
<Ref name="RootLocalizationTable">null</Ref>
22+
<token name="SafeAreaCompatibility">1</token>
23+
<bool name="IgnoreGuiInset">true</bool>
24+
<token name="SelectionBehaviorDown">0</token>
25+
<token name="SelectionBehaviorLeft">0</token>
26+
<token name="SelectionBehaviorRight">0</token>
27+
<token name="SelectionBehaviorUp">0</token>
28+
<bool name="SelectionGroup">false</bool>
29+
<int64 name="SourceAssetId">-1</int64>
30+
<BinaryString name="Tags"></BinaryString>
31+
<token name="ZIndexBehavior">1</token>
32+
</Properties>
33+
</Item>
34+
<Item class="ScreenGui" referent="RBXC0796FAF42244494AE6066C1927CB2D2">
35+
<Properties>
36+
<BinaryString name="AttributesSerialize"></BinaryString>
37+
<bool name="AutoLocalize">true</bool>
38+
<bool name="ClipToDeviceSafeArea">true</bool>
39+
<int name="DisplayOrder">0</int>
40+
<bool name="Enabled">true</bool>
41+
<string name="Name">IgnoreGuiInset: false</string>
42+
<bool name="ResetOnSpawn">true</bool>
43+
<Ref name="RootLocalizationTable">null</Ref>
44+
<token name="SafeAreaCompatibility">1</token>
45+
<bool name="IgnoreGuiInset">false</bool>
46+
<token name="SelectionBehaviorDown">0</token>
47+
<token name="SelectionBehaviorLeft">0</token>
48+
<token name="SelectionBehaviorRight">0</token>
49+
<token name="SelectionBehaviorUp">0</token>
50+
<bool name="SelectionGroup">false</bool>
51+
<int64 name="SourceAssetId">-1</int64>
52+
<BinaryString name="Tags"></BinaryString>
53+
<token name="ZIndexBehavior">1</token>
54+
</Properties>
55+
<Item class="TextLabel" referent="RBXFD4F1E4AE3D243FA8083659E031A4306">
56+
<Properties>
57+
<bool name="Active">false</bool>
58+
<Vector2 name="AnchorPoint">
59+
<X>0</X>
60+
<Y>0</Y>
61+
</Vector2>
62+
<BinaryString name="AttributesSerialize"></BinaryString>
63+
<bool name="AutoLocalize">true</bool>
64+
<token name="AutomaticSize">0</token>
65+
<Color3 name="BackgroundColor3">
66+
<R>1</R>
67+
<G>1</G>
68+
<B>1</B>
69+
</Color3>
70+
<float name="BackgroundTransparency">0</float>
71+
<Color3 name="BorderColor3">
72+
<R>0.105882362</R>
73+
<G>0.164705887</G>
74+
<B>0.207843155</B>
75+
</Color3>
76+
<token name="BorderMode">0</token>
77+
<int name="BorderSizePixel">1</int>
78+
<bool name="ClipsDescendants">false</bool>
79+
<bool name="Draggable">false</bool>
80+
<token name="Font">10</token>
81+
<int name="LayoutOrder">0</int>
82+
<float name="LineHeight">1</float>
83+
<int name="MaxVisibleGraphemes">-1</int>
84+
<string name="Name">TextLabel</string>
85+
<Ref name="NextSelectionDown">null</Ref>
86+
<Ref name="NextSelectionLeft">null</Ref>
87+
<Ref name="NextSelectionRight">null</Ref>
88+
<Ref name="NextSelectionUp">null</Ref>
89+
<UDim2 name="Position">
90+
<XS>0</XS>
91+
<XO>0</XO>
92+
<YS>0</YS>
93+
<YO>0</YO>
94+
</UDim2>
95+
<bool name="RichText">false</bool>
96+
<Ref name="RootLocalizationTable">null</Ref>
97+
<float name="Rotation">0</float>
98+
<bool name="Selectable">false</bool>
99+
<token name="SelectionBehaviorDown">0</token>
100+
<token name="SelectionBehaviorLeft">0</token>
101+
<token name="SelectionBehaviorRight">0</token>
102+
<token name="SelectionBehaviorUp">0</token>
103+
<bool name="SelectionGroup">false</bool>
104+
<Ref name="SelectionImageObject">null</Ref>
105+
<int name="SelectionOrder">0</int>
106+
<UDim2 name="Size">
107+
<XS>0</XS>
108+
<XO>200</XO>
109+
<YS>0</YS>
110+
<YO>50</YO>
111+
</UDim2>
112+
<token name="SizeConstraint">0</token>
113+
<int64 name="SourceAssetId">-1</int64>
114+
<BinaryString name="Tags"></BinaryString>
115+
<string name="Text">Label</string>
116+
<Color3 name="TextColor3">
117+
<R>0</R>
118+
<G>0</G>
119+
<B>0</B>
120+
</Color3>
121+
<bool name="TextScaled">false</bool>
122+
<float name="TextSize">14</float>
123+
<Color3 name="TextStrokeColor3">
124+
<R>0</R>
125+
<G>0</G>
126+
<B>0</B>
127+
</Color3>
128+
<float name="TextStrokeTransparency">1</float>
129+
<float name="TextTransparency">0</float>
130+
<token name="TextTruncate">0</token>
131+
<bool name="TextWrapped">false</bool>
132+
<token name="TextXAlignment">2</token>
133+
<token name="TextYAlignment">1</token>
134+
<bool name="Visible">true</bool>
135+
<int name="ZIndex">1</int>
136+
</Properties>
137+
</Item>
138+
<Item class="TextButton" referent="RBXB625311A94E34FE586B3ADF3B9FEFB48">
139+
<Properties>
140+
<bool name="Active">true</bool>
141+
<Vector2 name="AnchorPoint">
142+
<X>0</X>
143+
<Y>0</Y>
144+
</Vector2>
145+
<BinaryString name="AttributesSerialize"></BinaryString>
146+
<bool name="AutoButtonColor">true</bool>
147+
<bool name="AutoLocalize">true</bool>
148+
<token name="AutomaticSize">0</token>
149+
<Color3 name="BackgroundColor3">
150+
<R>1</R>
151+
<G>1</G>
152+
<B>1</B>
153+
</Color3>
154+
<float name="BackgroundTransparency">0</float>
155+
<Color3 name="BorderColor3">
156+
<R>0.105882362</R>
157+
<G>0.164705887</G>
158+
<B>0.207843155</B>
159+
</Color3>
160+
<token name="BorderMode">0</token>
161+
<int name="BorderSizePixel">1</int>
162+
<bool name="ClipsDescendants">false</bool>
163+
<bool name="Draggable">false</bool>
164+
<token name="Font">4</token>
165+
<int name="LayoutOrder">0</int>
166+
<float name="LineHeight">1</float>
167+
<int name="MaxVisibleGraphemes">-1</int>
168+
<bool name="Modal">false</bool>
169+
<string name="Name">TextButton</string>
170+
<Ref name="NextSelectionDown">null</Ref>
171+
<Ref name="NextSelectionLeft">null</Ref>
172+
<Ref name="NextSelectionRight">null</Ref>
173+
<Ref name="NextSelectionUp">null</Ref>
174+
<UDim2 name="Position">
175+
<XS>0</XS>
176+
<XO>0</XO>
177+
<YS>0</YS>
178+
<YO>55</YO>
179+
</UDim2>
180+
<bool name="RichText">false</bool>
181+
<Ref name="RootLocalizationTable">null</Ref>
182+
<float name="Rotation">0</float>
183+
<bool name="Selectable">true</bool>
184+
<bool name="Selected">false</bool>
185+
<token name="SelectionBehaviorDown">0</token>
186+
<token name="SelectionBehaviorLeft">0</token>
187+
<token name="SelectionBehaviorRight">0</token>
188+
<token name="SelectionBehaviorUp">0</token>
189+
<bool name="SelectionGroup">false</bool>
190+
<Ref name="SelectionImageObject">null</Ref>
191+
<int name="SelectionOrder">0</int>
192+
<UDim2 name="Size">
193+
<XS>0</XS>
194+
<XO>200</XO>
195+
<YS>0</YS>
196+
<YO>50</YO>
197+
</UDim2>
198+
<token name="SizeConstraint">0</token>
199+
<int64 name="SourceAssetId">-1</int64>
200+
<token name="Style">0</token>
201+
<BinaryString name="Tags"></BinaryString>
202+
<string name="Text">Button</string>
203+
<Color3 name="TextColor3">
204+
<R>0</R>
205+
<G>0</G>
206+
<B>0</B>
207+
</Color3>
208+
<bool name="TextScaled">false</bool>
209+
<float name="TextSize">14</float>
210+
<Color3 name="TextStrokeColor3">
211+
<R>0</R>
212+
<G>0</G>
213+
<B>0</B>
214+
</Color3>
215+
<float name="TextStrokeTransparency">1</float>
216+
<float name="TextTransparency">0</float>
217+
<token name="TextTruncate">0</token>
218+
<bool name="TextWrapped">false</bool>
219+
<token name="TextXAlignment">2</token>
220+
<token name="TextYAlignment">1</token>
221+
<bool name="Visible">true</bool>
222+
<int name="ZIndex">1</int>
223+
</Properties>
224+
</Item>
225+
<Item class="TextBox" referent="RBX96C547C9FAE34C7A974B78D4440C8B67">
226+
<Properties>
227+
<bool name="Active">true</bool>
228+
<Vector2 name="AnchorPoint">
229+
<X>0</X>
230+
<Y>0</Y>
231+
</Vector2>
232+
<BinaryString name="AttributesSerialize"></BinaryString>
233+
<bool name="AutoLocalize">true</bool>
234+
<token name="AutomaticSize">0</token>
235+
<Color3 name="BackgroundColor3">
236+
<R>1</R>
237+
<G>1</G>
238+
<B>1</B>
239+
</Color3>
240+
<float name="BackgroundTransparency">0</float>
241+
<Color3 name="BorderColor3">
242+
<R>0.105882362</R>
243+
<G>0.164705887</G>
244+
<B>0.207843155</B>
245+
</Color3>
246+
<token name="BorderMode">0</token>
247+
<int name="BorderSizePixel">1</int>
248+
<bool name="ClearTextOnFocus">true</bool>
249+
<bool name="ClipsDescendants">false</bool>
250+
<bool name="Draggable">false</bool>
251+
<token name="Font">6</token>
252+
<int name="LayoutOrder">0</int>
253+
<float name="LineHeight">1</float>
254+
<int name="MaxVisibleGraphemes">-1</int>
255+
<bool name="MultiLine">false</bool>
256+
<string name="Name">TextBox</string>
257+
<Ref name="NextSelectionDown">null</Ref>
258+
<Ref name="NextSelectionLeft">null</Ref>
259+
<Ref name="NextSelectionRight">null</Ref>
260+
<Ref name="NextSelectionUp">null</Ref>
261+
<Color3 name="PlaceholderColor3">
262+
<R>0.699999988</R>
263+
<G>0.699999988</G>
264+
<B>0.699999988</B>
265+
</Color3>
266+
<string name="PlaceholderText"></string>
267+
<UDim2 name="Position">
268+
<XS>0</XS>
269+
<XO>0</XO>
270+
<YS>0</YS>
271+
<YO>110</YO>
272+
</UDim2>
273+
<bool name="RichText">false</bool>
274+
<Ref name="RootLocalizationTable">null</Ref>
275+
<float name="Rotation">0</float>
276+
<bool name="Selectable">true</bool>
277+
<token name="SelectionBehaviorDown">0</token>
278+
<token name="SelectionBehaviorLeft">0</token>
279+
<token name="SelectionBehaviorRight">0</token>
280+
<token name="SelectionBehaviorUp">0</token>
281+
<bool name="SelectionGroup">false</bool>
282+
<Ref name="SelectionImageObject">null</Ref>
283+
<int name="SelectionOrder">0</int>
284+
<bool name="ShowNativeInput">true</bool>
285+
<UDim2 name="Size">
286+
<XS>0</XS>
287+
<XO>200</XO>
288+
<YS>0</YS>
289+
<YO>50</YO>
290+
</UDim2>
291+
<token name="SizeConstraint">0</token>
292+
<int64 name="SourceAssetId">-1</int64>
293+
<BinaryString name="Tags"></BinaryString>
294+
<string name="Text">TextBox</string>
295+
<Color3 name="TextColor3">
296+
<R>0</R>
297+
<G>0</G>
298+
<B>0</B>
299+
</Color3>
300+
<bool name="TextEditable">true</bool>
301+
<bool name="TextScaled">false</bool>
302+
<float name="TextSize">14</float>
303+
<Color3 name="TextStrokeColor3">
304+
<R>0</R>
305+
<G>0</G>
306+
<B>0</B>
307+
</Color3>
308+
<float name="TextStrokeTransparency">1</float>
309+
<float name="TextTransparency">0</float>
310+
<token name="TextTruncate">0</token>
311+
<bool name="TextWrapped">false</bool>
312+
<token name="TextXAlignment">2</token>
313+
<token name="TextYAlignment">1</token>
314+
<bool name="Visible">true</bool>
315+
<int name="ZIndex">1</int>
316+
</Properties>
317+
</Item>
318+
</Item>
319+
</Item>
320+
</roblox>

0 commit comments

Comments
 (0)