@spartez-software/jira-test
TypeScript icon, indicating that this package has built-in type declarations

0.0.74 • Public • Published

jira-test (Beta)

helper lib - integration tests

prerequisites

  • ability to run tests using jest

installation

npm install @spartez-software/jira-test --save-dev

setup

  • go get yourself a jira cloud instance
  • setup .env
TEST_JIRA_URL=https://your-cloud-jira-test-name.atlassian.net
TEST_JIRA_USER=user-that-will-make-changes-in-jira@spartez-software.com
TEST_JIRA_USER_TOKEN=pst! it is a secret, an api token!

usage (jest/typescript example)

import { step, TestLogger } from '@spartez-software/test-utils';
import { Jira, ProjectTemplateKeys } from '@spartez-software/jira-test';

describe('jira tests', () => {
    jest.retryTimes(1);
    jest.setTimeout(240000);

    const jira = Jira.getJiraFromEnv();
    const logger = new TestLogger();

    let project: string;

    it('Should create and destroy project with 2 issues', async () => {
        await step('Create jira Project', async () => {
            project = await jira.createProject();
            expect(project).toBeDefined();
        });

        logger.log(project);

        await step('adding jira issue', async () => {
            const issues = [{ summary: 'ala', type: 'Bug' }, { summary: 'pola', type: 'Bug' }];
            await jira.createSimpleIssues(project, issues);
        });
    });

    afterEach(async () => {
        await step('Delete jira project', async () => {
            if (project) {
                await jira.deleteProject(project);
            }
        });
    });

    it('Should create and destroy servicedesk project', async () => {
        await step('Create jira Project', async () => {
            project = await jira.createProjectFromTemplate(ProjectTemplateKeys.serviceDesk.simplifiedGeneralServiceDesk);
            expect(project).toBeDefined();
        });
        logger.log(project);

        await step('adding jira issue', async () => {
            const issues = [{ summary: 'ala', type: 'Task' }, { summary: 'pola', type: 'Task' }];
            await jira.createSimpleIssues(project, issues);
        });
    });

    afterEach(async () => {
        await step('Delete jira project', async () => {
            if (project) {
                await jira.deleteProject(project);
            }
        });
    });
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.74658latest
0.0.5-1585f29.2291canary
0.0.271master

Version History

VersionDownloads (Last 7 Days)Published
0.0.74658
0.0.732
0.0.7274
0.0.7175
0.0.703
0.0.694
0.0.681
0.0.672
0.0.6685
0.0.651
0.0.641
0.0.63484
0.0.621
0.0.612
0.0.6076
0.0.591
0.0.581
0.0.571
0.0.561
0.0.551
0.0.541
0.0.531
0.0.522
0.0.511
0.0.501
0.0.492
0.0.481
0.0.471
0.0.461
0.0.451
0.0.441
0.0.431
0.0.421
0.0.411
0.0.401
0.0.392
0.0.381
0.0.371
0.0.361
0.0.352
0.0.341
0.0.331
0.0.321
0.0.311
0.0.301
0.0.291
0.0.282
0.0.271
0.0.261
0.0.251
0.0.241
0.0.231
0.0.222
0.0.211
0.0.2013
0.0.191
0.0.181
0.0.171
0.0.162
0.0.152
0.0.141
0.0.131
0.0.5-1585f29.2291
0.0.5-6e016a7.2292
0.0.5-88cdedc.2291
0.0.5-e750a21.2291
0.0.5-74d845d.2297

Package Sidebar

Install

npm i @spartez-software/jira-test

Weekly Downloads

1,548

Version

0.0.74

License

MIT

Unpacked Size

50.1 kB

Total Files

28

Last publish

Collaborators

  • aleksanderciesielski
  • joanna.zola
  • mnykiel
  • pdobrzanski
  • bzieba-spartez
  • szymonwalkowskispartez
  • sebastianmialkowski
  • szymon.knopp
  • appfire
  • appfireap
  • rytistarasevicius1
  • murthy_appfire
  • manish-appfire
  • matteo.castellotti