Skip to content
Snippets Groups Projects
Unverified Commit 6a933be7 authored by chrisgarrity's avatar chrisgarrity Committed by GitHub
Browse files

Merge pull request #2655 from chrisgarrity/feature/enable-language

Enable the language menu
parents 89e96122 02f4265b
No related branches found
No related tags found
No related merge requests found
...@@ -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"
> >
......
...@@ -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([]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment