Fix WebElementWrapper.findByTestSubject passing css selector to the created wrapper (#121493)

* Fix WebElementWrapper.findByTestSubject incorrectly passing a css selector to created wrapper

* lint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Pierre Gayvallet 2021-12-20 16:09:11 +01:00 committed by GitHub
parent eea2fc333b
commit 2ccfb084d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -490,8 +490,7 @@ export class WebElementWrapper {
public async findByTestSubject(selector: string) {
return await this.retryCall(async function find(wrapper) {
return wrapper._wrap(
await wrapper._webElement.findElement(wrapper.By.css(testSubjSelector(selector))),
wrapper.By.css(selector)
await wrapper._webElement.findElement(wrapper.By.css(testSubjSelector(selector)))
);
});
}

View file

@ -68,8 +68,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide
});
});
// FLAKY: https://github.com/elastic/kibana/issues/116059
describe.skip('Delete modal', () => {
describe('Delete modal', () => {
it('should display a warning then trying to delete hidden saved objects', async () => {
await PageObjects.savedObjects.clickCheckboxByTitle('A Pie');
await PageObjects.savedObjects.clickCheckboxByTitle('A Dashboard');