Skip to content

Commit edea5a1

Browse files
authored
[Obs AI Assistant] remove flaky tests (elastic#228205)
## Summary Removes flaky tests and unskips test suite Closes elastic#191707
1 parent 138ebad commit edea5a1

File tree

1 file changed

+1
-70
lines changed

1 file changed

+1
-70
lines changed

x-pack/solutions/observability/test/observability_ai_assistant_functional/tests/feature_controls/settings_security.spec.ts

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,13 @@
88
import expect from '@kbn/expect';
99
import { FtrProviderContext } from '../../ftr_provider_context';
1010
import { createAndLoginUserWithCustomRole, deleteAndLogoutUser } from './helpers';
11-
import { interceptRequest } from '../../common/intercept_request';
1211

1312
export default function ({ getPageObjects, getService }: FtrProviderContext) {
1413
const PageObjects = getPageObjects(['common', 'error', 'navigationalSearch', 'security']);
1514
const ui = getService('observabilityAIAssistantUI');
1615
const testSubjects = getService('testSubjects');
17-
const retry = getService('retry');
18-
const toasts = getService('toasts');
19-
const driver = getService('__webdriver__');
2016

21-
// Failing: See https://github.com/elastic/kibana/issues/191707
22-
describe.skip('ai assistant management privileges', () => {
17+
describe('ai assistant management privileges', () => {
2318
describe('all privileges', () => {
2419
before(async () => {
2520
await createAndLoginUserWithCustomRole(getPageObjects, getService, {
@@ -61,70 +56,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
6156
});
6257
await testSubjects.existOrFail(ui.pages.settings.settingsPage);
6358
});
64-
it('allows updating of an advanced setting', async () => {
65-
await PageObjects.common.navigateToUrl('obsAIAssistantManagement', '', {
66-
ensureCurrentUrl: false,
67-
shouldLoginIfPrompted: false,
68-
shouldUseHashForSubUrl: false,
69-
});
70-
const testSearchConnectorIndexPattern = 'my-search-index-pattern';
71-
const searchConnectorIndexPatternInput = await testSubjects.find(
72-
ui.pages.settings.searchConnectorIndexPatternInput
73-
);
74-
// make sure the input is empty (default value)
75-
await searchConnectorIndexPatternInput.clearValue();
76-
await searchConnectorIndexPatternInput.type(testSearchConnectorIndexPattern);
77-
const saveButton = await testSubjects.find(ui.pages.settings.saveButton);
78-
await saveButton.click();
79-
// wait for page to refrsh
80-
await testSubjects.missingOrFail(ui.pages.settings.searchConnectorIndexPatternInput, {
81-
timeout: 2000,
82-
});
83-
// wait for the new page to fully load
84-
await testSubjects.existOrFail(ui.pages.settings.searchConnectorIndexPatternInput, {
85-
timeout: 2000,
86-
});
87-
expect(await searchConnectorIndexPatternInput.getAttribute('value')).to.be(
88-
testSearchConnectorIndexPattern
89-
);
90-
// reset the value back to default
91-
const resetToDefaultLink = await testSubjects.find(ui.pages.settings.resetToDefaultLink);
92-
await resetToDefaultLink.click();
93-
94-
expect(await searchConnectorIndexPatternInput.getAttribute('value')).to.be('');
95-
await saveButton.click();
96-
await testSubjects.missingOrFail(ui.pages.settings.searchConnectorIndexPatternInput, {
97-
timeout: 2000,
98-
});
99-
// wait for the new page to fully load
100-
await testSubjects.existOrFail(ui.pages.settings.searchConnectorIndexPatternInput, {
101-
timeout: 2000,
102-
});
103-
expect(await searchConnectorIndexPatternInput.getAttribute('value')).to.be('');
104-
});
105-
it('displays failure toast on failed request', async () => {
106-
const searchConnectorIndexPatternInput = await testSubjects.find(
107-
ui.pages.settings.searchConnectorIndexPatternInput
108-
);
109-
await searchConnectorIndexPatternInput.clearValue();
110-
await searchConnectorIndexPatternInput.type('test');
111-
112-
await interceptRequest(
113-
driver.driver,
114-
'*kibana\\/settings*',
115-
(responseFactory) => {
116-
return responseFactory.fail();
117-
},
118-
async () => {
119-
await testSubjects.click(ui.pages.settings.saveButton);
120-
}
121-
);
122-
123-
await retry.waitFor('Error saving settings toast', async () => {
124-
const count = await toasts.getCount();
125-
return count > 0;
126-
});
127-
});
12859
});
12960
describe('with advancedSettings read privilege', () => {
13061
before(async () => {

0 commit comments

Comments
 (0)