test: improve e2e tests and add COMPLETE_EXCHANGE permission tests

- Fix E2E test assertion for buy/sell direction change
- Add data-testid to date buttons for reliable e2e selection
- Update e2e tests to use data-testid instead of fragile weekday matching
- Add tests for regular user cannot complete/no-show trades (COMPLETE_EXCHANGE permission)
This commit is contained in:
counterweight 2025-12-23 11:00:32 +01:00
parent ef01a970d5
commit ca3a08a236
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 81 additions and 34 deletions

View file

@ -462,6 +462,7 @@ export default function ExchangePage() {
return (
<button
key={dateStr}
data-testid={`date-${dateStr}`}
onClick={() => handleDateSelect(date)}
disabled={isDisabled}
style={{