Skip to content

Commit 837c4ad

Browse files
committed
apply feedback suggestions
1 parent 485fc33 commit 837c4ad

File tree

4 files changed

+22
-26
lines changed

4 files changed

+22
-26
lines changed

content/api/commands/clearalllocalstorage.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
title: clearAllLocalStorage
33
---
44

5-
Clear localStorage data for all origins with which the test has interacted.
5+
Clear
6+
[`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)
7+
data for all origins with which the test has interacted.
68

79
<Alert type="warning">
810

911
Cypress automatically runs this command _before_ each test to prevent state from
10-
being shared across tests. You shouldn't need to use this command unless you're
11-
using it to clear localStorage inside a single test.
12+
being shared across tests when
13+
[test isolation](/guides/core-concepts/writing-and-organizing-tests#Test-Isolation)
14+
is `on`. You shouldn't need to use this command unless you're using it to clear
15+
localStorage inside a single test or test isolation is `off`.
1216

1317
</Alert>
1418

@@ -43,14 +47,6 @@ Pass in an options object to change the default behavior of
4347
- `cy.clearAllLocalStorage()` yields `null`.
4448
- `cy.clearAllLocalStorage()` cannot be chained further.
4549

46-
## Examples
47-
48-
### Clear all localStorage
49-
50-
```javascript
51-
cy.clearAllLocalStorage()
52-
```
53-
5450
## Rules
5551

5652
### Requirements [<Icon name="question-circle"/>](/guides/core-concepts/introduction-to-cypress#Chains-of-Commands)

content/api/commands/clearallsessionstorage.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
title: clearAllSessionStorage
33
---
44

5-
Clear data in sessionStorage for all origins with which the test has interacted.
5+
Clear
6+
[`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)
7+
data for all origins with which the test has interacted.
68

79
<Alert type="warning">
810

911
Cypress automatically runs this command _before_ each test to prevent state from
10-
being shared across tests. You shouldn't need to use this command unless you're
11-
using it to clear sessionStorage inside a single test.
12+
being shared across tests when
13+
[test isolation](/guides/core-concepts/writing-and-organizing-tests#Test-Isolation)
14+
is `on`. You shouldn't need to use this command unless you're using it to clear
15+
localStorage inside a single test or test isolation is `off`.
1216

1317
</Alert>
1418

@@ -43,14 +47,6 @@ Pass in an options object to change the default behavior of
4347
- `cy.clearAllSessionStorage()` yields `null`.
4448
- `cy.clearAllSessionStorage()` cannot be chained further.
4549

46-
## Examples
47-
48-
### Clear all sessionStorage
49-
50-
```javascript
51-
cy.clearAllSessionStorage()
52-
```
53-
5450
## Rules
5551

5652
### Requirements [<Icon name="question-circle"/>](/guides/core-concepts/introduction-to-cypress#Chains-of-Commands)

content/api/commands/getalllocalstorage.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
title: getAllLocalStorage
33
---
44

5-
Get data in localStorage for all origins with which the test has interacted.
5+
Get
6+
[`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage)
7+
data for all origins with which the test has interacted.
68

79
## Syntax
810

@@ -33,7 +35,7 @@ Pass in an options object to change the default behavior of
3335
### Yields [<Icon name="question-circle"/>](/guides/core-concepts/introduction-to-cypress#Subject-Management)
3436

3537
`cy.getAllLocalStorage()` yields an object where the keys are origins and the
36-
values are key-value pairs of localStorage data.
38+
values are key-value pairs of `localStorage` data.
3739

3840
For example, if `key1` is set to `value1` on `https://example.com` and `key2` is
3941
set to `value2` on `https://other.com`, `cy.getAllLocalStorage()` will yield:

content/api/commands/getallsessionstorage.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
title: getAllSessionStorage
33
---
44

5-
Get data in sessionStorage for all origins with which the test has interacted.
5+
Get
6+
[`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)
7+
data for all origins with which the test has interacted.
68

79
## Syntax
810

@@ -33,7 +35,7 @@ Pass in an options object to change the default behavior of
3335
### Yields [<Icon name="question-circle"/>](/guides/core-concepts/introduction-to-cypress#Subject-Management)
3436

3537
`cy.getAllSessionStorage()` yields an object where the keys are origins and the
36-
values are key-value pairs of sessionStorage data.
38+
values are key-value pairs of `sessionStorage` data.
3739

3840
For example, if `key1` is set to `value1` on `https://example.com` and `key2` is
3941
set to `value2` on `https://other.com`, `cy.getAllSessionStorage()` will yield:

0 commit comments

Comments
 (0)