Skip to content

Commit

Permalink
PB-878: Use readFile to prevent failure of reading fixture file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni committed Dec 11, 2024
1 parent 09d73da commit 0947b5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/cypress/tests-e2e/print.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ describe('Testing print', () => {
cy.get('[data-cy="import-file-online-content"]').should('be.visible')

const localKmlFileName = 'external-kml-file.kml'
const localKmlFile = `import-tool/${localKmlFileName}`
const localKmlFile = `tests/cypress/fixtures/import-tool/${localKmlFileName}`

// Test local import
cy.log('Switch to local import')
Expand All @@ -370,7 +370,7 @@ describe('Testing print', () => {

// Attach a local KML file
cy.log('Test add a local KML file')
cy.fixture(localKmlFile, null).as('kmlFixture')
cy.readFile(localKmlFile, null).as('kmlFixture')
cy.get('[data-cy="file-input"]').selectFile('@kmlFixture', {
force: true,
})
Expand Down Expand Up @@ -450,7 +450,7 @@ describe('Testing print', () => {
cy.get('[data-cy="import-file-content"]').should('be.visible')
cy.get('[data-cy="import-file-online-content"]').should('be.visible')

const localGpxlFile = 'print/line-and-marker.gpx'
const localGpxlFile = 'tests/cypress/fixtures/print/line-and-marker.gpx'

// Test local import
cy.log('Switch to local import')
Expand All @@ -459,7 +459,7 @@ describe('Testing print', () => {

// Attach a local GPX file
cy.log('Test add a local GPX file')
cy.fixture(localGpxlFile, null).as('gpxFixture')
cy.readFile(localGpxlFile, null).as('gpxFixture')
cy.get('[data-cy="file-input"]').selectFile('@gpxFixture', {
force: true,
})
Expand Down

0 comments on commit 0947b5f

Please sign in to comment.