-
| Please help, when using the date provider, the contents of everything that is transmitted is displayed in the console, I have a very large date provider, and the console is very clogged How i can change this name example: getRecipe -- OK | 1 passed // Or maybe I can set the maximum output for this line? | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
| I solved problem If anyone comes across this problem you need create custom plugin like this: plugin/Listener.js const event = require('codeceptjs').event;
module.exports = function() {
    event.dispatcher.on(event.test.before, function (test) {
        test.title = test.inject.current.TestName;
    });
}In codecept.conf.ts enable custom plugin   plugins: {
    retryFailedStep: {
      enabled: true
    },
    screenshotOnFail: {
      enabled: true
    },
    Listener: {
      require: "./plugin/Listener.js",
      enabled: true
    }
  }in data provider i have next: export const data = [
    {
        TestName: 'case7 - empty parameter',
        fixture_data:  {},
        provider_data: {
            post_id: '',
            status_code: 404,
            response: require( './provider/case7/responce.json' ),
            json_schema: require( './provider/case7/schema.json' )
        }
    },
];in test file: import { data } from './data'
Feature('getRecipe');
Data(data).Scenario('/articles/recipes/$id', async ({ I, current}) => {
    I.truncateDatabase(current);
    I.haveInDatabase(current);
    let actualResponse = await I.sendGetRequest('/articles/recipes/' + current.provider_data.post_id);
    I.seeResponseCodeIs(current.provider_data.status_code);
    I.seeResponseEquals(current.provider_data.response);
    I.assertJsonSchema(actualResponse.data, current.provider_data.json_schema);
    I.truncateDatabase(current);
}); | 
Beta Was this translation helpful? Give feedback.
I solved problem
If anyone comes across this problem you need create custom plugin like this:
plugin/Listener.js
In codecept.conf.ts enable custom plugin
in data provider i have next: