Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,712
Issues
1,712
List
Boards
Labels
Service Desk
Milestones
Merge Requests
87
Merge Requests
87
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
de2427a3
Commit
de2427a3
authored
Aug 02, 2018
by
Ryan Herbert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more pre-process tests
Add some pre_process dummy data and add edit and delete test
parent
89d01751
Pipeline
#35810
failed with stages
in 3 minutes and 56 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
server/web2py/applications/vidjil/tests/functional/init_test_db.py
...b2py/applications/vidjil/tests/functional/init_test_db.py
+2
-0
server/web2py/applications/vidjil/tests/functional/test_pre_process.rb
.../applications/vidjil/tests/functional/test_pre_process.rb
+42
-3
No files found.
server/web2py/applications/vidjil/tests/functional/init_test_db.py
View file @
de2427a3
...
...
@@ -68,6 +68,8 @@ class DBInitialiser(object):
public_group
=
db
(
db
.
auth_group
.
role
==
"public"
).
select
().
first
()
pid
=
db
.
pre_process
.
insert
(
name
=
"public pre-process"
,
command
=
"cat &file1& &file2& > &result&"
,
info
=
"concatenate two files"
)
auth
.
add_permission
(
public_group
.
id
,
PermissionEnum
.
access
.
value
,
db
.
pre_process
,
pid
)
for
i
in
range
(
3
):
db
.
pre_process
.
insert
(
name
=
"test pre-process %d"
%
i
,
command
=
"dummy &file1& &file2& > &result&"
,
info
=
"test %d"
%
i
)
@
_needs_sets
def
_init_sequence_files
(
self
):
...
...
server/web2py/applications/vidjil/tests/functional/test_pre_process.rb
View file @
de2427a3
...
...
@@ -40,9 +40,9 @@ class TestPreProcess < BrowserTest
form
=
$b
.
form
(
:id
=>
"data_form"
)
form
.
wait_until_present
form
.
text_field
(
:id
=>
"pre_process_name"
).
set
(
'
cat
'
)
form
.
textarea
(
:id
=>
"pre_process_command"
).
set
(
'
cat
&file1& &file2& > &result&'
)
form
.
textarea
(
:id
=>
"pre_process_name"
).
set
(
'
concatenate two files using cat
'
)
form
.
text_field
(
:id
=>
"pre_process_name"
).
set
(
'
dummy
'
)
form
.
textarea
(
:id
=>
"pre_process_command"
).
set
(
'
dummy
&file1& &file2& > &result&'
)
form
.
textarea
(
:id
=>
"pre_process_name"
).
set
(
'
dummy pre-process for testing purposes
'
)
form
.
input
(
:type
=>
"submit"
).
click
Watir
::
Wait
.
until
(
30
)
{
$b
.
execute_script
(
"return jQuery.active"
)
==
0
}
...
...
@@ -51,4 +51,43 @@ class TestPreProcess < BrowserTest
lines
=
table
.
tbody
.
rows
assert
(
lines
.
count
==
count
+
1
)
end
def
test_pre_process_edit
table
=
go_to_list
line
=
table
.
td
(
:text
=>
"test pre-process 0"
).
parent
uid
=
line
.
td
(
:index
=>
0
).
text
line
.
i
(
:class
=>
"icon-pencil-2"
).
click
form
=
$b
.
form
(
:id
=>
"data_form"
)
form
.
wait_until_present
info
=
form
.
textarea
(
:id
=>
"pre_process_info"
)
assert
(
form
.
text_field
(
:id
=>
"pre_process_name"
).
value
==
"test pre-process 0"
)
assert
(
form
.
textarea
(
:id
=>
"pre_process_command"
).
value
==
"dummy &file1& &file2& > &result&"
)
assert
(
info
.
value
==
"test 0"
)
info
.
set
(
"edited"
)
form
.
input
(
:type
=>
"submit"
).
click
Watir
::
Wait
.
until
(
30
)
{
$b
.
execute_script
(
"return jQuery.active"
)
==
0
}
table
=
$b
.
table
(
:id
=>
'table'
)
table
.
wait_until_present
line
=
table
.
td
(
:index
=>
0
,
:text
=>
uid
).
parent
assert
(
line
.
td
(
:text
=>
"edited"
).
present?
)
end
def
test_pre_process_delete
table
=
go_to_list
count
=
table
.
tbody
.
rows
.
count
line
=
table
.
td
(
:text
=>
"test pre-process 2"
).
parent
line
.
i
(
:class
=>
"icon-erase"
).
click
Watir
::
Wait
.
until
(
30
)
{
$b
.
execute_script
(
"return jQuery.active"
)
==
0
}
$b
.
button
(
:text
=>
"continue"
).
click
Watir
::
Wait
.
until
(
30
)
{
$b
.
execute_script
(
"return jQuery.active"
)
==
0
}
table
.
wait_until_present
lines
=
table
.
tbody
.
rows
assert
(
lines
.
count
==
count
-
1
)
end
end
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