Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
989c9d4
Remove patch-leafygreen-button
kraenhansen Sep 30, 2025
16f878b
Bump LG packages
kraenhansen Oct 14, 2025
bed98a6
Fix Button / IconButton links
kraenhansen Sep 30, 2025
4f1c5c1
Fix ActionButton prop types
kraenhansen Sep 30, 2025
c5161bd
Remove defaultValue workaround
kraenhansen Sep 30, 2025
4eb71d4
Fix SmallIconButton props
kraenhansen Sep 30, 2025
040eacd
Fix Modal to adopt LG Modal v20
kraenhansen Sep 30, 2025
bddf993
TEMP: Working around https://jira.mongodb.org/browse/LG-5461
kraenhansen Sep 30, 2025
7bf803b
TEMP work around https://jira.mongodb.org/browse/LG-5587
kraenhansen Sep 30, 2025
111609f
Fix connection-form to work around LG Modal v20
kraenhansen Sep 30, 2025
e3038fa
Fix incorrect React.Ref type argument in generative-ai
kraenhansen Sep 30, 2025
02a5f4e
Update generative-ai to adopt marketing-modal v7
kraenhansen Sep 30, 2025
772e08e
Workaround for React.ComponentProps<typeof Button> no longer working
kraenhansen Sep 30, 2025
3d5fea2
Fix compass-import-export to work around LG modal v20
kraenhansen Sep 30, 2025
2019b3b
TEMP work around https://jira.mongodb.org/browse/LG-5590
kraenhansen Oct 1, 2025
cb119ae
TEMP work around https://jira.mongodb.org/browse/LG-5589
kraenhansen Oct 1, 2025
aff3bdc
Update compass-welcome to adopt marketing-modal v7
kraenhansen Nov 5, 2025
0b1803b
Update compass-explain-plan to LG Modal v20
kraenhansen Oct 1, 2025
c62c172
Fix issue passing Popover ref into IconButton
kraenhansen Oct 1, 2025
84081e6
Add autoFocus prop to compass-editor
kraenhansen Oct 1, 2025
3a4e236
Fix compass-crud to adopt LG modal v20
kraenhansen Oct 1, 2025
aa9c8cf
Update compass-schema to LG Modal v20
kraenhansen Oct 1, 2025
cd6dd90
Add workaround for jsdom missing HTMLDialogElement support
kraenhansen Oct 2, 2025
10c1909
Print progress in changed script
kraenhansen Oct 2, 2025
b2cbf2d
Pin nwsapi at 2.2.12 to work around failures to parse colons in test-…
kraenhansen Oct 14, 2025
80990e1
Assert functional rename of KMS provider
kraenhansen Oct 7, 2025
44c8f27
Work around change in LG "modal" no longer removing dom elements when…
kraenhansen Oct 7, 2025
ddbbd9a
Fix type error in e2e-tests
kraenhansen Oct 7, 2025
f404da5
Update generative-ai to adopt LG modal v20
kraenhansen Oct 7, 2025
97c21ce
Fix fullScreen prop on derived Modal
kraenhansen Oct 7, 2025
5848f24
Remove use of deprecated backdropClassName
kraenhansen Oct 7, 2025
813ee78
Remove workaround for MarketingModal button disabling
kraenhansen Oct 7, 2025
0ec572f
Fix check failure in guide-cue spec
kraenhansen Oct 7, 2025
ceb043f
Fix remaining components tests
kraenhansen Oct 7, 2025
b5c9168
Revert workaround for LG-5589
kraenhansen Oct 8, 2025
c8fc43c
Revert workaround for LG-5593
kraenhansen Oct 8, 2025
203c4cf
Use named over default exports
kraenhansen Oct 14, 2025
978881e
Removed extraneous ts-expect-error
kraenhansen Nov 5, 2025
f4c4f25
Revert workaround for LG-5587
kraenhansen Nov 5, 2025
b0cc3cd
Update to account for breaking change in select v16.2.0
kraenhansen Nov 5, 2025
f35840e
Ran dedupe and updated dependencies again
kraenhansen Nov 5, 2025
f06c40f
Hoisting copyable
kraenhansen Nov 5, 2025
24c5eed
Revert "Work around change in LG "modal" no longer removing dom eleme…
kraenhansen Nov 5, 2025
4db143a
Update existing tests to handle dialog elements remaining in the DOM
kraenhansen Nov 5, 2025
161dbb8
Wait for crud elements to become visible before interacting
kraenhansen Nov 6, 2025
58caaad
Update existing tests to handle changes in Select
kraenhansen Nov 6, 2025
388351d
Update databases-collections to allow immediate removal of the heading
kraenhansen Nov 6, 2025
b588912
Update e2e tests to use waitForDisplayed over waitForExist as this is…
kraenhansen Nov 6, 2025
7320214
Fix index creation interactions with ComboBox
kraenhansen Nov 7, 2025
33a40ab
Update e2e tests removing [role=dialog] from confirm dialog selectors
kraenhansen Nov 7, 2025
e87c62f
Update e2e tests to use setComboBoxValue instead of setValueVisible w…
kraenhansen Nov 7, 2025
e64ec81
Update e2e tests to wait for bulk delete modal to disappear
kraenhansen Nov 7, 2025
34032d5
Update e2e tests to expect chat messages to not be displayed when dec…
kraenhansen Nov 7, 2025
37a5984
Update e2e tests to expect $scoreFusion already from server v8.2
kraenhansen Nov 7, 2025
07a7276
Update e2e tests to wait for connection form to be non-clickable in a…
kraenhansen Nov 7, 2025
6e55040
Update e2e tests to fix modal regressions
kraenhansen Nov 10, 2025
54ad32e
Screenshot if connection form fails to setup default connections
kraenhansen Nov 10, 2025
e0d5f3d
Disable pointer events on a closed modal
kraenhansen Nov 10, 2025
1d994ac
Disable auto-focus on confirmation modal children by default
kraenhansen Nov 10, 2025
fad2c2f
Update ConnectDropdownButton to reflect change in SplitButton
kraenhansen Nov 10, 2025
759e205
Update e2e test to use a different selector for menu items in "CSV fi…
kraenhansen Nov 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,25 @@ Object.assign(tabbable, {
origTabbable.isTabbable(node, { ...options, displayCheck: 'none' }),
});

