8 $this->assertTextPresent(
'Welcome');
13 $this->open(
'?r=site/contact');
14 $this->assertTextPresent(
'Contact Us');
15 $this->assertElementPresent(
'name=ContactForm[name]');
17 $this->type(
'name=ContactForm[name]',
'tester');
18 $this->type(
'name=ContactForm[email]',
'tester@example.com');
19 $this->type(
'name=ContactForm[subject]',
'test subject');
20 $this->click(
"//input[@value='Submit']");
21 $this->waitForTextPresent(
'Body cannot be blank.');
28 if($this->isTextPresent(
'Logout'))
29 $this->clickAndWait(
'link=Logout (demo)');
32 $this->clickAndWait(
'link=Login');
33 $this->assertElementPresent(
'name=LoginForm[username]');
34 $this->type(
'name=LoginForm[username]',
'demo');
35 $this->click(
"//input[@value='Login']");
36 $this->waitForTextPresent(
'Password cannot be blank.');
37 $this->type(
'name=LoginForm[password]',
'demo');
38 $this->clickAndWait(
"//input[@value='Login']");
39 $this->assertTextNotPresent(
'Password cannot be blank.');
40 $this->assertTextPresent(
'Logout');
43 $this->assertTextNotPresent(
'Login');
44 $this->clickAndWait(
'link=Logout (demo)');
45 $this->assertTextPresent(
'Login');