mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Mount with contexts now that i18n is used on workflow start node
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { mount } from 'enzyme';
|
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
|
||||||
import { WorkflowStateContext } from '../../contexts/Workflow';
|
import { WorkflowStateContext } from '../../contexts/Workflow';
|
||||||
import WorkflowStartNode from './WorkflowStartNode';
|
import WorkflowStartNode from './WorkflowStartNode';
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ const nodePositions = {
|
|||||||
|
|
||||||
describe('WorkflowStartNode', () => {
|
describe('WorkflowStartNode', () => {
|
||||||
test('mounts successfully', () => {
|
test('mounts successfully', () => {
|
||||||
const wrapper = mount(
|
const wrapper = mountWithContexts(
|
||||||
<svg>
|
<svg>
|
||||||
<WorkflowStateContext.Provider value={{ nodePositions }}>
|
<WorkflowStateContext.Provider value={{ nodePositions }}>
|
||||||
<WorkflowStartNode
|
<WorkflowStartNode
|
||||||
@@ -25,7 +25,7 @@ describe('WorkflowStartNode', () => {
|
|||||||
expect(wrapper).toHaveLength(1);
|
expect(wrapper).toHaveLength(1);
|
||||||
});
|
});
|
||||||
test('tooltip shown on hover', () => {
|
test('tooltip shown on hover', () => {
|
||||||
const wrapper = mount(
|
const wrapper = mountWithContexts(
|
||||||
<svg>
|
<svg>
|
||||||
<WorkflowStateContext.Provider value={{ nodePositions }}>
|
<WorkflowStateContext.Provider value={{ nodePositions }}>
|
||||||
<WorkflowStartNode nodePositions={nodePositions} showActionTooltip />
|
<WorkflowStartNode nodePositions={nodePositions} showActionTooltip />
|
||||||
|
|||||||
Reference in New Issue
Block a user