Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qfq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
typo3
qfq
Commits
2b78d114
Commit
2b78d114
authored
7 years ago
by
Rafael Ostertag
Browse files
Options
Downloads
Patches
Plain Diff
testFormHttpError.js: test file delete.
parent
0210ad75
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mockup/qfqform.html
+4
-3
4 additions, 3 deletions
mockup/qfqform.html
tests/selenium/testFormHttpError.js
+61
-3
61 additions, 3 deletions
tests/selenium/testFormHttpError.js
with
65 additions
and
6 deletions
mockup/qfqform.html
+
4
−
3
View file @
2b78d114
...
...
@@ -48,7 +48,7 @@
<label>
File Delete Url
<select
name=
"fileDeleteUrl"
id=
"fileDeleteUrl"
>
<option>
404 error
</option>
<option
id=
"file-delete-404-error"
>
404 error
</option>
<option>
delete_file_ok.json
</option>
<option>
delete_file_error.json
</option>
</select>
...
...
@@ -76,11 +76,12 @@
<li
role=
"presentation"
class=
"active"
><a
href=
"#person"
data-toggle=
"tab"
>
Person
</a></li>
<li
role=
"presentation"
><a
id=
"link-tab-person2"
href=
"#person2"
data-toggle=
"tab"
>
Person2
</a></li>
<li
role=
"presentation"
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
role=
"button"
>
<a
id=
"link-more-dropdown"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
role=
"button"
>
more
<span
class=
"caret"
></span>
</a>
<ul
class=
"dropdown-menu"
>
<li><a
href=
"#arbeitsgruppe"
data-toggle=
"tab"
>
Arbeitsgruppe
</a></li>
<li><a
id=
"link-tab-arbeitsgruppe"
href=
"#arbeitsgruppe"
data-toggle=
"tab"
>
Arbeitsgruppe
</a>
</li>
</ul>
</li>
...
...
This diff is collapsed.
Click to expand it.
tests/selenium/testFormHttpError.js
+
61
−
3
View file @
2b78d114
...
...
@@ -36,7 +36,7 @@ test.describe('Form Submit Error', function () {
driver
.
quit
();
});
test
.
it
(
"
should display error message on HTTP error when submitting
"
,
function
(
done
)
{
test
.
it
(
"
should display error message on HTTP error when submitting
form
"
,
function
(
done
)
{
driver
.
get
(
URL
)
.
then
(
()
=>
qfqForm
.
assertButtonsUnmodifiedForm
(
driver
)
...
...
@@ -62,7 +62,7 @@ test.describe('Form Submit Error', function () {
)
});
test
.
it
(
"
should display error message on HTTP error when deleting
"
,
function
(
done
)
{
test
.
it
(
"
should display error message on HTTP error when deleting
form
"
,
function
(
done
)
{
driver
.
get
(
URL
)
.
then
(
()
=>
qfqForm
.
assertButtonsUnmodifiedForm
(
driver
)
...
...
@@ -103,6 +103,64 @@ test.describe('Form Submit Error', function () {
)
)
)
})
});
test
.
it
(
"
should display error message on HTTP error when deleting file
"
,
function
(
done
)
{
driver
.
get
(
URL
)
.
then
(
()
=>
qfqForm
.
assertButtonsUnmodifiedForm
(
driver
)
)
.
then
(
()
=>
driver
.
findElement
(
By
.
id
(
'
delete-404-error
'
))
.
then
(
(
dropdown
)
=>
dropdown
.
click
()
)
)
.
then
(
()
=>
driver
.
findElement
(
By
.
id
(
'
link-more-dropdown
'
))
.
then
(
(
link
)
=>
link
.
click
()
.
then
(
()
=>
driver
.
findElement
(
By
.
id
(
'
link-tab-arbeitsgruppe
'
))
.
then
(
(
link
)
=>
link
.
click
()
)
)
)
)
.
then
(
()
=>
driver
.
findElement
(
By
.
css
(
'
.uploaded-file button.delete-file
'
))
.
then
(
(
button
)
=>
button
.
click
()
.
then
(
qfqForm
.
expectNumberOfAlerts
.
toBe
(
1
,
driver
)
.
then
(
qfqForm
.
expectAlertToMatch
(
1
,
/Do you want to delete the file
\?
/
,
driver
)
)
)
)
)
.
then
(
()
=>
driver
.
findElement
(
By
.
css
(
'
div.alert-buttons button:first-child
'
))
.
then
(
(
yesButton
)
=>
yesButton
.
click
()
.
then
(
()
=>
driver
.
findElement
(
By
.
css
(
'
#qfqAlertContainer > div.alert-danger
'
))
.
then
(
(
alertContainer
)
=>
driver
.
wait
(
until
.
elementIsVisible
(
alertContainer
),
1000
)
)
)
)
)
.
then
(
()
=>
qfqForm
.
expectNumberOfAlerts
.
toBe
(
1
,
driver
)
.
then
(
()
=>
qfqForm
.
expectAlertToMatch
(
1
,
/Error:
\n
Not Found/
,
driver
)
.
then
(
()
=>
done
()
)
)
)
});
});
\ No newline at end of file
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