Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Comptoir
Comptoir-srv
Commits
96dd4b3b
Commit
96dd4b3b
authored
Jun 22, 2020
by
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
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/Template/Api/V1/Softwares/view.ctp
View file @
96dd4b3b
...
...
@@ -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>
...
...
tests/TestCase/Controller/Api/V1/TaxonomysSoftwaresControllerTest.php
View file @
96dd4b3b
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment