mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
add first e2e feature
This commit is contained in:
parent
588764cf8d
commit
c7bff78f3b
@ -28,6 +28,7 @@ export default defineConfig({
|
||||
specPattern: ['**/**/*.cy.{ts,tsx}'],
|
||||
},
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:5173',
|
||||
chromeWebSecurity: false,
|
||||
retries: 0,
|
||||
specPattern: 'features/**/*.feature',
|
||||
|
||||
25
cypress/support/step_definitions/map.ts
Normal file
25
cypress/support/step_definitions/map.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { Given, Then } from '@badeball/cypress-cucumber-preprocessor'
|
||||
|
||||
Given('I am on the map page', () => {
|
||||
cy.visit('/')
|
||||
})
|
||||
|
||||
Then('the map component should be present', () => {
|
||||
cy.get('.leaflet-tile-container')
|
||||
.should('exist')
|
||||
.children('.leaflet-tile-loaded')
|
||||
.should('have.length.greaterThan', 0)
|
||||
.and('be.visible')
|
||||
})
|
||||
|
||||
Then('the search input control should be present', () => {
|
||||
cy.get('.tw-input').should('be.visible')
|
||||
})
|
||||
|
||||
Then('the geolocation control should be present', () => {
|
||||
cy.get('div.tw-card:nth-child(2) > div:nth-child(1)').should('be.visible')
|
||||
})
|
||||
|
||||
Then('the layers control should be present', () => {
|
||||
cy.get('div.tw-bg-base-100:nth-child(1)').should('be.visible')
|
||||
})
|
||||
20
features/Map.feature
Normal file
20
features/Map.feature
Normal file
@ -0,0 +1,20 @@
|
||||
Feature: Map
|
||||
As a user
|
||||
I want to have the leaflet map and its control elements available
|
||||
To be able to interact with the map
|
||||
|
||||
Scenario: Map Component
|
||||
Given I am on the map page
|
||||
Then the map component should be present
|
||||
|
||||
Scenario: Search Control
|
||||
Given I am on the map page
|
||||
Then the search input control should be present
|
||||
|
||||
Scenario: Geolocation Control
|
||||
Given I am on the map page
|
||||
Then the geolocation control should be present
|
||||
|
||||
Scenario: Layers Control
|
||||
Given I am on the map page
|
||||
Then the layers control should be present
|
||||
Loading…
x
Reference in New Issue
Block a user