updated snap.
This commit is contained in:
parent
cb15ef6f22
commit
9bb07f5098
|
@ -174,6 +174,11 @@ exports[`TreeNodeComponent renders a simple node (sorted children, expanded) 1`]
|
|||
<CustomizedIconButton
|
||||
ariaLabel="More options"
|
||||
className="treeMenuEllipsis"
|
||||
elementRef={
|
||||
Object {
|
||||
"current": null,
|
||||
}
|
||||
}
|
||||
menuIconProps={
|
||||
Object {
|
||||
"iconName": "More",
|
||||
|
@ -399,6 +404,11 @@ exports[`TreeNodeComponent renders sorted children, expanded, leaves and parents
|
|||
<CustomizedIconButton
|
||||
ariaLabel="More options"
|
||||
className="treeMenuEllipsis"
|
||||
elementRef={
|
||||
Object {
|
||||
"current": null,
|
||||
}
|
||||
}
|
||||
menuIconProps={
|
||||
Object {
|
||||
"iconName": "More",
|
||||
|
|
|
@ -52,7 +52,9 @@ describe("Delete Collection Confirmation Pane", () => {
|
|||
|
||||
describe("shouldRecordFeedback()", () => {
|
||||
it("should return true if last collection and database does not have shared throughput else false", () => {
|
||||
const wrapper = shallow(<DeleteCollectionConfirmationPane refreshDatabases={() => undefined} />);
|
||||
const wrapper = shallow(
|
||||
<DeleteCollectionConfirmationPane refreshDatabases={() => undefined} lastFocusedElement={undefined} />,
|
||||
);
|
||||
expect(wrapper.exists(".deleteCollectionFeedback")).toBe(false);
|
||||
|
||||
const database = { id: ko.observable("testDB") } as Database;
|
||||
|
@ -109,7 +111,9 @@ describe("Delete Collection Confirmation Pane", () => {
|
|||
});
|
||||
|
||||
it("should call delete collection", () => {
|
||||
const wrapper = mount(<DeleteCollectionConfirmationPane refreshDatabases={() => undefined} />);
|
||||
const wrapper = mount(
|
||||
<DeleteCollectionConfirmationPane refreshDatabases={() => undefined} lastFocusedElement={undefined} />,
|
||||
);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
|
||||
expect(wrapper.exists("#confirmCollectionId")).toBe(true);
|
||||
|
@ -126,7 +130,9 @@ describe("Delete Collection Confirmation Pane", () => {
|
|||
});
|
||||
|
||||
it("should record feedback", async () => {
|
||||
const wrapper = mount(<DeleteCollectionConfirmationPane refreshDatabases={() => undefined} />);
|
||||
const wrapper = mount(
|
||||
<DeleteCollectionConfirmationPane refreshDatabases={() => undefined} lastFocusedElement={undefined} />,
|
||||
);
|
||||
expect(wrapper.exists("#confirmCollectionId")).toBe(true);
|
||||
wrapper
|
||||
.find("#confirmCollectionId")
|
||||
|
|
|
@ -37,7 +37,7 @@ export const DeleteCollectionConfirmationPane: FunctionComponent<DeleteCollectio
|
|||
|
||||
const collectionName = getCollectionName().toLocaleLowerCase();
|
||||
const paneTitle = "Delete " + collectionName;
|
||||
const lastItemElement = lastFocusedElement.current;
|
||||
const lastItemElement = lastFocusedElement?.current;
|
||||
|
||||
const onSubmit = async (): Promise<void> => {
|
||||
const collection = useSelectedNode.getState().findSelectedCollection();
|
||||
|
|
Loading…
Reference in New Issue