Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Fix policy details test #100260

Merged
merged 3 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const policyTestResources = getService('policyTestResources');

// Failing: See https://github.com/elastic/kibana/issues/100236
describe.skip('When on the Endpoint Policy Details Page', function () {
describe('When on the Endpoint Policy Details Page', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From our conversation - we probably should be waiting for the endpoint form to load first on the fleet page. In the beforeEach under that describe() block (line 632) we probably should add:

await testSubjects.existOrFail('endpointIntegrationPolicyForm')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in your suggestion, everything still passes locally

describe('with an invalid policy id', () => {
it('should display an error', async () => {
await pageObjects.policy.navigateToPolicyDetails('invalid-id');
Expand Down Expand Up @@ -637,6 +636,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
policyInfo.agentPolicy.id,
policyInfo.packagePolicy.id
);
await testSubjects.existOrFail('endpointIntegrationPolicyForm');
});
afterEach(async () => {
if (policyInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ export function IngestManagerCreatePackagePolicy({

async setPackagePolicyDescription(desc: string) {
await this.scrollToCenterOfWindow('packagePolicyDescriptionInput');
await testSubjects.setValue('packagePolicyDescriptionInput', desc);
const packagePolicyDescriptionInput = await testSubjects.find(
'packagePolicyDescriptionInput'
);
await packagePolicyDescriptionInput.clearValueWithKeyboard();
await packagePolicyDescriptionInput.type(desc);
},

/**
Expand Down