From f4484f69fa2e67404e0e685a54b918a6ddbcd002 Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Wed, 9 Nov 2022 11:45:41 +0100 Subject: [PATCH] update functional tests --- .../apps/ml/short_tests/model_management/model_list.ts | 1 + .../functional/services/ml/trained_models_table.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts b/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts index 3b4946e35bd70..2743df8a81949 100644 --- a/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts +++ b/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts @@ -191,6 +191,7 @@ export default function ({ getService }: FtrProviderContext) { it(`starts deployment of the imported model ${model.id}`, async () => { await ml.trainedModelsTable.startDeploymentWithParams(model.id, { + priority: 'normal', numOfAllocations: 1, threadsPerAllocation: 2, }); diff --git a/x-pack/test/functional/services/ml/trained_models_table.ts b/x-pack/test/functional/services/ml/trained_models_table.ts index c8d43207dd5ab..6f2b76be1bdb1 100644 --- a/x-pack/test/functional/services/ml/trained_models_table.ts +++ b/x-pack/test/functional/services/ml/trained_models_table.ts @@ -249,6 +249,13 @@ export function TrainedModelsTableProvider( await this.assertNumOfAllocations(value); } + public async setPriority(value: 'low' | 'normal') { + await mlCommonUI.selectButtonGroupValue( + 'mlModelsStartDeploymentModalPriority', + value.toString() + ); + } + public async setThreadsPerAllocation(value: number) { await mlCommonUI.selectButtonGroupValue( 'mlModelsStartDeploymentModalThreadsPerAllocation', @@ -258,10 +265,11 @@ export function TrainedModelsTableProvider( public async startDeploymentWithParams( modelId: string, - params: { numOfAllocations: number; threadsPerAllocation: number } + params: { priority: 'low' | 'normal'; numOfAllocations: number; threadsPerAllocation: number } ) { await this.openStartDeploymentModal(modelId); + await this.setPriority(params.priority); await this.setNumOfAllocations(params.numOfAllocations); await this.setThreadsPerAllocation(params.threadsPerAllocation);