Skip to content

Commit 55ef759

Browse files
authored
fix: readd end table for older versions of cypress (#820)
1 parent ed6f760 commit 55ef759

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Diff for: app/commands/misc.html

+37
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,43 @@ <h1>Misc</h1>
7070
<div class="container content-container">
7171
<div id="misc">
7272
<div class="row">
73+
<div class="col-xs-7">
74+
<h4 id="end"><a href="https://on.cypress.io/end">.end()</a></h4>
75+
<p>To end the command chain, use the <a href="https://on.cypress.io/end"><code>.end()</code></a> command.</p>
76+
<pre><code class="javascript">// cy.end is useful when you want to end a chain of commands
77+
// and force Cypress to re-query from the root element
78+
cy.get('.misc-table').within(() => {
79+
// ends the current chain and yields null
80+
cy.contains('Cheryl').click().end()
81+
82+
// queries the entire table again
83+
cy.contains('Charles').click()
84+
})</code></pre>
85+
</div>
86+
<div class="col-xs-5">
87+
<div class="well">
88+
<table class="table table-bordered misc-table">
89+
<thead>
90+
<tr>
91+
<th>Table</th>
92+
</tr>
93+
</thead>
94+
<tbody>
95+
<tr>
96+
<td>User: Cheryl</td>
97+
</tr>
98+
<tr>
99+
<td>User: Charles</td>
100+
</tr>
101+
<tr>
102+
<td>User: Darryl</td>
103+
</tr>
104+
</tbody>
105+
</table>
106+
</div>
107+
</div>
108+
109+
<div class="col-xs-12"><hr></div>
73110
<div class="col-xs-12">
74111
<h4 id="exec"><a href="https://on.cypress.io/exec">cy.exec()</a></h4>
75112
<p>To execute a system command, use the <a href="https://on.cypress.io/exec"><code>cy.exec()</code></a> command.</p>

0 commit comments

Comments
 (0)