MCPcopy Index your code
hub / github.com/NativeScript/nativescript-angular / removeElement

Function removeElement

e2e/renderer/e2e/ngforof.e2e-spec.ts:117–132  ·  view source on GitHub ↗
(index?: number)

Source from the content-addressed store, hash-verified

115 };
116
117 const removeElement = async (index?: number) => {
118 if (index) {
119 let { button } = await elements[index];
120 await button.click();
121 } else {
122 index = elements.length - 1;
123 if (driver.platformName.toLowerCase().includes("ios")) {
124 await removeButton.tap();
125 } else {
126 await removeButton.click();
127 }
128 }
129
130 elements.splice(index, 1);
131 lastAddedElementId -= 1;
132 };
133
134 const checkAppendedCorrectly = async function () {
135 const lastAdded = await getElement(lastAddedElementId);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected