Skip to content

Commit 05ddbd2

Browse files
committed
refactor: rename code to ruby
1 parent 9b3df61 commit 05ddbd2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/integration/ruby-tab/events.test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('Ruby Tab: Events category blocks', () => {
2929
await driver.quit();
3030
});
3131

32-
const eventsCode = dedent`
32+
const eventsRuby = dedent`
3333
when_flag_clicked do
3434
bounce_if_on_edge
3535
end
@@ -94,7 +94,7 @@ describe('Ruby Tab: Events category blocks', () => {
9494
broadcast_and_wait(x)
9595
`;
9696

97-
const eventsOldCode = dedent`
97+
const eventsOldRuby = dedent`
9898
self.when(:flag_clicked) do
9999
bounce_if_on_edge
100100
end
@@ -162,22 +162,22 @@ describe('Ruby Tab: Events category blocks', () => {
162162
describe('sprite', () => {
163163
test('Ruby -> Code -> Ruby', async () => {
164164
await loadUri(urlFor('/'));
165-
await expectInterconvertBetweenCodeAndRuby(eventsCode);
165+
await expectInterconvertBetweenCodeAndRuby(eventsRuby);
166166
});
167167

168168
test('Ruby -> Code -> Ruby (backward compatibility) ', async () => {
169169
await loadUri(urlFor('/'));
170170

171171
await clickText('Ruby', '*[@role="tab"]');
172-
await fillInRubyProgram(eventsOldCode);
172+
await fillInRubyProgram(eventsOldRuby);
173173
await clickText('Code', '*[@role="tab"]');
174174
await clickXpath(
175175
'//div[contains(@class, "menu-bar_menu-bar-item") and contains(@class, "menu-bar_hoverable")]' +
176176
'/*/span[text()="Edit"]'
177177
);
178178
await clickText('Generate Ruby from Code');
179179
await clickText('Ruby', '*[@role="tab"]');
180-
expect(await currentRubyProgram()).toEqual(`${eventsCode}\n`);
180+
expect(await currentRubyProgram()).toEqual(`${eventsRuby}\n`);
181181
});
182182
});
183183

@@ -186,23 +186,23 @@ describe('Ruby Tab: Events category blocks', () => {
186186
await loadUri(urlFor('/'));
187187
await clickXpath('//span[text()="Stage"]');
188188

189-
await expectInterconvertBetweenCodeAndRuby(eventsCode);
189+
await expectInterconvertBetweenCodeAndRuby(eventsRuby);
190190
});
191191

192192
test('Ruby -> Code -> Ruby (backward compatibility) ', async () => {
193193
await loadUri(urlFor('/'));
194194
await clickXpath('//span[text()="Stage"]');
195195

196196
await clickText('Ruby', '*[@role="tab"]');
197-
await fillInRubyProgram(eventsOldCode);
197+
await fillInRubyProgram(eventsOldRuby);
198198
await clickText('Code', '*[@role="tab"]');
199199
await clickXpath(
200200
'//div[contains(@class, "menu-bar_menu-bar-item") and contains(@class, "menu-bar_hoverable")]' +
201201
'/*/span[text()="Edit"]'
202202
);
203203
await clickText('Generate Ruby from Code');
204204
await clickText('Ruby', '*[@role="tab"]');
205-
expect(await currentRubyProgram()).toEqual(`${eventsCode}\n`);
205+
expect(await currentRubyProgram()).toEqual(`${eventsRuby}\n`);
206206
});
207207
});
208208
});

0 commit comments

Comments
 (0)