Skip to content

Commit a67b30e

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents 08e25b9 + 5c8b2ac commit a67b30e

File tree

13 files changed

+248
-329
lines changed

13 files changed

+248
-329
lines changed

THIRD-PARTY-NOTICES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **Mongodb Compass**.
2-
This document was automatically generated on Sun Mar 30 2025.
2+
This document was automatically generated on Mon Mar 31 2025.
33

44
## List of dependencies
55

@@ -551,7 +551,7 @@ This document was automatically generated on Sun Mar 30 2025.
551551
| **[system-ca](#f7020e15c3acda122c176b63132660540ac26981c7037d110fc2896e3551ab19)** | 2.0.1 | Apache-2.0 |
552552
| **[tabbable](#0ebe87140b76c7f2135bbd5099e7973a5ec2b5d8fe2bec8e272608cf0b3f396a)** | 5.3.3 | MIT |
553553
| **[tabbable](#ada26e0fb4c29e360f21411870400a662ae4e21dae15f33a5707c2ee1d89689b)** | 6.2.0 | MIT |
554-
| **[tar-fs](#8e5bae5073977abd61cb5549abc7581354454558aedf4a4002b91e6fd7b9830d)** | 2.1.1 | MIT |
554+
| **[tar-fs](#66a8b0120f1a0cb963d8c92d510ac0c9df2c0db3cad61c3c90fb5ec84e40bc09)** | 2.1.2 | MIT |
555555
| **[tar-stream](#5605712784129d10d2559e12f8031603f0cf4e5ff206f09356e4bf1dc5ab1168)** | 1.6.2 | MIT |
556556
| **[text-table](#408475075eb207dd5ae8858365d5b39a25bebe2b757601c43164cec36f315b23)** | 0.2.0 | MIT |
557557
| **[tiny-emitter](#43eb8db7345f328bbd03f484accbed64a06fa649df3ab59db7492e65d9361def)** | 2.1.0 | MIT |
@@ -37887,9 +37887,9 @@ License files:
3788737887
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3788837888
SOFTWARE.
3788937889

37890-
<a id="8e5bae5073977abd61cb5549abc7581354454558aedf4a4002b91e6fd7b9830d"></a>
37890+
<a id="66a8b0120f1a0cb963d8c92d510ac0c9df2c0db3cad61c3c90fb5ec84e40bc09"></a>
3789137891

37892-
### [tar-fs](https://www.npmjs.com/package/tar-fs) (version 2.1.1)
37892+
### [tar-fs](https://www.npmjs.com/package/tar-fs) (version 2.1.2)
3789337893

3789437894
License tags: MIT
3789537895

docs/tracking-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
> the tracking plan for the specific Compass version you can use the following
77
> URL: `https://github.com/mongodb-js/compass/blob/<compass version>/docs/tracking-plan.md`
88
9-
Generated on Sun, Mar 30, 2025
9+
Generated on Mon, Mar 31, 2025
1010

1111
## Table of Contents
1212

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-components/src/hooks/use-confirmation.spec.tsx

Lines changed: 20 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {
2-
cleanup,
32
render,
43
screen,
54
waitFor,
@@ -10,85 +9,30 @@ import {
109
import { expect } from 'chai';
1110
import React from 'react';
1211

13-
import {
14-
ConfirmationModalArea,
15-
useConfirmationModal,
16-
showConfirmation,
17-
} from './use-confirmation';
18-
19-
const OpenConfirmationModalButton = () => {
20-
const { showConfirmation } = useConfirmationModal();
21-
return (
22-
<button
23-
type="button"
24-
onClick={() =>
25-
void showConfirmation({
26-
title: 'Are you sure?',
27-
description: 'This action can not be undone.',
28-
buttonText: 'Yes',
29-
})
30-
}
31-
>
32-
Open Modal
33-
</button>
34-
);
35-
};
12+
import { ConfirmationModalArea, showConfirmation } from './use-confirmation';
3613

3714
describe('use-confirmation', function () {
38-
afterEach(cleanup);
39-
40-
context('useConfirmationModal hook', function () {
41-
let modal: HTMLElement;
42-
beforeEach(function () {
43-
render(
44-
<ConfirmationModalArea>
45-
<OpenConfirmationModalButton />
46-
</ConfirmationModalArea>
47-
);
48-
49-
userEvent.click(screen.getByText('Open Modal'));
50-
modal = screen.getByTestId('confirmation-modal');
51-
expect(modal).to.exist;
52-
});
53-
54-
it('renders modal contents', function () {
55-
expect(within(modal).getByText('Are you sure?')).to.exist;
56-
expect(
57-
within(modal).getByText('This action can not be undone.')
58-
).to.exist;
59-
expect(within(modal).getByText('Yes')).to.exist;
60-
expect(within(modal).getByText('Cancel')).to.exist;
61-
});
62-
63-
it('handles cancel action', async function () {
64-
userEvent.click(within(modal).getByText('Cancel'));
65-
await waitForElementToBeRemoved(() =>
66-
screen.getByTestId('confirmation-modal')
67-
);
68-
});
69-
70-
it('handles confirm action', async function () {
71-
userEvent.click(within(modal).getByText('Yes'));
72-
await waitForElementToBeRemoved(() =>
73-
screen.getByTestId('confirmation-modal')
74-
);
75-
});
76-
});
77-
7815
context('showConfirmation global function', function () {
7916
let modal: HTMLElement;
8017
let response: Promise<boolean>;
8118
beforeEach(async function () {
8219
render(
8320
<ConfirmationModalArea>
84-
<div />
21+
<button
22+
type="button"
23+
onClick={() => {
24+
response = showConfirmation({
25+
title: 'Are you sure?',
26+
description: 'This action can not be undone.',
27+
buttonText: 'Yes',
28+
});
29+
}}
30+
>
31+
Open Modal
32+
</button>
8533
</ConfirmationModalArea>
8634
);
87-
response = showConfirmation({
88-
title: 'Are you sure?',
89-
description: 'This action can not be undone.',
90-
buttonText: 'Yes',
91-
});
35+
userEvent.click(screen.getByText('Open Modal'));
9236
await waitFor(() => {
9337
modal = screen.getByTestId('confirmation-modal');
9438
});
@@ -105,12 +49,18 @@ describe('use-confirmation', function () {
10549

10650
it('handles cancel action', async function () {
10751
userEvent.click(within(modal).getByText('Cancel'));
52+
await waitForElementToBeRemoved(() =>
53+
screen.getByTestId('confirmation-modal')
54+
);
10855
const confirmed = await response;
10956
expect(confirmed).to.be.false;
11057
});
11158

11259
it('handles confirm action', async function () {
11360
userEvent.click(within(modal).getByText('Yes'));
61+
await waitForElementToBeRemoved(() =>
62+
screen.getByTestId('confirmation-modal')
63+
);
11464
const confirmed = await response;
11565
expect(confirmed).to.be.true;
11666
});

0 commit comments

Comments
 (0)