Commit ea5fb9e3 authored by pburdette's avatar pburdette

Change more trace instances

Change a few more trace instances
to job log.
parent 41d44191
...@@ -31,7 +31,7 @@ export default () => ({ ...@@ -31,7 +31,7 @@ export default () => ({
}, },
/** /**
* Logs including trace * Jobs with logs
*/ */
logs: { logs: {
lines: [], lines: [],
......
...@@ -47,31 +47,31 @@ describe('Job log controllers', () => { ...@@ -47,31 +47,31 @@ describe('Job log controllers', () => {
expect(findTruncatedInfo().text()).toMatch('499.95 KiB'); expect(findTruncatedInfo().text()).toMatch('499.95 KiB');
}); });
it('renders link to raw trace', () => { it('renders link to raw job log', () => {
expect(findRawLink().attributes('href')).toBe(defaultProps.rawPath); expect(findRawLink().attributes('href')).toBe(defaultProps.rawPath);
}); });
}); });
}); });
describe('links section', () => { describe('links section', () => {
describe('with raw trace path', () => { describe('with raw job log path', () => {
beforeEach(() => { beforeEach(() => {
createWrapper(); createWrapper();
}); });
it('renders raw trace link', () => { it('renders raw job log link', () => {
expect(findRawLinkController().attributes('href')).toBe(defaultProps.rawPath); expect(findRawLinkController().attributes('href')).toBe(defaultProps.rawPath);
}); });
}); });
describe('without raw trace path', () => { describe('without raw job log path', () => {
beforeEach(() => { beforeEach(() => {
createWrapper({ createWrapper({
rawPath: null, rawPath: null,
}); });
}); });
it('does not render raw trace link', () => { it('does not render raw job log link', () => {
expect(findRawLinkController().exists()).toBe(false); expect(findRawLinkController().exists()).toBe(false);
}); });
}); });
......
...@@ -244,15 +244,15 @@ describe('Job State actions', () => { ...@@ -244,15 +244,15 @@ describe('Job State actions', () => {
}); });
describe('when job is incomplete', () => { describe('when job is incomplete', () => {
let tracePayload; let jobLogPayload;
beforeEach(() => { beforeEach(() => {
tracePayload = { jobLogPayload = {
html: 'I, [2018-08-17T22:57:45.707325 #1841] INFO -- :', html: 'I, [2018-08-17T22:57:45.707325 #1841] INFO -- :',
complete: false, complete: false,
}; };
mock.onGet(`${TEST_HOST}/endpoint/trace.json`).replyOnce(200, tracePayload); mock.onGet(`${TEST_HOST}/endpoint/trace.json`).replyOnce(200, jobLogPayload);
}); });
it('dispatches startPollingJobLog', (done) => { it('dispatches startPollingJobLog', (done) => {
...@@ -263,7 +263,7 @@ describe('Job State actions', () => { ...@@ -263,7 +263,7 @@ describe('Job State actions', () => {
[], [],
[ [
{ type: 'toggleScrollisInBottom', payload: true }, { type: 'toggleScrollisInBottom', payload: true },
{ type: 'receiveJobLogSuccess', payload: tracePayload }, { type: 'receiveJobLogSuccess', payload: jobLogPayload },
{ type: 'startPollingJobLog' }, { type: 'startPollingJobLog' },
], ],
done, done,
...@@ -280,7 +280,7 @@ describe('Job State actions', () => { ...@@ -280,7 +280,7 @@ describe('Job State actions', () => {
[], [],
[ [
{ type: 'toggleScrollisInBottom', payload: true }, { type: 'toggleScrollisInBottom', payload: true },
{ type: 'receiveJobLogSuccess', payload: tracePayload }, { type: 'receiveJobLogSuccess', payload: jobLogPayload },
], ],
done, done,
); );
...@@ -390,7 +390,7 @@ describe('Job State actions', () => { ...@@ -390,7 +390,7 @@ describe('Job State actions', () => {
}); });
describe('receiveJobLogError', () => { describe('receiveJobLogError', () => {
it('should commit stop polling trace', (done) => { it('should commit stop polling job log', (done) => {
testAction(receiveJobLogError, null, mockedState, [], [{ type: 'stopPollingJobLog' }], done); testAction(receiveJobLogError, null, mockedState, [], [{ type: 'stopPollingJobLog' }], done);
}); });
}); });
......
...@@ -46,7 +46,7 @@ describe('Jobs Store Mutations', () => { ...@@ -46,7 +46,7 @@ describe('Jobs Store Mutations', () => {
}); });
describe('RECEIVE_JOB_LOG_SUCCESS', () => { describe('RECEIVE_JOB_LOG_SUCCESS', () => {
describe('when trace has state', () => { describe('when job log has state', () => {
it('sets jobLogState', () => { it('sets jobLogState', () => {
const stateLog = const stateLog =
'eyJvZmZzZXQiOjczNDQ1MSwibl9vcGVuX3RhZ3MiOjAsImZnX2NvbG9yIjpudWxsLCJiZ19jb2xvciI6bnVsbCwic3R5bGVfbWFzayI6MH0='; 'eyJvZmZzZXQiOjczNDQ1MSwibl9vcGVuX3RhZ3MiOjAsImZnX2NvbG9yIjpudWxsLCJiZ19jb2xvciI6bnVsbCwic3R5bGVfbWFzayI6MH0=';
...@@ -76,7 +76,7 @@ describe('Jobs Store Mutations', () => { ...@@ -76,7 +76,7 @@ describe('Jobs Store Mutations', () => {
}); });
}); });
it('sets trace, trace size and isJobLogComplete', () => { it('sets job log size and isJobLogComplete', () => {
mutations[types.RECEIVE_JOB_LOG_SUCCESS](stateCopy, { mutations[types.RECEIVE_JOB_LOG_SUCCESS](stateCopy, {
append: true, append: true,
html, html,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment