-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add as MapView component test - doesn't really do much and should be extended - remove old spec
- Loading branch information
1 parent
b4767b9
commit ee4e60a
Showing
2 changed files
with
25 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import mapViewDataTemplates from 'fixtures/map-view-data.js' | ||
import MapView from './MapView.vue' | ||
import MapViewProps from 'fixtures/map-view-props.js' | ||
import I18nBuilder from '@/i18n/i18n-builder' | ||
import AppLoader from '@/app-loader' | ||
import store from '@/store/store' | ||
|
||
describe('Map rendering', () => { | ||
beforeEach(() => { | ||
cy.intercept('GET', 'https://*.tile.openstreetmap.org/*/*/*.png', {fixture: 'map-pin.jpg'}) | ||
}) | ||
it('should render map-view with single place', () => { | ||
new AppLoader().fetchApiInitialData() | ||
let props = {... MapViewProps, ... {mapViewData: mapViewDataTemplates.singlePlace}} | ||
cy.mount(MapView, {propsData: props, i18n: I18nBuilder.build(), store: store}) | ||
|
||
cy.get('#map-view') | ||
}) | ||
it('should render map-view with place search results', () => { | ||
new AppLoader().fetchApiInitialData() | ||
let props = {... MapViewProps, ... {mapViewData: mapViewDataTemplates.placeSearchResults}} | ||
cy.mount(MapView, {propsData: props, i18n: I18nBuilder.build(), store: store}) | ||
cy.get('#map-view') | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.