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

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

* lint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Pierre Gayvallet <pierre.gayvallet@elastic.co>
This commit is contained in:
Kibana Machine 2021-12-20 11:29:11 -05:00 committed by GitHub
parent 84dccccdda
commit 6e8807655c
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');