Skip to content

Commit

Permalink
[Canvas] Fix Custom Element functional test (and remove skip) (#73727)
Browse files Browse the repository at this point in the history
* Remove skip of custom elements
  • Loading branch information
poffdeluxe committed Aug 4, 2020
1 parent ecc7fce commit 7208a57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions x-pack/test/functional/apps/canvas/custom_elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export default function canvasCustomElementTest({
const PageObjects = getPageObjects(['canvas', 'common']);
const find = getService('find');

// FLAKY: https://github.com/elastic/kibana/issues/63339
describe.skip('custom elements', function () {
describe('custom elements', function () {
this.tags('skipFirefox');

before(async () => {
Expand Down Expand Up @@ -66,6 +65,7 @@ export default function canvasCustomElementTest({
// ensure the custom element is the one expected and click it to add to the workpad
const customElement = await find.byCssSelector('.canvasElementCard__wrapper');
const elementName = await customElement.findByCssSelector('.euiCard__title');

expect(await elementName.getVisibleText()).to.contain('My New Element');
customElement.click();

Expand Down
5 changes: 4 additions & 1 deletion x-pack/test/functional/page_objects/canvas_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import expect from '@kbn/expect';

import { FtrProviderContext } from '../ftr_provider_context';

export function CanvasPageProvider({ getService }: FtrProviderContext) {
export function CanvasPageProvider({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const find = getService('find');
const browser = getService('browser');
const PageObjects = getPageObjects(['common']);

return {
async enterFullscreen() {
Expand Down Expand Up @@ -58,6 +59,8 @@ export function CanvasPageProvider({ getService }: FtrProviderContext) {
async openSavedElementsModal() {
await testSubjects.click('add-element-button');
await testSubjects.click('saved-elements-menu-option');

await PageObjects.common.sleep(1000); // give time for modal animation to complete
},
async closeSavedElementsModal() {
await testSubjects.click('saved-elements-modal-close-button');
Expand Down

0 comments on commit 7208a57

Please sign in to comment.