Skip to content

Commit

Permalink
Merge pull request #2181 from artilleryio/add-extended-metrics-to-schema
Browse files Browse the repository at this point in the history
fix(schema): add extendedMetrics to playwright engine schema
  • Loading branch information
bernardobridge authored Oct 2, 2023
2 parents d546f6e + 56bb3a2 commit 6b19d2d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/types/schema/engines/playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ const Joi = require('joi').defaults((schema) =>
schema.options({ allowUnknown: true, abortEarly: true })
);

const { artilleryNumberOrString } = require('../joi.helpers');
const {
artilleryNumberOrString,
artilleryBooleanOrString
} = require('../joi.helpers');

const PlaywrightSchemaObject = {
testFunction: Joi.string()
Expand All @@ -14,7 +17,7 @@ const PlaywrightSchemaObject = {
};

const PlaywrightConfigSchema = Joi.object({
aggregateByName: Joi.alternatives(Joi.boolean(), Joi.string())
aggregateByName: artilleryBooleanOrString
.meta({ title: 'Aggregate by name' })
.description(
'Aggregate Artillery metrics by test scenario name.\nhttps://www.artillery.io/docs/reference/engines/playwright#aggregate-metrics-by-scenario-name'
Expand All @@ -29,6 +32,11 @@ const PlaywrightConfigSchema = Joi.object({
.description(
'Default maximum navigation time (in seconds) for Playwright navigation methods, like `page.goto()`.\nhttps://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-navigation-timeout'
),
extendedMetrics: artilleryBooleanOrString
.meta({ title: 'Playwright Extended Metrics' })
.description(
'If enabled, Artillery will collect additional metrics from Playwright.\nCheck more information here: https://www.artillery.io/docs/reference/engines/playwright#extended-metrics'
),
launchOptions: Joi.object()
.meta({ title: 'Playwright launch options' })
.description(
Expand Down

0 comments on commit 6b19d2d

Please sign in to comment.