Created
October 25, 2018 15:14
-
-
Save ivan-hilckov/9f8dd6c502970091db814993728e09ae to your computer and use it in GitHub Desktop.
айдишки для cypress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import get from 'lodash/get' | |
import { isDevelopment } from 'utils/isDevelopment' | |
export const TEST_ID = { | |
components: { | |
LayerCard: { | |
image: 'components.LayerCard.image', | |
vector: 'components.LayerCard.vector', | |
cad: 'components.LayerCard.cad', | |
xyz: 'components.LayerCard.xyz', | |
wms: 'components.LayerCard.wms', | |
}, | |
}, | |
containers: { | |
LayersList: { | |
add: 'containers.LayersList.add', | |
Node: { | |
measure: 'containers.LayersList.Node.measure', | |
image: 'containers.LayersList.Node.image', | |
vector: 'containers.LayersList.Node.vector', | |
cad: 'containers.LayersList.Node.cad', | |
xyz: 'containers.LayersList.Node.xyz', | |
wms: 'containers.LayersList.Node.wms', | |
}, | |
}, | |
}, | |
layouts: { | |
Form: { | |
close: 'layouts.Form.close', | |
back: 'layouts.Form.back', | |
icon: 'layouts.Form.icon', | |
title: 'layouts.Form.title', | |
subtitle: 'layouts.Form.subtitle', | |
description: 'layouts.Form.description', | |
}, | |
}, | |
pages: { | |
NoMatch: { | |
root: 'pages.NoMatch.root', | |
}, | |
}, | |
ui: {}, | |
} | |
export const getTestId = (path, dictionary = TEST_ID) => | |
isDevelopment && get(dictionary, path) ? { 'data-testid': get(dictionary, path) } : {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment