Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
pheyos committed Jan 14, 2020
1 parent 6a80405 commit 2b86bcb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Expand Up @@ -64,7 +64,7 @@ export default function({ getService }: FtrProviderContext) {
});

it('pre-fills the job selection', async () => {
await ml.jobSelection.assertSelectedJobBadges([JOB_CONFIG.job_id]);
await ml.jobSelection.assertJobSelection([JOB_CONFIG.job_id]);
});

it('displays the influencers list', async () => {
Expand All @@ -75,7 +75,7 @@ export default function({ getService }: FtrProviderContext) {
}
});

it('displays the swim lanes', async () => {
it('displays the swimlanes', async () => {
await ml.anomalyExplorer.assertOverallSwimlaneExists();
await ml.anomalyExplorer.assertSwimlaneViewByExists();
});
Expand Down
Expand Up @@ -64,7 +64,7 @@ export default function({ getService }: FtrProviderContext) {
});

it('pre-fills the job selection', async () => {
await ml.jobSelection.assertSelectedJobBadges([JOB_CONFIG.job_id]);
await ml.jobSelection.assertJobSelection([JOB_CONFIG.job_id]);
});

it('pre-fills the detector input', async () => {
Expand Down
Expand Up @@ -11,16 +11,16 @@ export function MachineLearningJobSelectionProvider({ getService }: FtrProviderC
const testSubjects = getService('testSubjects');

return {
async assertSelectedJobBadges(expectedBadgesLabels: string[]) {
const selectedBadges = await testSubjects.findAll(
async assertJobSelection(jobOrGroupIds: string[]) {
const selectedJobsOrGroups = await testSubjects.findAll(
'mlJobSelectionBadges > ~mlJobSelectionBadge'
);
const actualBadgesLabels = await Promise.all(
selectedBadges.map(async badge => await badge.getVisibleText())
const actualJobOrGroupLabels = await Promise.all(
selectedJobsOrGroups.map(async badge => await badge.getVisibleText())
);
expect(actualBadgesLabels).to.eql(
expectedBadgesLabels,
`Job selection should display badges '${expectedBadgesLabels}' (got '${actualBadgesLabels}')`
expect(actualJobOrGroupLabels).to.eql(
jobOrGroupIds,
`Job selection should display jobs or groups '${jobOrGroupIds}' (got '${actualJobOrGroupLabels}')`
);
},
};
Expand Down

0 comments on commit 2b86bcb

Please sign in to comment.