Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

hile While using cypress, in order to add/modify entries in PP tables through Pricfx APIs( instead of the gui), we just need to carry out the following steps:

  1. Add the following command to commands.js of cypress

 

Cypress.Commands.add('insertDataToPPTable', (file) => {

...

      .should("eq", 200);

 

  });

 

  1. Note that the command takes one string parameter, which contains the relative path (from fixtures folder)to a json file. The json file is expected to be present in the fixtures folder of the cypress project. It should contain details as shown in the sample below

{

    "username":"<partition>/<loginName>",

...

                "lastUpdateBy": 447,

                "id": 174,

                "isPlasma": false

...

     "key6":"Admin"

 

     }

 

 ]

      

  1. In the cypress testcase, the command can be called as shown below:

describe('userHierarchyTableTest', () => {

...