text: import { expect } from "chai";
  import UserHelper from "../../helpers/user.helper";
  const userHelper = new UserHelper();
  
  describe("\nSuccessful login (happy path with valid login and password)", () => {
    //BEFORE hook
    before(async () => {
      await userHelper.login(process.env.EMAIL, process.env.PASSWORD);
      process.env.USERID = userHelper.response.body.payload.userId;
      // console.log(process.env.USERID);
    });
    //Test Cases
    it("Checking that response status code is 200", () => {
      expect(userHelper.response.statusCode).to.eq(200);
    });
    it("Checking that response includes a message", () => {
      expect(userHelper.response.body.message).not.to.be.undefined;
    });
    it("Checking that response includes a message", () => {
      expect(userHelper.response.body.message).to.eq("Auth success");
    });
    it("Checking that response includes a success", () => {
      expect(userHelper.response.body.success).not.to.be.undefined;
    });
    it("Checking that response includes a success", () => {
      expect(userHelper.response.body.success).to.eq(true);
    });
    it("Checking that response includes a fail", () => {
      expect(userHelper.response.body.fail).not.to.be.undefined;
    });
    it("Checking that response includes a fail", () => {
      expect(userHelper.response.body.fail).to.eq(false);
    });
    it("Checking that response includes a silent", () => {
      expect(userHelper.response.body.silent).not.to.be.undefined;
    });
    it("Checking that response includes a silent", () => {
      expect(userHelper.response.body.silent).to.eq(true);
    });
    it("Checking that response includes a payload", () => {
      expect(userHelper.response.body.payload).not.to.be.undefined;
    });
    it("Checking that response includes a token", () => {
      expect(userHelper.response.body.payload.token).not.to.be.undefined;
    });
    it("Checking that token is a string", () => {
      expect(userHelper.response.body.payload.token).to.be.an("string");
      console.log(userHelper.response.body.payload.token);
    });
    it("Checking that user roles is an array", () => {
      expect(userHelper.response.body.payload.user.roles).to.be.an("array");
    });
  
    // it("Checking that user roles is verified", () => {
    //   expect(userHelper.response.body.payload.user.roles[0]).to.eq("verified");
    // });
  
    it("Checking that user roles is verified", () => {
      expect(userHelper.response.body.payload.user.roles).to.deep.eq(["verified"]);
    });
  
    it("Checking that response includes acl key", () => {
      expect(userHelper.response.body.payload.acl).not.to.be.undefined;
    });
    it("Checking that response includes userId", () => {
      expect(userHelper.response.body.payload.userId).not.to.be.undefined;
    });
    it("Checking that response includes userId is string", () => {
      expect(userHelper.response.body.payload.userId).to.be.an("string");
    });
    it("Checking that userId has 24 symbols", () => {
      expect(userHelper.response.body.payload.userId.length).to.be.eq(24);
    });
  });
  