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

[Console] Fix actions menu scrolling issue #200018

Merged
Prev Previous commit
Next Next commit
Add missing test
sabarasaba committed Nov 14, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
miri64 Martine Lenders
commit 6e6093b74c6c68033c246bd89963954b8523ed82
43 changes: 43 additions & 0 deletions test/functional/apps/console/_console.ts
Original file line number Diff line number Diff line change
@@ -223,5 +223,48 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(await PageObjects.console.hasSuccessBadge()).to.be(true);
});
});

it('should show actions menu when the first line of the request is not in the viewport', async () => {
await PageObjects.console.clearEditorText();
await PageObjects.console.enterText(`PUT _ingest/pipeline/testme
{
"processors": [
{
"inference": {
"model_id": "azure_openai_embeddings",
"input_output": {
"input_field": "body_content",
"output_field": "body_content_vector"
},
"if": "ctx?.body_content!=null",
"ignore_failure": true,
"on_failure": [
{
"append": {
"field": "_source._ingest.inference_errors",
"allow_duplicates": false,
"value": [
{
"message": "...",
"pipeline": "ml-inference-search-edf-azureopenai-embeddings",
"timestamp": "{{{ _ingest.timestamp }}}"
}
]
}
}
]
}
}
]
}`);

// Reduce the height of the browser window so that the first line of the request is not in the viewport
await browser.setWindowSize(1300, 500);
expect(await PageObjects.console.isPlayButtonVisible()).to.be(true);

// Reset it back to the original height
await browser.setWindowSize(1300, 1100);
});

});
}
4 changes: 4 additions & 0 deletions test/functional/page_objects/console_page.ts
Original file line number Diff line number Diff line change
@@ -217,6 +217,10 @@ export class ConsolePageObject extends FtrService {
await this.testSubjects.click('sendRequestButton');
}

public async isPlayButtonVisible() {
return await this.testSubjects.exists('sendRequestButton');
}

public async clickCopyOutput() {
await this.testSubjects.click('copyOutputButton');
}