Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
justinfreeman (Agileware)
Core
Commits
d226f7d8
Commit
d226f7d8
authored
12 years ago
by
Ravish Nair
Browse files
Options
Downloads
Patches
Plain Diff
-- webtest improvement
parent
a99bcb75
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/phpunit/WebTest/Campaign/PetitionUsageScenarioTest.php
+11
-16
11 additions, 16 deletions
tests/phpunit/WebTest/Campaign/PetitionUsageScenarioTest.php
with
11 additions
and
16 deletions
tests/phpunit/WebTest/Campaign/PetitionUsageScenarioTest.php
+
11
−
16
View file @
d226f7d8
...
...
@@ -90,10 +90,9 @@ class WebTest_Campaign_PetitionUsageScenarioTest extends CiviSeleniumTestCase {
$this
->
select
(
"status_id"
,
"value=2"
);
// click save
$this
->
click
(
"_qf_Campaign_upload-bottom"
);
$this
->
waitForPageToLoad
(
$this
->
getTimeoutMsec
());
$this
->
clickLink
(
'_qf_Campaign_upload-bottom'
);
$this
->
assertTrue
(
$this
->
isTextPresent
(
"Campaign
$title
Campaign has been saved."
),
"Status message didn't show up after saving!
"
);
$this
->
waitForText
(
'crm-notification-container'
,
"Campaign
$title
Campaign has been saved.
"
);
////////////// Create petition using New Individual profile //////////////////////
...
...
@@ -113,10 +112,9 @@ class WebTest_Campaign_PetitionUsageScenarioTest extends CiviSeleniumTestCase {
$this
->
select
(
"contact_profile_id"
,
"value=4"
);
// click save
$this
->
click
(
"_qf_Petition_next-bottom"
);
$this
->
waitForPageToLoad
(
$this
->
getTimeoutMsec
());
$this
->
clickLink
(
'_qf_Petition_next-bottom'
);
$this
->
assertTrue
(
$this
->
isTextPresent
(
"Petition has been saved."
)
)
;
$this
->
waitForText
(
'crm-notification-container'
,
"Petition has been saved."
);
$this
->
waitForElementPresent
(
"link=Add Petition"
);
...
...
@@ -151,9 +149,8 @@ class WebTest_Campaign_PetitionUsageScenarioTest extends CiviSeleniumTestCase {
$this
->
type
(
"email-Primary"
,
$email
);
// click Sign the petition.
$this
->
click
(
"_qf_Signature_next-bottom"
);
$this
->
waitForPageToLoad
(
$this
->
getTimeoutMsec
());
$this
->
assertTrue
(
$this
->
isTextPresent
(
"Thank You"
));
$this
->
clickLink
(
'_qf_Signature_next-bottom'
,
NULL
);
$this
->
waitForText
(
'page-title'
,
"Thank You"
);
// login
$this
->
webtestLogin
();
...
...
@@ -207,10 +204,9 @@ class WebTest_Campaign_PetitionUsageScenarioTest extends CiviSeleniumTestCase {
$this
->
fillRichTextField
(
'thankyou_text'
,
"Thank you for your kind contribution to support
$title
"
,
'CKEditor'
);
// click save
$this
->
click
(
"_qf_Petition_next-bottom"
);
$this
->
waitForPageToLoad
(
$this
->
getTimeoutMsec
());
$this
->
clickLink
(
'_qf_Petition_next-bottom'
);
$this
->
assertTrue
(
$this
->
isTextPresent
(
"Petition has been saved."
)
)
;
$this
->
waitForText
(
'crm-notification-container'
,
"Petition has been saved."
);
$this
->
waitForElementPresent
(
"link=Add Petition"
);
...
...
@@ -243,12 +239,11 @@ class WebTest_Campaign_PetitionUsageScenarioTest extends CiviSeleniumTestCase {
$this
->
type
(
"email-Primary"
,
$email
);
// click Sign the petition.
$this
->
click
(
"_qf_Signature_next-bottom"
);
$this
->
waitForElementPresent
(
"thankyou_text"
);
$this
->
clickLink
(
'_qf_Signature_next-bottom'
,
'thankyou_text'
);
// check that thank-you page has appropriate title and message
$this
->
assertTrue
(
$this
->
isTextPresent
(
"Awesome
$title
donation"
)
)
;
$this
->
assertTrue
(
$this
->
isTextPresent
(
"Thank you for your kind contribution to support
$title
"
)
)
;
$this
->
waitForText
(
'page-title'
,
"Awesome
$title
donation"
);
$this
->
waitForText
(
'thankyou_text'
,
"Thank you for your kind contribution to support
$title
"
);
// login
$this
->
webtestLogin
();
...
...
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