Skip to content

Commit

Permalink
update functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Nov 9, 2022
1 parent 3b5d190 commit f4484f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
10 changes: 9 additions & 1 deletion x-pack/test/functional/services/ml/trained_models_table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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);

Expand Down

0 comments on commit f4484f6

Please sign in to comment.