Skip to content

[ftr] provider a wrapper for supertest with specific role and headers #190228

Closed

Description

@azasypkin suggested a nice improvement in test design: getSupertestWithRoleScope('admin', ...options...) that would do all the heavy lifting with custom, internal and security headers internally.

    describe('against an application page', () => {
      it(`uses compression when there isn't a referer`, async () => {
        const response = await getSupertestWithRoleScope('admin', {withInternalHeaders: true})
          .get('/app/kibana')
          .set('accept-encoding', 'gzip')
        expect(response.header).to.have.property('content-encoding', 'gzip');
      });
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Team:QATeam label for QA Team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions