-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[webui-testsuite] implement some test for watchlist to play with IDE
- Loading branch information
Showing
8 changed files
with
99 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
class TC24__Groups < TestCase | ||
|
||
test :watchlists do | ||
navigate_to ProjectOverviewPage, | ||
:user => $data[:user1], | ||
:project => "BaseDistro" | ||
|
||
# assert watchlist is empty | ||
$page.driver.execute_script("$('#menu-favorites').show();") | ||
assert_equal 0, $page.driver.find_elements(:css, "span.icons-project").count | ||
|
||
$page.driver.execute_script("$('#menu-favorites').show();") | ||
|
||
assert_match /^[\s\S]*Add this project to Watchlist[\s\S]*$/, $page.driver.find_element(:css, "#menu-favorites").text | ||
$page.driver.find_element(:css, "#toggle_watch > span").click | ||
$page.driver.execute_script("$('#menu-favorites').show();") | ||
|
||
assert_equal "BaseDistro", $page.driver.find_element(:css, "span.icons-project").text | ||
assert_match /^[\s\S]*Remove this project from Watchlist[\s\S]*$/, $page.driver.find_element(:css, "#menu-favorites").text | ||
$page.driver.find_element(:css, "#toggle_watch > span").click | ||
wait_for_page | ||
$page.driver.execute_script("$('#menu-favorites').show();") | ||
assert_match /^[\s\S]*Add this project to Watchlist[\s\S]*$/, $page.driver.find_element(:css, "#menu-favorites").text | ||
$page.driver.find_element(:css, "#toggle_watch > span.desc").click | ||
wait_for_page | ||
|
||
$page.driver.find_element(:link, "Projects").click | ||
wait_for_page | ||
$page.driver.find_element(:link, "My:Maintenance").click | ||
wait_for_page | ||
|
||
$page.driver.execute_script("$('#menu-favorites').show();") | ||
assert_match /^[\s\S]*Add this project to Watchlist[\s\S]*$/, $page.driver.find_element(:css, "#menu-favorites").text | ||
$page.driver.find_element(:css, "#toggle_watch > span.desc").click | ||
wait_for_page | ||
|
||
$page.driver.execute_script("$('#menu-favorites').show();") | ||
$page.driver.find_element(:css, "span.icons-project").click | ||
wait_for_page | ||
|
||
assert_match /^[\s\S]*This is a base distro[\s\S]*$/, $page.driver.find_element(:css, "#project_title").text | ||
# teardown | ||
$page.driver.execute_script("$('#menu-favorites').show();") | ||
$page.driver.find_element(:css, "#toggle_watch > span.desc").click | ||
$page.driver.execute_script("$('#menu-favorites').show();") | ||
$page.driver.find_element(:link, "My:Maintenance").click | ||
$page.driver.execute_script("$('#menu-favorites').show();") | ||
$page.driver.find_element(:css, "#toggle_watch > span.desc").click | ||
assert_equal 0, $page.driver.find_elements(:css, "span.icons-project").count | ||
end | ||
|
||
end |
2 changes: 1 addition & 1 deletion
2
...ui-testsuite/tests/TC20__DeletePackage.rb → ...ui-testsuite/tests/TC71__DeletePackage.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ui-testsuite/tests/TC21__DeleteProject.rb → ...ui-testsuite/tests/TC72__DeleteProject.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class TC21__DeleteProject < TestCase | ||
class TC72__DeleteProject < TestCase | ||
|
||
|
||
test :delete_subproject do | ||
|