title: Laravel test order of elements on page
body: <p>I want to test whether my sorting works properly with Laravel TestCase. I have simple test page:</p>
  
  <pre><code>&lt;div id="values"&gt;
      @foreach(['Value1', 'Value2'] as $value)
          &lt;div class="test-class"&gt;{{$value}}&lt;/div&gt;
      @endforeach
  &lt;/div&gt;
  </code></pre>
  
  <p>And now i want to test if the first <strong>.test-class</strong> element contains <em>'Value1'</em>. I had tried different approaches, and had no success. Here are first one:</p>
  
  <pre><code> public function testSorting()
  {
      $this-&gt;visit(route('dummy'));
      $this-&gt;see('Value1');
      $this-&gt;seeInElement('.test-class:first-of-type', 'Value2');
  }
  </code></pre>
  
  <p>This one resulted in exception:</p>
  
  <pre><code>Symfony\Component\CssSelector\Exception\ExpressionErrorException: "*:first-of-type" is not implemented.
  </code></pre>
  
  <p>Then I tried </p>
  
  <pre><code>$this-&gt;seeInElement('#values:first-child', 'Value2');
  </code></pre>
  
  <p>and my test when green. But it should be red, because first child is <em>'Value1'</em>. It totally ignored <em>':first-child'</em> part.</p>
  
  <p>Then I tried </p>
  
  <pre><code>$this-&gt;seeInElement('#values:nth-child(1)', 'Value2');
  </code></pre>
  
  <p>and got green too. So this approach doesn't work either.</p>
  
  <p>Have I missed something? Or there is no way to test order of elements on page with Laravel tests?</p>