Skip to content

Commit 7b83239

Browse files
feat: add switch to test in RTL mode
1 parent 0ffa239 commit 7b83239

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

test/webdriverio/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,15 @@ function getOptions() {
5252
const toolboxObject =
5353
toolbox === 'flyout' ? toolboxFlyout : toolboxCategories;
5454

55+
const rtlParam = params.get('rtl');
56+
const rtl = !!rtlParam;
57+
5558
return {
5659
scenario,
5760
stackConnections,
5861
renderer,
5962
toolbox: toolboxObject,
63+
rtl,
6064
};
6165
}
6266

@@ -67,11 +71,12 @@ function getOptions() {
6771
* @returns The created workspace.
6872
*/
6973
function createWorkspace(): Blockly.WorkspaceSvg {
70-
const {scenario, stackConnections, renderer, toolbox} = getOptions();
74+
const {scenario, stackConnections, renderer, toolbox, rtl} = getOptions();
7175

7276
const injectOptions = {
7377
toolbox,
7478
renderer,
79+
rtl,
7580
};
7681
const blocklyDiv = document.getElementById('blocklyDiv');
7782
if (!blocklyDiv) {

test/webdriverio/test/test_setup.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,14 @@ function posixPath(target) {
121121
export const testFileLocations = {
122122
BASE:
123123
'file://' + posixPath(path.join(__dirname, '..', 'build')) + '/index.html',
124+
BASE_RTL:
125+
'file://' + posixPath(path.join(__dirname, '..', 'build')) + '/index.html?rtl=true',
124126
GERAS:
125127
'file://' +
126128
posixPath(path.join(__dirname, '..', 'build')) +
127129
'/index.html?renderer=geras',
130+
GERAS_RTL:
131+
'file://' +
132+
posixPath(path.join(__dirname, '..', 'build')) +
133+
'/index.html?renderer=geras&rtl=true',
128134
};

0 commit comments

Comments
 (0)