Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
animehart committed Jun 24, 2024
1 parent 48a462a commit c898312
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ function SecretInputField({
iconType="refresh"
iconSide="left"
size="xs"
data-test-subj={`button-replace${lowercaseTitle}`}
>
<FormattedMessage
id="xpack.fleet.editPackagePolicy.stepConfigure.fieldSecretValueSetEditButton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ export function AddCisIntegrationFormPageProvider({
return stringToFind;
};

const getReplaceSecretButton = async (secretField: string) => {
return await testSubjects.find(`button-replace${secretField}`);
};

return {
cisAzure,
cisAws,
Expand Down Expand Up @@ -295,5 +299,6 @@ export function AddCisIntegrationFormPageProvider({
isOptionChecked,
checkIntegrationPliAuthBlockExists,
doesStringExist,
getReplaceSecretButton,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) ===
directAccessKeyId
).to.be(true);
expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null);
expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null);
});
});

Expand Down Expand Up @@ -160,7 +160,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) ===
tempAccessSessionToken
).to.be(true);
expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null);
expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null);
});
});

Expand Down Expand Up @@ -249,7 +249,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) ===
directAccessKeyId
).to.be(true);
expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null);
expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null);
});
});

Expand Down Expand Up @@ -286,7 +286,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) ===
tempAccessSessionToken
).to.be(true);
expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null);
expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function (providerContext: FtrProviderContext) {
CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID
)) === tenantId
).to.be(true);
expect(await cisIntegration.doesStringExist('Replace client secret')).to.not.be(null);
expect(await cisIntegration.getReplaceSecretButton('client secret')).to.not.be(null);
});
});

Expand Down Expand Up @@ -223,7 +223,7 @@ export default function (providerContext: FtrProviderContext) {
CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID
)) === tenantId
).to.be(true);
expect(await cisIntegration.doesStringExist('Replace client secret')).to.not.be(null);
expect(await cisIntegration.getReplaceSecretButton('client secret')).to.not.be(null);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) ===
directAccessKeyId
).to.be(true);
expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null);
expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null);
});
});

Expand Down Expand Up @@ -107,7 +107,7 @@ export default function (providerContext: FtrProviderContext) {
(await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) ===
tempAccessSessionToken
).to.be(true);
expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null);
expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null);
});
});

Expand Down

0 comments on commit c898312

Please sign in to comment.