Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
logging-scratch-gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Goessmann
logging-scratch-gui
Commits
6a933be7
Unverified
Commit
6a933be7
authored
6 years ago
by
chrisgarrity
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2655 from chrisgarrity/feature/enable-language
Enable the language menu
parents
89e96122
02f4265b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/menu-bar/menu-bar.jsx
+2
-1
2 additions, 1 deletion
src/components/menu-bar/menu-bar.jsx
test/integration/localization.test.js
+10
-15
10 additions, 15 deletions
test/integration/localization.test.js
with
12 additions
and
16 deletions
src/components/menu-bar/menu-bar.jsx
+
2
−
1
View file @
6a933be7
...
@@ -159,8 +159,9 @@ class MenuBar extends React.Component {
...
@@ -159,8 +159,9 @@ class MenuBar extends React.Component {
})
}
})
}
onMouseUp
=
{
this
.
handleLanguageMouseUp
}
onMouseUp
=
{
this
.
handleLanguageMouseUp
}
>
>
{
/* @TODO: remove coming soon tooltip wrapper https://github.com/LLK/scratch-gui/issues/2664 */
}
<
MenuBarItemTooltip
<
MenuBarItemTooltip
enable
=
{
window
.
location
.
search
.
indexOf
(
'
enable=language
'
)
!==
-
1
}
enable
id
=
"menubar-selector"
id
=
"menubar-selector"
place
=
"right"
place
=
"right"
>
>
...
...
This diff is collapsed.
Click to expand it.
test/integration/localization.test.js
+
10
−
15
View file @
6a933be7
...
@@ -4,11 +4,9 @@ import SeleniumHelper from '../helpers/selenium-helper';
...
@@ -4,11 +4,9 @@ import SeleniumHelper from '../helpers/selenium-helper';
const
{
const
{
clickText
,
clickText
,
clickXpath
,
clickXpath
,
findByText
,
getDriver
,
getDriver
,
getLogs
,
getLogs
,
loadUri
,
loadUri
scope
}
=
new
SeleniumHelper
();
}
=
new
SeleniumHelper
();
const
uri
=
path
.
resolve
(
__dirname
,
'
../../build/index.html
'
);
const
uri
=
path
.
resolve
(
__dirname
,
'
../../build/index.html
'
);
...
@@ -24,24 +22,21 @@ describe('Localization', () => {
...
@@ -24,24 +22,21 @@ describe('Localization', () => {
await
driver
.
quit
();
await
driver
.
quit
();
});
});
// Skipped temporarily while the language selector is marked as
test
(
'
Localization
'
,
async
()
=>
{
// "Coming Soon"
test
.
skip
(
'
Localization
'
,
async
()
=>
{
await
loadUri
(
uri
);
await
loadUri
(
uri
);
await
clickXpath
(
'
//button[@title="tryit"]
'
);
await
clickXpath
(
'
//button[@title="tryit"]
'
);
await
clickText
(
'
Code
'
);
await
clickXpath
(
'
//*[@aria-label="language selector"]
'
);
await
clickXpath
(
'
//button[@title="Add Extension"]
'
);
await
clickText
(
'
Pen
'
,
scope
.
modal
);
// Modal closes
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
1000
));
// Wait for scroll animation
await
clickText
(
'
English
'
);
await
clickText
(
'
English
'
);
await
clickText
(
'
Deutsch
'
);
await
clickText
(
'
Deutsch
'
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
1000
));
// wait for blocks refresh
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
1000
));
// wait for blocks refresh
await
clickText
(
'
Pen
'
);
// will need to be updated when 'Pen' is translated
// Make sure "Add Sprite" has changed to "Figur hinzufügen"
// Make sure the blocks are translating
await
findByText
(
'
Figur hinzufügen
'
);
await
clickText
(
'
Fühlen
'
);
// Sensing category in German
// Find the stamp block in German
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
1000
));
// wait for blocks to scroll
await
findByText
(
'
Abdruck
'
);
await
clickText
(
'
Antwort
'
);
// Find the "answer" block in German
// Change to the costumes tab to confirm other parts of the GUI are translating
await
clickText
(
'
Kostüme
'
);
const
logs
=
await
getLogs
();
const
logs
=
await
getLogs
();
await
expect
(
logs
).
toEqual
([]);
await
expect
(
logs
).
toEqual
([]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment