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
6e315fdb
Commit
6e315fdb
authored
7 years ago
by
Paul Kaplan
Browse files
Options
Downloads
Patches
Plain Diff
Add duplication integration tests for GUI
parent
44ce6df5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/helpers/selenium-helper.js
+1
-0
1 addition, 0 deletions
test/helpers/selenium-helper.js
test/integration/costumes.test.js
+19
-1
19 additions, 1 deletion
test/integration/costumes.test.js
test/integration/sounds.test.js
+16
-0
16 additions, 0 deletions
test/integration/sounds.test.js
with
36 additions
and
1 deletion
test/helpers/selenium-helper.js
+
1
−
0
View file @
6e315fdb
...
...
@@ -25,6 +25,7 @@ class SeleniumHelper {
// List of useful xpath scopes for finding elements
return
{
blocksTab
:
"
*[@id='react-tabs-1']
"
,
costumesTab
:
"
*[@id='react-tabs-3']
"
,
modal
:
'
*[@class="ReactModalPortal"]
'
,
reportedValue
:
'
*[@class="blocklyDropDownContent"]
'
,
soundsTab
:
"
*[@id='react-tabs-5']
"
,
...
...
This diff is collapsed.
Click to expand it.
test/integration/costumes.test.js
+
19
−
1
View file @
6e315fdb
...
...
@@ -7,7 +7,9 @@ const {
findByXpath
,
getDriver
,
getLogs
,
loadUri
loadUri
,
rightClickText
,
scope
}
=
new
SeleniumHelper
();
const
uri
=
path
.
resolve
(
__dirname
,
'
../../build/index.html
'
);
...
...
@@ -36,6 +38,22 @@ describe('Working with costumes', () => {
await
expect
(
logs
).
toEqual
([]);
});
test
(
'
Duplicating a costume
'
,
async
()
=>
{
await
loadUri
(
uri
);
await
clickXpath
(
'
//button[@title="tryit"]
'
);
await
clickText
(
'
Costumes
'
);
await
rightClickText
(
'
costume1
'
,
scope
.
costumesTab
);
await
clickText
(
'
duplicate
'
,
scope
.
costumesTab
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
1000
));
// Wait for duplication to finish
// Make sure the duplicated costume is named correctly.
await
clickText
(
'
costume3
'
,
scope
.
costumesTab
);
const
logs
=
await
getLogs
();
await
expect
(
logs
).
toEqual
([]);
});
test
(
'
Adding a backdrop
'
,
async
()
=>
{
await
loadUri
(
uri
);
await
clickXpath
(
'
//button[@title="tryit"]
'
);
...
...
This diff is collapsed.
Click to expand it.
test/integration/sounds.test.js
+
16
−
0
View file @
6e315fdb
...
...
@@ -63,6 +63,22 @@ describe('Working with sounds', () => {
await
expect
(
logs
).
toEqual
([]);
});
test
(
'
Duplicating a sound
'
,
async
()
=>
{
await
loadUri
(
uri
);
await
clickXpath
(
'
//button[@title="tryit"]
'
);
await
clickText
(
'
Sounds
'
);
await
rightClickText
(
'
Meow
'
,
scope
.
soundsTab
);
await
clickText
(
'
duplicate
'
,
scope
.
soundsTab
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
1000
));
// Wait for error
// Make sure the duplicated sound is named correctly.
await
clickText
(
'
Meow2
'
,
scope
.
soundsTab
);
const
logs
=
await
getLogs
();
await
expect
(
logs
).
toEqual
([]);
});
// Regression test for gui issue #1320
test
(
'
Switching sprites with different numbers of sounds
'
,
async
()
=>
{
await
loadUri
(
uri
);
...
...
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