Commit c476f815 authored by Yakubov, Sergey's avatar Yakubov, Sergey
Browse files

Merge branch 'fix-client-tests-jobinfo' into 'dev'

Fix JobInformation client tests

See merge request !55
parents 5304480e b0ad3f74
Loading
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@ import flushPromises from "flush-promises";
jest.mock("app");

const JOB_ID = "test_id";
const STDOUT_POSITION = 0;
const STDOUT_LENGTH = 6;
const STDOUT_TEXT = "stdout";

const localVue = getLocalVue();

@@ -21,7 +24,7 @@ describe("JobInformation/JobInformation.vue", () => {
    beforeEach(() => {
        axiosMock = new MockAdapter(axios);
        axiosMock.onGet(new RegExp(`api/configuration/decode/*`)).reply(200, { decoded_id: 123 });
        axiosMock.onGet("/api/jobs/test_id?full=True").reply(200, jobResponse);
        axiosMock.onGet("/api/jobs/test_id?full=True&stdout_position=0&stdout_length=50000").reply(200, jobResponse);
    });

    afterEach(() => {
@@ -42,6 +45,9 @@ describe("JobInformation/JobInformation.vue", () => {
    beforeEach(async () => {
        const propsData = {
            job_id: JOB_ID,
            stdout_position: STDOUT_POSITION,
            stdout_length: STDOUT_LENGTH,
            stdout_text: STDOUT_TEXT,
        };
        wrapper = mount(JobInformation, {
            propsData,