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
130bd3f0
Commit
130bd3f0
authored
6 years ago
by
Paul Kaplan
Browse files
Options
Downloads
Patches
Plain Diff
Add integration test for changing languages not clearing project
parent
b18b428a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/integration/localization.test.js
+13
-1
13 additions, 1 deletion
test/integration/localization.test.js
with
13 additions
and
1 deletion
test/integration/localization.test.js
+
13
−
1
View file @
130bd3f0
...
@@ -6,7 +6,9 @@ const {
...
@@ -6,7 +6,9 @@ const {
clickXpath
,
clickXpath
,
getDriver
,
getDriver
,
getLogs
,
getLogs
,
loadUri
loadUri
,
scope
,
rightClickText
}
=
new
SeleniumHelper
();
}
=
new
SeleniumHelper
();
const
uri
=
path
.
resolve
(
__dirname
,
'
../../build/index.html
'
);
const
uri
=
path
.
resolve
(
__dirname
,
'
../../build/index.html
'
);
...
@@ -25,6 +27,13 @@ describe('Localization', () => {
...
@@ -25,6 +27,13 @@ describe('Localization', () => {
test
(
'
Localization
'
,
async
()
=>
{
test
(
'
Localization
'
,
async
()
=>
{
await
loadUri
(
uri
);
await
loadUri
(
uri
);
await
clickXpath
(
'
//button[@title="Try It"]
'
);
await
clickXpath
(
'
//button[@title="Try It"]
'
);
// Add a sprite to make sure it stays when switching languages
await
clickText
(
'
Costumes
'
);
await
clickXpath
(
'
//button[@aria-label="Choose a Sprite"]
'
);
await
clickText
(
'
Apple
'
,
scope
.
modal
);
// Closes modal
await
clickText
(
'
Code
'
);
await
clickXpath
(
'
//*[@aria-label="language selector"]
'
);
await
clickXpath
(
'
//*[@aria-label="language selector"]
'
);
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
...
@@ -37,6 +46,9 @@ describe('Localization', () => {
...
@@ -37,6 +46,9 @@ describe('Localization', () => {
// Change to the costumes tab to confirm other parts of the GUI are translating
// Change to the costumes tab to confirm other parts of the GUI are translating
await
clickText
(
'
Kostüme
'
);
await
clickText
(
'
Kostüme
'
);
// After switching languages, make sure Apple sprite still exists
await
rightClickText
(
'
Apple
'
,
scope
.
spriteTile
);
// Make sure it is there
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