Some of the issues got remained which were:

FILE: /var/www/html/tolearn/modules/git/tour_ui/src/Tests/TourUITest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------
23 | ERROR | [ ] Missing @var tag in member variable comment
68 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, colons, question marks, or closing parentheses
----------------------------------------------------------------------------------------------------------------------------

Comments

deepanker_bhalla created an issue. See original summary.

deepanker_bhalla’s picture

Status: Active » Needs review
StatusFileSize
new908 bytes

Fixed the remaining issues.

clemens.tolboom’s picture

Status: Needs review » Needs work
+++ b/src/Tests/TourUITest.php
@@ -20,6 +20,8 @@ class TourUITest extends WebTestBase {
+   * @var array

This is wrong. It should have something like found below [edit] which I search core for the getInfo function. [/edit]

cd core/modules

grep --recursive 'function getInfo' --before 2 *

# gives
contextual/src/Element/ContextualLinks.php- * {@inheritdoc}
contextual/src/Element/ContextualLinks.php- */
contextual/src/Element/ContextualLinks.php: public function getInfo() {
--
contextual/src/Element/ContextualLinksPlaceholder.php- * {@inheritdoc}
contextual/src/Element/ContextualLinksPlaceholder.php- */
contextual/src/Element/ContextualLinksPlaceholder.php: public function getInfo() {
--

+++ b/src/Tests/TourUITest.php
@@ -65,7 +67,7 @@ class TourUITest extends WebTestBase {
+    // > <div class="tour-routes">tour_test.1<br>tour_test.3</div>.

Please change that then to

Results in "

".

to make it a sentence.

deepanker_bhalla’s picture

Hi clemens.tolboom,

I am unable to understand your comment, could you please elaborate more so that i can look after it.

clemens.tolboom’s picture

  1. +++ b/src/Tests/TourUITest.php
    @@ -20,6 +20,8 @@ class TourUITest extends WebTestBase {
    +   *
    +   * @var array
        */
       public static function getInfo() {
         return [
    

    Documentation for getInfo has no @var as I tried to express in my previous comment.

  2. +++ b/src/Tests/TourUITest.php
    @@ -65,7 +67,7 @@ class TourUITest extends WebTestBase {
         // The third column contains the routes.
         // jQuery('table > tbody > tr.tour-test > td:nth(2)').html()
    -    // > <div class="tour-routes">tour_test.1<br>tour_test.3</div>
    +    // > <div class="tour-routes">tour_test.1<br>tour_test.3</div>.
         $elements = $this->xpath('//table/tbody/tr[contains(@class, :class)]/td/div#tour-routes', [':class' => 'tour-test-2']);
    

    Adding a dot to end a sentence which seems like code is not a great idea.

    So we have to make it into a sentence. Maybe something like:

    Running jQuery....
    results in > <div class ....

dhirendra.mishra’s picture

Assigned: Unassigned » dhirendra.mishra

Let me work on this.

clemens.tolboom’s picture

@dhirendra.mishra maybe you can help with #3009733: Fix the tests

dhirendra.mishra’s picture

Assigned: dhirendra.mishra » Unassigned
Status: Needs work » Needs review
StatusFileSize
new924 bytes
new829 bytes

Here is the Updated Patch and interdiff file.

clemens.tolboom’s picture

Status: Needs review » Needs work
+++ b/src/Tests/TourUITest.php
@@ -65,7 +67,7 @@ class TourUITest extends WebTestBase {
     // jQuery('table > tbody > tr.tour-test > td:nth(2)').html()
-    // > <div class="tour-routes">tour_test.1<br>tour_test.3</div>
+    // Results in "> <div class="tour-routes">tour_test.1<br>tour_test.3</div>".
     $elements = $this->xpath('//table/tbody/tr[contains(@class, :class)]/td/div#tour-routes', [':class' => 'tour-test-2']);

Please add "Running jQuery ... "

and lower case 'Results

dhirendra.mishra’s picture

Status: Needs work » Needs review
StatusFileSize
new939 bytes
new697 bytes

Here is the Updated Patch.

clemens.tolboom’s picture

Status: Needs review » Needs work

I meant

"// Running jQuery('table > tbody > tr.tour-test > td:nth(2)').html()
"// results in ">

tour_test.1
tour_test.3

".

or maybe

"// This "jQuery('table > tbody > tr.tour-test > td:nth(2)').html()" results
"// in ">

tour_test.1
tour_test.3

".

Not sure what the best wording is.

Anyways it is comment to explain the XPath after it which I hope to get rid of in a later issue.

dhirendra.mishra’s picture

Status: Needs work » Needs review
StatusFileSize
new1.05 KB
new849 bytes

Hope this time it helps.

clemens.tolboom’s picture

Status: Needs review » Fixed

TNX!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.