Commit 96dd4b3b authored by Fabrice Gangler's avatar Fabrice Gangler 🎨
Browse files

TEST(software page): check case when no mapping record is available

Refs: #935
parent f3ac3f75
Pipeline #10181 passed with stage
in 3 minutes and 47 seconds
......@@ -62,7 +62,7 @@ $this->assign('title', __d("Softwares", "{0}", $software->softwarename));
"Taxonomy.softwarePage.sectionNoRecord",
$software->softwarename
);
echo "<p>$mappingNoRecord</p>";
echo "<p id=\"mappingForSoftware-noRecord\">$mappingNoRecord</p>";
}
?>
</section>
......
......@@ -215,6 +215,7 @@ class TaxonomysSoftwaresControllerTest extends ApiIntegrationTestCase
// on software page (1)
$r = $this->checkUrlOk($softwareUrl, ['html'], false);
$html = $r['html']['data'];
$this->assertcontains("id=\"mappingForSoftware-noRecord\"", $html);
$this->assertNotContains("id=\"mappingForSoftware-$softwareId\"", $html);
$this->assertNotContains("class=\"linkMapping-taxonSoftware\"", $html);
$this->assertNotContains("id=\"linkMapping-taxon-$taxonIdA-Software-$softwareId\"", $html);
......@@ -253,6 +254,7 @@ class TaxonomysSoftwaresControllerTest extends ApiIntegrationTestCase
// on software page (2)
$r = $this->checkUrlOk($softwareUrl, ['html'], false);
$html = $r['html']['data'];
$this->assertNotContains("id=\"mappingForSoftware-noRecord\"", $html);
$this->assertContains("id=\"mappingForSoftware-$softwareId\"", $html);
$this->assertContains("class=\"linkMapping-taxonSoftware\"", $html);
$this->assertContains("id=\"linkMapping-taxon-$taxonIdA-Software-$softwareId\"", $html);
......@@ -301,6 +303,7 @@ class TaxonomysSoftwaresControllerTest extends ApiIntegrationTestCase
// on software page (3)
$r = $this->checkUrlOk($softwareUrl, ['html'], false);
$html = $r['html']['data'];
$this->assertNotContains("id=\"mappingForSoftware-noRecord\"", $html);
$this->assertContains("id=\"mappingForSoftware-$softwareId\"", $html);
$this->assertContains("class=\"linkMapping-taxonSoftware\"", $html);
$this->assertNotContains("id=\"linkMapping-taxon-$taxonIdA-Software-$softwareId\"", $html);
......@@ -347,6 +350,7 @@ class TaxonomysSoftwaresControllerTest extends ApiIntegrationTestCase
// on software page (4)
$r = $this->checkUrlOk($softwareUrl, ['html'], false);
$html = $r['html']['data'];
$this->assertContains("id=\"mappingForSoftware-noRecord\"", $html);
$this->assertNotContains("id=\"mappingForSoftware-$softwareId\"", $html);
$this->assertNotContains("class=\"linkMapping-taxonSoftware\"", $html);
$this->assertNotContains("id=\"linkMapping-taxon-$taxonIdA-Software-$softwareId\"", $html);
......
Markdown is supported
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