Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
b08b20de
Commit
b08b20de
authored
Feb 21, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged importFromGist.js test into gist.js test
parent
41bf69a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
57 deletions
+44
-57
gist.js
test-browser/tests/gist.js
+44
-0
importFromGist.js
test-browser/tests/importFromGist.js
+0
-57
No files found.
test-browser/tests/gist.js
View file @
b08b20de
'use strict'
'use strict'
const
init
=
require
(
'../helpers/init'
)
const
init
=
require
(
'../helpers/init'
)
const
sauce
=
require
(
'./sauce'
)
const
sauce
=
require
(
'./sauce'
)
const
testData
=
{
validGistId
:
'1859c97c6e1efc91047d725d5225888e'
,
invalidGistId
:
'6368b389f9302v32902msk2402'
}
// 99266d6da54cc12f37f11586e8171546c7700d67
// 99266d6da54cc12f37f11586e8171546c7700d67
module
.
exports
=
{
module
.
exports
=
{
...
@@ -37,6 +41,46 @@ module.exports = {
...
@@ -37,6 +41,46 @@ module.exports = {
.
perform
(
done
)
.
perform
(
done
)
}
}
})
})
},
'Load Gist Modal'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
scrollAndClick
(
'div.file > div.btn-group > button:nth-child(1)'
)
.
waitForElementVisible
(
'h6.modal-title'
)
.
assert
.
containsText
(
'h6.modal-title'
,
'Load a Gist'
)
.
waitForElementVisible
(
'div.modal-body > div'
)
.
assert
.
containsText
(
'div.modal-body > div'
,
'Enter the ID of the Gist or URL you would like to load.'
)
.
waitForElementVisible
(
'#prompt_text'
)
.
click
(
'#modal-footer-cancel'
)
},
'Display Error Message For Invalid Gist ID'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
scrollAndClick
(
'div.file > div.btn-group > button:nth-child(1)'
)
.
waitForElementVisible
(
'#prompt_text'
)
.
setValue
(
'#prompt_text'
,
testData
.
invalidGistId
)
.
modalFooterOKClick
()
.
waitForElementVisible
(
'div.modal-body > div'
)
.
assert
.
containsText
(
'div.modal-body > div'
,
'Gist load error: Not Found'
)
.
modalFooterOKClick
()
},
'Import From Gist For Valid Gist ID'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
scrollAndClick
(
'div.file > div.btn-group > button:nth-child(1)'
)
.
waitForElementVisible
(
'#prompt_text'
)
.
setValue
(
'#prompt_text'
,
testData
.
validGistId
)
.
modalFooterOKClick
()
.
switchFile
(
`browser/gists/
${
testData
.
validGistId
}
`
)
.
switchFile
(
`browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry`
)
.
waitForElementVisible
(
`div[title='browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry']`
)
.
assert
.
containsText
(
`div[title='browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry'] > span`
,
'ApplicationRegistry'
)
.
end
()
.
end
()
},
},
...
...
test-browser/tests/importFromGist.js
deleted
100644 → 0
View file @
41bf69a1
'use strict'
const
init
=
require
(
'../helpers/init'
)
const
sauce
=
require
(
'./sauce'
)
const
testData
=
{
validGistId
:
'1859c97c6e1efc91047d725d5225888e'
,
invalidGistId
:
'6368b389f9302v32902msk2402'
}
module
.
exports
=
{
before
:
function
(
browser
,
done
)
{
init
(
browser
,
done
)
},
'Load Gist Modal'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
scrollAndClick
(
'div.file > div.btn-group > button:nth-child(1)'
)
.
waitForElementVisible
(
'h6.modal-title'
)
.
assert
.
containsText
(
'h6.modal-title'
,
'Load a Gist'
)
.
waitForElementVisible
(
'div.modal-body > div'
)
.
assert
.
containsText
(
'div.modal-body > div'
,
'Enter the ID of the Gist or URL you would like to load.'
)
.
waitForElementVisible
(
'#prompt_text'
)
.
click
(
'#modal-footer-cancel'
)
},
'Display Error Message For Invalid Gist ID'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
scrollAndClick
(
'div.file > div.btn-group > button:nth-child(1)'
)
.
waitForElementVisible
(
'#prompt_text'
)
.
setValue
(
'#prompt_text'
,
testData
.
invalidGistId
)
.
modalFooterOKClick
()
.
waitForElementVisible
(
'div.modal-body > div'
)
.
assert
.
containsText
(
'div.modal-body > div'
,
'Gist load error: Not Found'
)
.
modalFooterOKClick
()
},
'Import From Gist For Valid Gist ID'
:
function
(
browser
)
{
browser
.
waitForElementVisible
(
'#icon-panel'
,
10000
)
.
clickLaunchIcon
(
'fileExplorers'
)
.
scrollAndClick
(
'div.file > div.btn-group > button:nth-child(1)'
)
.
waitForElementVisible
(
'#prompt_text'
)
.
setValue
(
'#prompt_text'
,
testData
.
validGistId
)
.
modalFooterOKClick
()
.
switchFile
(
`browser/gists/
${
testData
.
validGistId
}
`
)
.
switchFile
(
`browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry`
)
.
waitForElementVisible
(
`div[title='browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry']`
)
.
assert
.
containsText
(
`div[title='browser/gists/
${
testData
.
validGistId
}
/ApplicationRegistry'] > span`
,
'ApplicationRegistry'
)
.
end
()
},
tearDown
:
sauce
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment