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
a9c10839
Commit
a9c10839
authored
7 years ago
by
Luke Schlangen
Browse files
Options
Downloads
Patches
Plain Diff
starting driver before "not now" test
parent
8a23c463
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/project-loading.test.js
+40
-39
40 additions, 39 deletions
test/integration/project-loading.test.js
with
40 additions
and
39 deletions
test/integration/project-loading.test.js
+
40
−
39
View file @
a9c10839
...
...
@@ -14,15 +14,6 @@ const uri = path.resolve(__dirname, '../../build/index.html');
let
driver
;
describe
(
'
Loading scratch gui
'
,
()
=>
{
test
(
'
The "Not Now" button sends you to scratch
'
,
async
()
=>
{
await
loadUri
(
uri
);
await
clickText
(
'
Not Now
'
);
const
currentUrl
=
await
driver
.
getCurrentUrl
();
await
expect
(
currentUrl
).
toEqual
(
'
https://scratch.mit.edu/
'
);
});
});
describe
(
'
Loading projects by ID
'
,
()
=>
{
beforeAll
(()
=>
{
driver
=
getDriver
();
});
...
...
@@ -31,40 +22,50 @@ describe('Loading projects by ID', () => {
await
driver
.
quit
();
});
test
(
'
Load a project by ID
'
,
async
()
=>
{
const
projectId
=
'
96708228
'
;
await
loadUri
(
`
${
uri
}
#
${
projectId
}
`
);
await
clickXpath
(
'
//button[@title="tryit"]
'
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
await
clickXpath
(
'
//img[@title="Go"]
'
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
await
clickXpath
(
'
//img[@title="Stop"]
'
);
const
logs
=
await
getLogs
();
await
expect
(
logs
).
toEqual
([]);
test
(
'
The "Not Now" button sends you to scratch
'
,
async
()
=>
{
await
loadUri
(
uri
);
await
clickText
(
'
Not Now
'
);
const
currentUrl
=
await
driver
.
getCurrentUrl
();
await
expect
(
currentUrl
).
toEqual
(
'
https://scratch.mit.edu/
'
);
});
test
(
'
Load a project by ID (fullscreen)
'
,
async
()
=>
{
const
prevSize
=
driver
.
manage
()
.
window
()
.
getSize
();
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
driver
.
manage
()
.
window
()
.
setSize
(
1920
,
1080
);
const
projectId
=
'
96708228
'
;
await
loadUri
(
`
${
uri
}
#
${
projectId
}
`
);
await
clickXpath
(
'
//button[@title="tryit"]
'
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
await
clickXpath
(
'
//img[@title="Full Screen Control"]
'
);
await
clickXpath
(
'
//img[@title="Go"]
'
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
await
clickXpath
(
'
//img[@title="Stop"]
'
);
prevSize
.
then
(
value
=>
{
describe
(
'
Loading projects by ID
'
,
()
=>
{
test
(
'
Load a project by ID
'
,
async
()
=>
{
const
projectId
=
'
96708228
'
;
await
loadUri
(
`
${
uri
}
#
${
projectId
}
`
);
await
clickXpath
(
'
//button[@title="tryit"]
'
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
await
clickXpath
(
'
//img[@title="Go"]
'
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
await
clickXpath
(
'
//img[@title="Stop"]
'
);
const
logs
=
await
getLogs
();
await
expect
(
logs
).
toEqual
([]);
});
test
(
'
Load a project by ID (fullscreen)
'
,
async
()
=>
{
const
prevSize
=
driver
.
manage
()
.
window
()
.
getSize
();
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
driver
.
manage
()
.
window
()
.
setSize
(
value
.
width
,
value
.
height
);
.
setSize
(
1920
,
1080
);
const
projectId
=
'
96708228
'
;
await
loadUri
(
`
${
uri
}
#
${
projectId
}
`
);
await
clickXpath
(
'
//button[@title="tryit"]
'
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
await
clickXpath
(
'
//img[@title="Full Screen Control"]
'
);
await
clickXpath
(
'
//img[@title="Go"]
'
);
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
2000
));
await
clickXpath
(
'
//img[@title="Stop"]
'
);
prevSize
.
then
(
value
=>
{
driver
.
manage
()
.
window
()
.
setSize
(
value
.
width
,
value
.
height
);
});
const
logs
=
await
getLogs
();
await
expect
(
logs
).
toEqual
([]);
});
const
logs
=
await
getLogs
();
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