title: How do I wait for a page to transition after checking the link?
body: <p>I'm trying to get CodeceptJS to wait for a page to load after clicking a link, but I can't get it to do so gracefully.</p>
  <p>My Ionic pages:</p>
  <p><strong>Homepage</strong></p>
  <pre><code>  &lt;IonPage&gt;
      &lt;IonHeader&gt;
        &lt;IonToolbar&gt;
          &lt;IonButtons slot=&quot;start&quot;&gt;
            &lt;IonBackButton /&gt;
          &lt;/IonButtons&gt;
          &lt;IonTitle&gt;Main page&lt;/IonTitle&gt;
        &lt;/IonToolbar&gt;
      &lt;/IonHeader&gt;
      &lt;IonContent&gt;
        &lt;Link to=&quot;reset-password&quot;&gt;Reset Password&lt;/Link&gt;
      &lt;/IonContent&gt;
    &lt;/IonPage&gt;
  </code></pre>
  <p><strong>Reset password page</strong></p>
  <pre><code>  &lt;IonPage&gt;
      &lt;IonHeader&gt;
        &lt;IonToolbar&gt;
          &lt;IonButtons slot=&quot;start&quot;&gt;
            &lt;IonBackButton /&gt;
          &lt;/IonButtons&gt;
          &lt;IonTitle&gt;Reset your password&lt;/IonTitle&gt;
        &lt;/IonToolbar&gt;
      &lt;/IonHeader&gt;
      &lt;IonContent&gt;
        Here is a form.
      &lt;/IonContent&gt;
    &lt;/IonPage&gt;
  </code></pre>
  <p>My codeceptJS test (using Playwright):</p>
  <pre><code>Scenario('Reset password', async ({ I }) =&gt; {
      I.amOnPage('/');
      I.wait('ion-button');
      I.click('Reset Password');
      // Wait for URL to change; doesn't help.
      I.waitInUrl('/reset-path')
      // Wait for &quot;Reset Password&quot; link to disappear; doesn't help.
      I.waitForInvisible('Reset Password');
      // Wait for new title text to appear; doesn't help.
      I.waitForText('Reset your password');
      // Simply wait 1 second; this is the only way to make sure the page is loaded.
      I.wait(1);
      const titleText = await I.grabTextFrom('ion-toolbar ion-title');
      assert.strictEqual('Reset your password', titleText);
  });
  </code></pre>
  <p>If I don't wait for 1 second, then I get the following error:</p>
  <pre><code>      Expected values to be strictly equal:
  + actual - expected
  
  + 'Reset your password'
  - 'Main page'
  </code></pre>
  <p>So even though I have told CodeceptJS to wait until the new title text is visible, it somehow sees the old title text unless I hardcode a wait time. Surely I am doing this wrong (just started with CodeceptJS today), and there is a way to gracefully force it to wait for the Ionic page transition to occur.  How can I do that?</p>