// Workaround for missing HTMLDialogElement in jsdom
// See https://github.com/jsdom/jsdom/issues/3294

Object.assign(HTMLDialogElement.prototype, {
show() {
this.open = true;
this.style.display = '';
},
showModal() {
this.open = true;
this.style.display = '';
},
close(returnValue) {
this.open = false;
this.returnValue = returnValue;
this.style.display = 'none';
},
});

// leafygreen (through `clipboard` library) uses deprecated API check that is
// not working in jsdom if copy / paste APIs are supported
if (!window.document.queryCommandSupported) {
Expand Down
41 changes: 41 additions & 0 deletions configs/testing-library-compass/src/assertions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Assertion, util } from 'chai';

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace Chai {
interface Assertion {
/** Asserts that a dialog is open */
get open(): Assertion;
/** Asserts that a dialog is closed */
get closed(): Assertion;
}
}
}

util.addProperty(
Assertion.prototype,
'open',
function (this: typeof Assertion) {
const obj = util.flag(this, 'object');
new Assertion(obj).to.be.instanceof(HTMLDialogElement);
new Assertion(obj as HTMLDialogElement).has.property(
'open',
true,
'Expected dialog to be open'
);
}
);

util.addProperty(
Assertion.prototype,
'closed',
function (this: typeof Assertion) {
const obj = util.flag(this, 'object');
new Assertion(obj).to.be.instanceof(HTMLDialogElement);
new Assertion(obj as HTMLDialogElement).has.property(
'open',
false,
'Expected dialog to be closed'
);
}
);
2 changes: 2 additions & 0 deletions configs/testing-library-compass/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ import { expect } from 'chai';
import { Provider } from 'react-redux';
import ConnectionString from 'mongodb-connection-string-url';

import './assertions';

function wait(ms: number) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
Expand Down
Loading
Loading