Skip to content

Is there a way to delete the data sources from a test to the other?  #426

@clauBv23

Description

@clauBv23

Hi there:

I'm trying to test some logic that involves the creation of new templates. But when checking the created templates from one test to the other they are not being initialized and continue existing. For cleaning the store exists the clearStore I was wondering if there is a similar function for creating the data source.

I mean, let's say I have something like this:

describe('handle....', () => {
  afterAll(() => {
    clearStore();
      });

  test('it should work on way 1 ', () => {
        ... some code here 
        assert.dataSourceCount('NewTemplate', 1);   // want to check the template was created 
        ... other checks
   });

   test('it should work on way 2 ', () => {
        ... some code here 
        assert.dataSourceCount('NewTemplate', 1);     // want to check the template was created but at this point, the template from 
        ... other checks                             //     the previous test will exist so there will be 2 templates instead of 1
   });
});

I would like to be able to clean the data sources to test their existence properly, having a function like clearStore to clear the data sources clearDataSources will help.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions