fix: replaced all edit name with Rename (#34570)
This commit is contained in:
parent
9cf62ca6f1
commit
6494b76634
|
|
@ -105,7 +105,7 @@ describe(
|
|||
PageLeftPane.switchSegment(PagePaneSegment.Queries);
|
||||
ee.ActionContextMenuByEntityName({
|
||||
entityNameinLeftSidebar: "FirstAPI",
|
||||
action: "Edit name",
|
||||
action: "Rename",
|
||||
});
|
||||
cy.EditApiNameFromExplorer("SecondAPI");
|
||||
cy.xpath(apiwidget.popover)
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ describe(
|
|||
cy.get(".t--entity-property-close").click(); //closing Bindings overlay
|
||||
entityExplorer.ActionContextMenuByEntityName({
|
||||
entityNameinLeftSidebar: "Query1",
|
||||
action: "Edit name",
|
||||
action: "Rename",
|
||||
});
|
||||
cy.EditApiNameFromExplorer("MyQuery");
|
||||
entityExplorer.ActionContextMenuByEntityName({
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ describe(
|
|||
cy.get(`.t--entity-item:contains(${secondApiName})`).within(() => {
|
||||
cy.get(".t--context-menu").click({ force: true });
|
||||
});
|
||||
cy.selectAction("Edit name");
|
||||
cy.selectAction("Rename");
|
||||
cy.get(explorer.editEntity).last().type(firstApiName, { force: true });
|
||||
cy.validateMessage(firstApiName);
|
||||
agHelper.PressEnter();
|
||||
|
|
@ -96,7 +96,7 @@ describe("Entity Naming conflict test", { tags: ["@tag.IDE"] }, function () {
|
|||
cy.get(`.t--entity-item:contains(${secondApiName})`).within(() => {
|
||||
cy.get(".t--context-menu").click({ force: true });
|
||||
});
|
||||
cy.selectAction("Edit name");
|
||||
cy.selectAction("Rename");
|
||||
|
||||
cy.get(explorer.editEntity).last().type(firstApiName, { force: true });
|
||||
entityExplorer.ValidateDuplicateMessageToolTip(firstApiName);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ describe("Tab widget test", { tags: ["@tag.IDE"] }, function () {
|
|||
PageLeftPane.expandCollapseItem("Tabs1");
|
||||
entityExplorer.ActionContextMenuByEntityName({
|
||||
entityNameinLeftSidebar: "Tab2",
|
||||
action: "Edit name",
|
||||
action: "Rename",
|
||||
});
|
||||
agHelper.TypeText(locators._entityNameEditing("Tab2"), tabname);
|
||||
agHelper.Sleep(2000);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ describe(
|
|||
});
|
||||
_.entityExplorer.ActionContextMenuByEntityName({
|
||||
entityNameinLeftSidebar: "Text1",
|
||||
action: "Edit name",
|
||||
action: "Rename",
|
||||
});
|
||||
cy.EditApiNameFromExplorer("TextUpdated");
|
||||
_.entityExplorer.ActionContextMenuByEntityName({
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"apiEditorIcon": ".t--nav-link-api-editor",
|
||||
"integrationActiveTab": "button[id$='ACTIVE']",
|
||||
"popover": "//div[contains(@class,'t--entity page')]//*[last()]//*[local-name()='g' and @id='Icon/Outline/more-vertical']",
|
||||
"editName": "span:contains('Edit name')",
|
||||
"editName": "span:contains('Rename')",
|
||||
"clonePage": "span:contains('Clone')",
|
||||
"deletePage": "span:contains('Delete')",
|
||||
"deletePageConfirm": "span:contains('Are you sure?')",
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@
|
|||
"showrequest": "span:contains('Show Request')",
|
||||
"Responsetab": "//li//span[text()='Response Body']",
|
||||
"deleteAPI": ".t--apiFormDeleteBtn",
|
||||
"editName": ".single-select >div:contains('Edit name')",
|
||||
"editName": ".single-select >div:contains('Rename')",
|
||||
"page": ".single-select >div",
|
||||
"propertyList": ".binding",
|
||||
"actionlist": ".action div div",
|
||||
"settings": "span:contains('Settings')",
|
||||
"headers": "span:contains('Headers')",
|
||||
"onPageLoad": "[name=executeOnLoad]",
|
||||
"renameEntity": "div[role='menuitem']:contains('Edit name')",
|
||||
"renameEntity": "div[role='menuitem']:contains('Rename')",
|
||||
"paramsTab": "//span[text()='Params']",
|
||||
"paramKey": ".t--actionConfiguration\\.queryParameters\\[0\\]\\.key\\.0",
|
||||
"paramValue": ".t--actionConfiguration\\.queryParameters\\[0\\]\\.value\\.0",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"entityExplorer": ".t--entity-explorer",
|
||||
"popover": "//div[contains(@class,'t--entity page')]//*[local-name()='g' and @id='Icon/Outline/more-vertical']",
|
||||
"datsourceEntityPopover": "//div[contains(@class,'t--entity datasource')]//*[local-name()='g' and @id='Icon/Outline/more-vertical']",
|
||||
"editName": ".single-select >div:contains('Edit name')",
|
||||
"editName": ".single-select >div:contains('Rename')",
|
||||
"deletePage": ".single-select >div:contains('Delete')",
|
||||
"refreshStructure": ".single-select >div:contains('Refresh')",
|
||||
"datasourceStructure": ".t--entity.datasourceStructure",
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ interface EntityActionParams {
|
|||
entityNameinLeftSidebar: string;
|
||||
action?:
|
||||
| "Show bindings"
|
||||
| "Edit name"
|
||||
| "Rename"
|
||||
| "Delete"
|
||||
| "Clone"
|
||||
| "Settings"
|
||||
|
|
@ -271,7 +271,7 @@ export class EntityExplorer {
|
|||
if (viaMenu)
|
||||
this.ActionContextMenuByEntityName({
|
||||
entityNameinLeftSidebar: entityName,
|
||||
action: "Edit name",
|
||||
action: "Rename",
|
||||
entityType,
|
||||
});
|
||||
else cy.xpath(PageLeftPane.listItemSelector(entityName)).dblclick();
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ export class JSEditor {
|
|||
public RenameJSObjFromExplorer(entityName: string, renameVal: string) {
|
||||
this.ee.ActionContextMenuByEntityName({
|
||||
entityNameinLeftSidebar: entityName,
|
||||
action: "Edit name",
|
||||
action: "Rename",
|
||||
});
|
||||
cy.xpath(this.locator._entityNameEditing(entityName)).type(
|
||||
renameVal + "{enter}",
|
||||
|
|
|
|||
|
|
@ -1724,7 +1724,7 @@ export const END_DESCRIPTION = () =>
|
|||
"Inspect properties of queries, components, etc.";
|
||||
export const END_BUTTON_TEXT = () => "Start building an app";
|
||||
|
||||
export const CONTEXT_EDIT_NAME = () => "Edit name";
|
||||
export const CONTEXT_RENAME = () => "Rename";
|
||||
export const CONTEXT_SHOW_BINDING = () => "Show bindings";
|
||||
export const CONTEXT_MOVE = () => "Move to page";
|
||||
export const CONTEXT_COPY = () => "Copy to page";
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import {
|
|||
CONTEXT_COPY,
|
||||
CONTEXT_DELETE,
|
||||
CONFIRM_CONTEXT_DELETE,
|
||||
CONTEXT_EDIT_NAME,
|
||||
CONTEXT_RENAME,
|
||||
CONTEXT_MOVE,
|
||||
CONTEXT_NO_PAGE,
|
||||
CONTEXT_SHOW_BINDING,
|
||||
|
|
@ -106,11 +106,11 @@ export function ActionEntityContextMenu(props: EntityContextMenuProps) {
|
|||
);
|
||||
|
||||
const optionsTree = [
|
||||
menuItems.includes(ActionEntityContextMenuItemsEnum.EDIT_NAME) &&
|
||||
menuItems.includes(ActionEntityContextMenuItemsEnum.RENAME) &&
|
||||
canManageAction && {
|
||||
value: "rename",
|
||||
onSelect: editActionName,
|
||||
label: createMessage(CONTEXT_EDIT_NAME),
|
||||
label: createMessage(CONTEXT_RENAME),
|
||||
},
|
||||
menuItems.includes(ActionEntityContextMenuItemsEnum.SHOW_BINDING) && {
|
||||
value: "showBinding",
|
||||
|
|
|
|||
|
|
@ -51,11 +51,11 @@ export default function TreeDropdown(props: TreeDropdownProps) {
|
|||
const handleSelect = (option: TreeDropdownOption) => {
|
||||
if (option.onSelect) {
|
||||
// MenuTrigger takes focus after the Menu closes. For an input to be focused for e.g
|
||||
// edit name we have to take focus back from it.
|
||||
// Rename we have to take focus back from it.
|
||||
// Without this the input takes focus first post which the Menu closes post which MenuTrigger
|
||||
// takes back focus.
|
||||
setTimeout(() => {
|
||||
option.onSelect && option.onSelect(option);
|
||||
option.onSelect?.(option);
|
||||
}, 0);
|
||||
if (option.value === "delete" && !option.confirmDelete) {
|
||||
handleOpenChange(true);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { useDispatch, useSelector } from "react-redux";
|
|||
import { deleteDatasource } from "actions/datasourceActions";
|
||||
import { initExplorerEntityNameEdit } from "actions/explorerActions";
|
||||
import {
|
||||
CONTEXT_EDIT_NAME,
|
||||
CONTEXT_RENAME,
|
||||
CONTEXT_DELETE,
|
||||
CONFIRM_CONTEXT_DELETE,
|
||||
createMessage,
|
||||
|
|
@ -59,7 +59,7 @@ export function DataSourceContextMenu(props: {
|
|||
value: "rename",
|
||||
className: "single-select t--datasource-rename",
|
||||
onSelect: editDatasourceName,
|
||||
label: createMessage(CONTEXT_EDIT_NAME),
|
||||
label: createMessage(CONTEXT_RENAME),
|
||||
},
|
||||
canDeleteDatasource && {
|
||||
confirmDelete: confirmDelete,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { createContext, useMemo } from "react";
|
|||
import type { ActionParentEntityTypeInterface } from "@appsmith/entities/Engine/actionHelpers";
|
||||
|
||||
export enum ActionEntityContextMenuItemsEnum {
|
||||
EDIT_NAME = "Edit Name",
|
||||
RENAME = "Rename",
|
||||
SHOW_BINDING = "Show Bindings",
|
||||
CONVERT_QUERY_MODULE_INSTANCE = "Create Module",
|
||||
COPY = "Copy",
|
||||
|
|
@ -11,7 +11,7 @@ export enum ActionEntityContextMenuItemsEnum {
|
|||
}
|
||||
|
||||
export const defaultMenuItems = [
|
||||
ActionEntityContextMenuItemsEnum.EDIT_NAME,
|
||||
ActionEntityContextMenuItemsEnum.RENAME,
|
||||
ActionEntityContextMenuItemsEnum.DELETE,
|
||||
ActionEntityContextMenuItemsEnum.SHOW_BINDING,
|
||||
ActionEntityContextMenuItemsEnum.COPY,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import {
|
|||
CONTEXT_COPY,
|
||||
CONTEXT_DELETE,
|
||||
CONFIRM_CONTEXT_DELETE,
|
||||
CONTEXT_EDIT_NAME,
|
||||
CONTEXT_RENAME,
|
||||
CONTEXT_MOVE,
|
||||
CONTEXT_NO_PAGE,
|
||||
CONTEXT_SHOW_BINDING,
|
||||
|
|
@ -96,11 +96,11 @@ export function JSCollectionEntityContextMenu(props: EntityContextMenuProps) {
|
|||
);
|
||||
|
||||
const optionsTree = [
|
||||
menuItems.includes(ActionEntityContextMenuItemsEnum.EDIT_NAME) &&
|
||||
menuItems.includes(ActionEntityContextMenuItemsEnum.RENAME) &&
|
||||
canManage && {
|
||||
value: "rename",
|
||||
onSelect: editJSCollectionName,
|
||||
label: createMessage(CONTEXT_EDIT_NAME),
|
||||
label: createMessage(CONTEXT_RENAME),
|
||||
},
|
||||
menuItems.includes(ActionEntityContextMenuItemsEnum.SHOW_BINDING) && {
|
||||
value: "showBinding",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import {
|
|||
import styled from "styled-components";
|
||||
import { Icon } from "design-system";
|
||||
import {
|
||||
CONTEXT_EDIT_NAME,
|
||||
CONTEXT_RENAME,
|
||||
CONTEXT_CLONE,
|
||||
CONTEXT_SET_AS_HOME_PAGE,
|
||||
CONTEXT_DELETE,
|
||||
|
|
@ -156,7 +156,7 @@ export function PageContextMenu(props: {
|
|||
canManagePages && {
|
||||
value: "rename",
|
||||
onSelect: editPageName,
|
||||
label: createMessage(CONTEXT_EDIT_NAME),
|
||||
label: createMessage(CONTEXT_RENAME),
|
||||
},
|
||||
canCreatePages &&
|
||||
canManagePages && {
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ export function WidgetContextMenu(props: {
|
|||
const option: TreeDropdownOption = {
|
||||
value: "rename",
|
||||
onSelect: editWidgetName,
|
||||
label: "Edit name",
|
||||
label: "Rename",
|
||||
};
|
||||
optionTree.push(option);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user