Sfoglia il codice sorgente

test: stabilize model pricing generator e2e

master
fengsilin 3 settimane fa
parent
commit
aeff58b122
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. +7
    -2
      web/e2e/model-pricing.spec.ts

+ 7
- 2
web/e2e/model-pricing.spec.ts Vedi File

@@ -27,6 +27,10 @@ async function fillByTestId(page: Page, testId: string, value: string) {
await fillControl(page.getByTestId(testId), value);
}

async function countGeneratorRatioRows(page: Page) {
return await page.getByTestId(/^generator-ratio-value-/).count();
}

async function fetchModelPricing(
request: APIRequestContext,
model: string,
@@ -67,8 +71,9 @@ test.describe.serial('Model Pricing E2E', () => {

const generator = page.getByTestId('model-pricing-generator');
await generator.locator('input[value="replace_all"]').check({ force: true });
await fillByTestId(page, 'generator-ratio-value-2', '1');
await fillByTestId(page, 'generator-ratio-ratio-2', '1.5');
const qualityRowIndex = (await countGeneratorRatioRows(page)) - 1;
await fillByTestId(page, `generator-ratio-value-${qualityRowIndex}`, 'standard');
await fillByTestId(page, `generator-ratio-ratio-${qualityRowIndex}`, '1.5');
await expect(page.getByTestId('generator-apply')).toBeEnabled();
await page.getByTestId('generator-apply').click();



Caricamento…
Annulla
Salva