Skip to content

Conversation

@sommerfe
Copy link
Contributor

@sommerfe sommerfe commented Nov 11, 2025

@sommerfe sommerfe self-assigned this Nov 11, 2025
@sommerfe sommerfe changed the base branch from develop to feat-PB-1383-pinia-store November 11, 2025 15:04
@github-actions github-actions bot added the bug label Nov 11, 2025
@sommerfe sommerfe force-pushed the fix-pb-2064-reportproblem-cypress branch from 330f582 to ed0d7b9 Compare November 13, 2025 08:18
@cypress
Copy link

cypress bot commented Nov 13, 2025

web-mapviewer    Run #6038

Run Properties:  status check failed Failed #6038  •  git commit e3706f4b01: PB-2064: refactor online mode
Project web-mapviewer
Branch Review fix-pb-2064-reportproblem-cypress
Run status status check failed Failed #6038
Run duration 11m 24s
Commit git commit e3706f4b01: PB-2064: refactor online mode
Committer Felix Sommer
View all properties for this run ↗︎

Test results
Tests that failed  Failures 57
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 20
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 109
View all changes introduced in this branch ↗︎

Tests for review

Failed  drawing.cy.ts • 1 failed test • e2e/chrome/mobile

View Output

Test Artifacts
An uncaught error was detected outside of a test Test Replay Screenshots
Failed  timeSlider.cy.ts • 3 failed tests • e2e/chrome/mobile

View Output

Test Artifacts
Cypress tests covering the time slider, its functionalities and its URL parameter > checking the time slider behavior, both on startup and during use > checks that the time slider is functional and behave correctly part 1 Test Replay Screenshots
Cypress tests covering the time slider, its functionalities and its URL parameter > checking the time slider behavior, both on startup and during use > checks that the time slider is functional and behave correctly with the timeSlider param at startup Test Replay Screenshots
Cypress tests covering the time slider, its functionalities and its URL parameter > checking the time slider behavior, both on startup and during use > behaves correctly when years are being entered in the input Test Replay Screenshots
Failed  legacyParamImport.cy.ts • 1 failed test • e2e/chrome/mobile

View Output

Test Artifacts
An uncaught error was detected outside of a test Test Replay Screenshots
Failed  layers.cy.ts • 1 failed test • e2e/chrome/mobile

View Output

Test Artifacts
An uncaught error was detected outside of a test Test Replay Screenshots
Failed  menuTray.cy.ts • 1 failed test • e2e/chrome/mobile

View Output

Test Artifacts
An uncaught error was detected outside of a test Test Replay Screenshots

The first 5 failed specs are shown, see all 24 specs in Cypress Cloud.

@sommerfe sommerfe force-pushed the fix-pb-2064-reportproblem-cypress branch 4 times, most recently from feffc53 to 4507978 Compare November 18, 2025 09:16
@sommerfe sommerfe force-pushed the fix-pb-2064-reportproblem-cypress branch from d7a8296 to b098f29 Compare November 18, 2025 13:08
@sommerfe sommerfe requested a review from pakb November 19, 2025 15:21
Comment on lines 59 to 60
/** Flag to indicate if the user is currently reporting a problem with the drawing */
reportProblemDrawing: boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling that online was exactly there to cover this use-case.

Can you check if you can get by only by setting/reading drawingStore.online (with maybe an option to set it correctly when calling drawingStore.initiateDrawing if it doesn't exist yet)?

Here we are bringing business names and logic (report a problem) that has nothing to do with the drawing per-say, I'd like to keep that separated as much as possible

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem i was facing was when we do first report problem drawing and before submitting, create a normal drawing. Or the other way around first normal drawing and then report problem drawing. In this case the online variable is not sufficient, because we then loose track of the fact that we have a report problem drawing which is not submitted yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we should change how initiateDrawing works, and be able to give there the "on-going" drawing from the report a problem.

If we could keep the drawing module the most oblivious to the rest of the app, the better we will be able to make a module out of it down the line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok i can have a look at it and see if i can find a simpler solution for it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pakb I refactored the boolean online into an enum to hold the different states we have, please check if it is ok like this

validate = undefined,
dataCy = '',
} = defineProps<{
const props = withDefaults(defineProps<{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validMarker and invalidMarker are already flagged with ? (optional), I don't think it's required to set a defautl value to them anyway.

If it's the case because the TS type-checking complains otherwise, I'd not use withDefaults, but do a two phase deconstruct.

const props = defineProps<...>()

const { propsNeedingDefault = undefined } = props

// don't do a full `toRefs` on all the props (it will wrap some that we don't require) but specifically ref some
const label = toRef(props, 'label' /* eventual default value here as 3rd arg */)
// ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tried using this, but all the reactivity didn't work anymore, this is what copilot told me why it is not working

The problem is that in TypeScript/Vue 3, when you define optional props without withDefaults, they default to undefined when not provided. However, boolean props have special behavior in Vue:
When you don't use withDefaults and a boolean prop is not provided, it's undefined
But Vue's prop system can sometimes treat missing boolean props as false instead of undefined

I checked and the values are really evaluated as false, and i think this is killing the reactivity because when they change value to false e.g. it is not passed along since the value was already false before

force: true,
})
cy.get('@submit').click()
cy.get('[data-cy="file-input-text"]').should('have.class', 'is-valid')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't that some valid testing? Why remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the submitting worked, the file-input-text is not there anymore, the report problem modal just shows a confirmation of the submitting message. Not sure why it worked before

cy.log('Write description and email')
cy.get('[data-cy="report-problem-text-area"] [data-cy="text-area-input"]')
.as('textArea')
.scrollIntoView()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK all the call to .scrollIntoView were there to help the CI that was a bit flaky there, I don't know if it's a good idea to remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my tests the .scrollIntoView did not work and without it it worked

@sommerfe sommerfe requested a review from pakb November 20, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants