From 63d8f92c1499ee3586a080b4e63b916e513e5d0f Mon Sep 17 00:00:00 2001 From: ioguix Date: Fri, 14 Dec 2007 14:44:03 +0000 Subject: [PATCH] add selenium tests for altering view and adding a normal user --- selenium/tests/TestSuite.html | 16 +-- selenium/tests/config.inc.php | 6 +- selenium/tests/create_view.php | 195 ++++++++++++++++++++++++++++++++- selenium/tests/drop_schema.php | 22 +++- selenium/tests/intro.php | 41 +++++++ selenium/tests/outro.php | 17 ++- 6 files changed, 284 insertions(+), 13 deletions(-) diff --git a/selenium/tests/TestSuite.html b/selenium/tests/TestSuite.html index c346f925..6108ae2b 100644 --- a/selenium/tests/TestSuite.html +++ b/selenium/tests/TestSuite.html @@ -3,7 +3,7 @@ Test suite for PPA - Create admin role + Create test's roles Create database @@ -11,14 +11,11 @@ Create schema - - Drop schema - Create domain - Create / Drop tables + Create/Drop tables Create/Alter/Drop sequence @@ -39,7 +36,7 @@ Drop column - Create View + Create/Alter View Create index @@ -48,8 +45,11 @@ Drop index - Drop schema fail + Drop schema + @@ -60,6 +60,6 @@ Drop database - Drop admin role + Drop test's roles diff --git a/selenium/tests/config.inc.php b/selenium/tests/config.inc.php index 9be2f1fa..523f09b2 100644 --- a/selenium/tests/config.inc.php +++ b/selenium/tests/config.inc.php @@ -1,13 +1,15 @@ diff --git a/selenium/tests/create_view.php b/selenium/tests/create_view.php index b961b923..586e3817 100644 --- a/selenium/tests/create_view.php +++ b/selenium/tests/create_view.php @@ -7,9 +7,10 @@ - + + @@ -67,6 +68,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Create a view
Create/Alter a view
clickAndWait link=//p[@class='message']
clickAndWaitlink=
clickAndWaitlink=student_promo
clickAndWait//ul[@class='navlink']/li/a[text()='']
typenamestudent_promo_renamed
clickAndWaitalter
assertText//p[@class='message']
assertText//div[@class='trail']/descendant::a[@title='']/span[@class='label']student_promo_renamed
clickAndWait//ul[@class='navlink']/li/a[text()='']
typecommentstudents and their promotion (altered)
clickAndWaitalter
assertText//p[@class='message']
assertText//p[@class='comment']students and their promotion (altered)
clickAndWait//ul[@class='navlink']/li/a[text()='']
selectnewschemalabel=test_schema
clickAndWaitalter
assertText//p[@class='message']
assertText//div[@class='trail']/descendant::a[@title='']/span[@class='label']test_schema
clickAndWait//ul[@class='navlink']/li/a[text()='']
selectownerlabel=
clickAndWaitalter
assertText//p[@class='message']
clickAndWait//div[@class='trail']/descendant::a[@title='']/span[@class='label' and text()='test_schema']
clickAndWaitlink=
assertText//tr/td[1]/a[text()='student_promo_renamed']/../../td[2]
clickAndWaitlink=student_promo_renamed
clickAndWait//ul[@class='navlink']/li/a[text()='']
selectownerlabel=
typenamestudent_promo
selectnewschemalabel=public
typecommentstudents and their promotion
clickAndWaitalter
assertText//p[@class='message']
assertText//p[@class='comment']students and their promotion
assertText//div[@class='trail']/descendant::a[@title='']/span[@class='label']student_promo
clickAndWait//div[@class='trail']/descendant::a[@title='']/span[@class='label' and text()='public']
clickAndWaitlink=
assertText//tr/td[1]/a[text()='student_promo']/../../td[2]
diff --git a/selenium/tests/drop_schema.php b/selenium/tests/drop_schema.php index dc320786..5bdd826f 100644 --- a/selenium/tests/drop_schema.php +++ b/selenium/tests/drop_schema.php @@ -7,7 +7,7 @@ - + @@ -25,6 +25,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/selenium/tests/intro.php b/selenium/tests/intro.php index 210f109e..5a99b607 100644 --- a/selenium/tests/intro.php +++ b/selenium/tests/intro.php @@ -145,6 +145,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Drop a schema
Fail to drop a schema, then actualy drop the test_schema
link=
clickAndWait//tr/td/a[text()='public']/../../td/a[text()='']
clickAndWaitdrop
assertText//p[@class='message']
clickAndWaitlink=
clickAndWait //tr/td/a[text()='test_schema']/../../td/a[text()='']//div[@class='topbar']/descendant::span[@class='username']
clickAndWaitlink=
clickAndWaitlink=
typeformRolename
typeformPassword
typeformConfirm
clickformCanLogin
clickAndWaitcreate
assertText//p[@class='message']
diff --git a/selenium/tests/outro.php b/selenium/tests/outro.php index acfaa337..f26d070e 100644 --- a/selenium/tests/outro.php +++ b/selenium/tests/outro.php @@ -7,7 +7,7 @@ - + @@ -86,6 +86,21 @@ + + + + + + + + + + + + + + +
Admin role try to drop himself, logout, then superuser actually drop him.
Admin role try to drop himself, logout, then superuser actually drop him & normal user.
//p[@class='message']
clickAndWait//tr/td/a[text()='']/../../td/a[text()='']
clickAndWaitdrop
assertText//p[@class='message']
-- 2.39.5