Fix bug with markup. Simplify code.

This commit is contained in:
Laurent Nguyen
2024-05-16 09:47:40 +02:00
parent 6dd02c0e51
commit 04989c6e1b
4 changed files with 12 additions and 10 deletions

View File

@@ -2371,7 +2371,7 @@ a:link {
overflow-y: scroll;
}
.t abs {
.tabs {
position: relative;
margin: 15px 0 25px 0;
display: table;

View File

@@ -64,11 +64,17 @@ export const deleteDocuments = async (collection: CollectionBase, documentIds: D
const allResult = await Promise.all(promiseArray);
const flatAllResult = Array.prototype.concat.apply([], allResult);
logConsoleInfo(`Successfully deleted ${getEntityName(flatAllResult.length > 1)}: ${flatAllResult.length} out of ${nbDocuments}`);
logConsoleInfo(
`Successfully deleted ${getEntityName(flatAllResult.length > 1)}: ${flatAllResult.length} out of ${nbDocuments}`,
);
// TODO: handle case result.length != nbDocuments
return flatAllResult;
} catch (error) {
handleError(error, "DeleteDocuments", `Error while deleting ${documentIds.length} ${getEntityName(documentIds.length > 1)}`);
handleError(
error,
"DeleteDocuments",
`Error while deleting ${documentIds.length} ${getEntityName(documentIds.length > 1)}`,
);
throw error;
} finally {
clearMessage();

View File

@@ -147,7 +147,7 @@ describe("Documents tab (Mongo API)", () => {
});
it("renders by default the first document", async () => {
// expect(wrapper.findWhere((node) => node.text().includes(PROPERTY_VALUE)).exists()).toBeTruthy();
expect(wrapper.findWhere((node) => node.text().includes(PROPERTY_VALUE)).exists()).toBeTruthy();
});
it("default buttons", async () => {

View File

@@ -13,12 +13,8 @@ describe("DocumentsTableComponent", () => {
{ [ID_HEADER]: "2", [PARTITION_KEY_HEADER]: "pk2" },
{ [ID_HEADER]: "3", [PARTITION_KEY_HEADER]: "pk3" },
],
onItemClicked: (index: number): void => {
index;
},
onSelectedRowsChange: (selectedItemsIndices: Set<TableRowId>): void => {
selectedItemsIndices;
},
onItemClicked: (): void => {},
onSelectedRowsChange: (): void => {},
selectedRows: new Set<TableRowId>(),
size: {
height: 0,