0.0.72 • Published 2 months ago

@spartez-software/jira-test v0.0.72

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
2 months ago

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);
            }
        });
    });
});
0.0.72

2 months ago

0.0.71

4 months ago

0.0.70

11 months ago

0.0.68

1 year ago

0.0.69

1 year ago

0.0.67

2 years ago

0.0.66

2 years ago

0.0.64

2 years ago

0.0.65

2 years ago

0.0.62

2 years ago

0.0.63

2 years ago

0.0.61

2 years ago

0.0.60

3 years ago

0.0.59

3 years ago

0.0.57

3 years ago

0.0.58

3 years ago

0.0.56

3 years ago

0.0.55

3 years ago

0.0.53

3 years ago

0.0.54

3 years ago

0.0.52

3 years ago

0.0.51

3 years ago

0.0.50

3 years ago

0.0.49

3 years ago

0.0.48

3 years ago

0.0.47

3 years ago

0.0.46

3 years ago

0.0.45

3 years ago

0.0.44

3 years ago

0.0.43

3 years ago

0.0.41

3 years ago

0.0.42

3 years ago

0.0.40

3 years ago

0.0.39

3 years ago

0.0.37

3 years ago

0.0.38

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.32

3 years ago

0.0.31

3 years ago

0.0.30

3 years ago

0.0.29

3 years ago

0.0.28

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago