Skip to content

Commit

Permalink
feat: add test for logistic regression model
Browse files Browse the repository at this point in the history
  • Loading branch information
alarv committed Oct 18, 2024
1 parent ad6b756 commit 03ee349
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/sklearn-models/logistic-regression.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { test, expect } from '@playwright/test';
import { login } from '../util/login';
import { ModelFormData, predict } from '../util/predict';
import { acceptCookies } from '../util/cookies';

const formData: ModelFormData[] = [
{ selector: '[name="X1"]', value: '1', type: 'input' },
{ selector: '[name="X2"]', value: '1', type: 'input' },
];

test.beforeEach(async ({ page }) => {
await page.goto('https://app.jaqpot.org/dashboard/models/1859/description');
await acceptCookies(page);
});

test('should allow prediction if logged in', async ({ page }) => {
await login(page);
await page.getByRole('tab', { name: 'Predict' }).click();

await predict(page, formData);

await expect(page.getByText('Success')).toBeVisible();
await expect(page.getByText('Probabilities')).toBeVisible();
});

0 comments on commit 03ee349

Please sign in to comment.