Skip to content

Commit fe31a40

Browse files
committed
Address review comments
Signed-off-by: Nandini Chandra <[email protected]>
1 parent e9c6b91 commit fe31a40

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

cypress/e2e/tests/administration/source-platform/crud.test.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,19 @@ limitations under the License.
1616
/// <reference types="cypress" />
1717

1818
import * as data from "../../../../utils/data_utils";
19-
import { checkSuccessAlert, deleteByList, exists, login, notExists } from "../../../../utils/utils";
19+
import {
20+
checkSuccessAlert,
21+
deleteByList,
22+
exists,
23+
login,
24+
notExists,
25+
verifyInputValue,
26+
} from "../../../../utils/utils";
2027
import { CredentialsSourceControlUsername } from "../../../models/administration/credentials/credentialsSourceControlUsername";
2128
import { SourcePlatform } from "../../../models/administration/source-platform/source-platform";
2229
import { CredentialType, UserCredentials } from "../../../types/constants";
2330
import { successAlertMessage } from "../../../views/common.view";
31+
import * as selectors from "../../../views/source-platform.view";
2432

2533
let cloudFoundryCreds: Array<CredentialsSourceControlUsername> = [];
2634

@@ -76,11 +84,11 @@ describe(["@tier2"], "CRUD operations on Cloud Foundry Source platform", () => {
7684

7785
const newURL = "https://api.bosh-updated-lite.com";
7886
platform.edit({ url: newURL });
79-
exists(newName);
87+
verifyInputValue(selectors.url, newURL);
8088

8189
const newCreds = cloudFoundryCreds[1].name;
8290
platform.edit({ credentials: newCreds });
83-
exists(newName);
91+
verifyInputValue(selectors.credentials, newCreds);
8492

8593
platform.delete();
8694
checkSuccessAlert(

cypress/utils/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ export function clearInput(fieldID: string): void {
145145
cy.get(fieldID, { timeout: 2 * SEC }).clear();
146146
}
147147

148+
export function verifyInputValue(fieldID: string, expectedValue: string): void {
149+
cy.get(fieldID).invoke("val").should("equal", expectedValue);
150+
}
151+
148152
export function clickByText(
149153
fieldId: string,
150154
buttonText: string | RegExp,

0 commit comments

Comments
 (0)