add user defined function playwright test

This commit is contained in:
Asier Isayas
2025-12-22 10:21:22 -08:00
parent 6691974127
commit bc43d3afbb
3 changed files with 77 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ export async function deleteUserDefinedFunction(databaseId: string, collectionId
} else {
await client().database(databaseId).container(collectionId).scripts.userDefinedFunction(id).delete();
}
logConsoleProgress(`Successfully deleted user defined function ${id}`);
} catch (error) {
handleError(error, "DeleteUserDefinedFunction", `Error while deleting user defined function ${id}`);
throw error;

View File

@@ -2,6 +2,7 @@ import { UserDefinedFunctionDefinition } from "@azure/cosmos";
import { Label, TextField } from "@fluentui/react";
import { FluentProvider, webDarkTheme, webLightTheme } from "@fluentui/react-components";
import { KeyboardAction } from "KeyboardShortcuts";
import { logConsoleInfo } from "Utils/NotificationConsoleUtils";
import { ValidCosmosDbIdDescription, ValidCosmosDbIdInputPattern } from "Utils/ValidationUtils";
import { useThemeStore } from "hooks/useTheme";
import React, { Component } from "react";
@@ -170,6 +171,7 @@ export default class UserDefinedFunctionTabContent extends Component<
startKey,
);
this.props.editorState(ViewModels.ScriptEditorState.existingNoEdits);
logConsoleInfo(`Sucessfully created user defined function ${createdResource.id}`);
}
} catch (createError) {
this.props.isExecutionError(true);