Skip to content
Snippets Groups Projects
Commit 12e59a0d authored by Ghislain Loas's avatar Ghislain Loas
Browse files

hotline #66007 fix failures

parent f246dd52
Branches
Tags
2 merge requests!2382Hotline master,!2375hotline #66007 :replace js rating by compatible js with jquery 3.2
Pipeline #2762 passed with stage
in 20 minutes and 3 seconds
......@@ -75,7 +75,7 @@ class AbonneControllerAvisNoticeWithoutAvisTest extends AbonneControllerAvisTest
public function setUp() {
parent::setUp();
$this->xpath = new Storm_Test_XPath();
$this->dispatch('/opac/abonne/avis/id_notice/53');
$this->dispatch('/opac/abonne/avis/id_notice/53/render/popup');
$this->json = json_decode($this->_response->getbody());
}
......@@ -89,13 +89,15 @@ class AbonneControllerAvisNoticeWithoutAvisTest extends AbonneControllerAvisTest
/** @test */
public function inputAvisSignatureShouldContainFloFlo() {
$this->xpath->assertXPath($this->json->content,"//input[@name='avisSignature'][@value='FloFlo']",$this->_response->getBody());
$this->xpath->assertXPath($this->json->content,
"//input[@name='avisSignature'][@value='FloFlo']");
}
/** @test */
public function formActionShouldBeAvisId53() {
$this->xpath->assertXPath($this->json->content,"//form[@action='/abonne/avis/id_notice/53']");
$this->xpath->assertXPath($this->json->content,
"//form[contains(@action, '/abonne/avis/id_notice/53')]");
}
}
......@@ -132,7 +134,7 @@ class AbonneControllerAvisInvalidNoticeAvisSaveTest extends AbonneControllerAvi
$this->getRequest()
->setMethod('POST')
->setPost($data);
$this->dispatch('/opac/abonne/avis/id_notice/53');
$this->dispatch('/opac/abonne/avis/id_notice/53/render/popup');
$this->json = json_decode($this->_response->getbody());
$this->assertController('abonne');
$this->assertAction('avis');
......@@ -150,7 +152,7 @@ class AbonneControllerAvisInvalidNoticeAvisSaveTest extends AbonneControllerAvi
$this->getRequest()
->setMethod('POST')
->setPost($data);
$this->dispatch('/opac/abonne/avis/id_notice/53');
$this->dispatch('/opac/abonne/avis/id_notice/53/render/popup');
$this->json = json_decode($this->_response->getbody());
$this->assertController('abonne');
$this->assertAction('avis');
......@@ -219,7 +221,7 @@ class AbonneControllerAvisNoticeWithAvisTest extends AbonneControllerAvisTestCas
'note' => 4,
'clef_oeuvre' => 'POTTER',
'user' => $this->florence]);
$this->dispatch('/opac/abonne/avis/id_notice/53');
$this->dispatch('/opac/abonne/avis/id_notice/53/render/popup');
$this->_xpath = new Storm_Test_XPath();
$this->_json = json_decode($this->_response->getBody());
}
......@@ -234,20 +236,24 @@ class AbonneControllerAvisNoticeWithAvisTest extends AbonneControllerAvisTestCas
$this->_xpath->assertXPathContentContains($this->_json->content,'//form//textarea[@name="avisTexte"]','Excellent livre',$this->_response->getBody());
}
public function testSignatureIsFloFlo() {
$this->_xpath->assertXPath($this->_json->content,"//input[@name='avisSignature'][@value='FloFlo']");
}
public function testEntete() {
$this->_xpath->assertXPath($this->_json->content,"//input[@name='avisEntete'][@value='Le sorcier super mimi']");
}
public function testNote() {
$this->_xpath->assertXPath($this->_json->content,"//select[@name='avisNote']/option[@value='4'][@selected='1']");
}
public function testFormActionIsAvis() {
$this->_xpath->assertXPath($this->_json->content,"//form[@action='/abonne/avis/id_notice/53/id/12']");
$this->_xpath->assertXPath($this->_json->content,"//form[contains(@action, '/abonne/avis/id_notice/53/render/popup/id/12')]");
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment