Running: support-request.spec.cy.ts (4 of 5)
Support Request
Support Request Form
✓ should navigate to Buyer Cockpit or Checkout when clicking "my purchases" button (4399ms)
✓ should navigate to Buyer Cockpit when clicking cancel button (2304ms)
✓ should submit support request with "Other" topic and simple description (3556ms)
✓ should display validation errors when submitting empty form (1894ms)
✓ should enforce character limit on description field when typing (17437ms)
✓ should enforce character limit on description field when pasting text (2795ms)
✓ should display validation error for reason when topic requires it (3146ms)
✓ should display validation error for Description field when topic requires it (3350ms)
✓ should display validation error for Auction ID field when topic requires it (3339ms)
✓ should display validation error for Auction ID field when it has wrong length (3943ms)
✓ should mark Auction ID field as invalid when auction does not exist (2753ms)
✓ should display validation error for Missing Documents when required (3615ms)
✓ should not require auction ID for "Other" topic (2820ms)
✓ should show select documents field when topic is "Vehicle Documents" and reason is "Missing Vehicle Documents" (2947ms)
✓ should hide select documents field when reason is changed to something other than "Missing Vehicle Documents" (3229ms)
✓ should submit support request with "Vehicle Documents" topic and missing documents selected (4906ms)
✓ should display file upload components (1870ms)
✓ should upload a file and show it in the upload component (2294ms)
1) should require terms and conditions checkbox when file is uploaded
cy:command
✔
clearLocalStorage
cy:command
✔
visit /
cy:intercept
➟
Method: POST
Matcher: "**/api/v1/users/user-request"
cy:xhr
➟
GET https://dev.caronsale.de/api/v1/public/config/system
Status: 200
cy:xhr
➟
GET https://dev.caronsale.de/api/v1/meta
Status: 200
cy:intercept
➟
Method: GET
Matcher: "/\\/api\\/v2\\/auction\\/buyer\\/[A-Za-z0-9]{5}$/"
Mocked Response: req => {
const auctionId = req.url.split('/').pop();
console.log('AUCTION ID:', auctionId);
if (auctionId === TEST_AUCTION_ID_VALID) {
req.reply({
statusCode: 200,
body: { uuid: 'test-uuid', externalId: auctionId },
});
}
else {
req.reply({ statusCode: 404, body: { message: 'Auction not found' } });
}
}
cy:command
✔
window
cy:command
✔
task clearRequestHeaders
cy:intercept
➟
Matcher: {"method":"GET","url":"**/authenticated-user"}
cy:command
✔
window
cy:command
✔
wrap {}
cy:fetch
➟
POST https://cognito-idp.eu-central-1.amazonaws.com/
Status: 200
cons:log
✱
Angular is running in development mode.
cy:xhr
➟
GET https://res.cloudinary.com/castle-tech-gmbh/raw/upload/i18n/frontend-web/en.json?t=1771411923898
Status: 200
cy:xhr
➟
(e2e-buyer-alice) GET https://dev.caronsale.de/api/v1/authenticated-user
Status: 200
cy:xhr
➟
GET https://dev.caronsale.de/api/v1/users/profile/
Status: 200
cy:command
✔
wait @e2e-buyer-alice
cy:command
✔
task setRequestHeaders, Object{3}
cy:command
✔
task getRequestHeaders
cy:command
✔
assert expected **e2e-buyer-alice@caronsale.de** to equal **e2e-buyer-alice@caronsale.de**
Actual: "e2e-buyer-alice@caronsale.de"
Expected: "e2e-buyer-alice@caronsale.de"
cy:command
✔
window
cy:xhr
➟
GET https://dev.caronsale.de/api/v1/profile/salesman/e2e-buyer-alice@caronsale.de
Status: 200
cy:xhr
➟
GET https://dev.caronsale.de/api/v1/account/data/855040ef-aca9-471c-b604-94da31763921?augment=settingsBuyer
Status: 200
cy:command
✔
new url http://localhost:4200/salesman/support
cy:command
✔
get body
cy:command
✔
url
cy:command
✔
assert expected **http://localhost:4200/salesman/support** to include **/salesman/support**
cy:command
✔
get [data-cy=support-request_form]
cy:command
✔
assert expected **<app-support-request-form>** to be **visible**
cy:command
✔
get body
cy:intercept
➟
Method: POST
Matcher: "**/api.cloudinary.com/v1_1/**/upload"
Mocked Response: {"statusCode":200,"body":{"secure_url":"https://res.cloudinary.com/test/image/upload/test-file-1.png","public_id":"test-public-id-1"}}
cy:xhr
➟
GET https://dev.caronsale.de/api/v1/auction/salesman/counts?types=parked&filter=%7B%7D
Status: 200
cy:xhr
➟
GET https://dev.caronsale.de/api/v2/auction/buyer/saved-search?filter={%22limit%22:10,%22offset%22:0}
Status: 200
cy:xhr
➟
GET https://dev.caronsale.de/api/v1/profile/salesman/e2e-buyer-alice@caronsale.de/contact
Status: 200
cy:command
✔
get [data-cy=support-request-form_select-topic]
cy:command
✔
assert expected **<enzo-select.ng-untouched.ng-pristine.ng-invalid>** to be **visible**
cy:command
✔
click
cy:xhr
➟
GET https://dev.caronsale.de/api/v1/auction/salesman/count-saved-searches?searches=9db4e364-5ff3-4bc0-af42-4be7a574d2af&searches=6e625d25-6657-414d-860e-6f41ba135213&type=active
Status: 200
cy:command
✔
get [data-cy=enzo_flyout]
cy:command
✔
assert expected **<div.flyout.ng-star-inserted>** to be **visible**
cy:command
✔
get [data-cy=enzo_flyout]
cy:command
✔
find .option
cy:command
✔
last
cy:command
✔
click
cy:command
✔
get [data-cy=enzo_flyout]
cy:command
✔
assert expected **[data-cy=enzo_flyout]** not to exist in the DOM
Actual: "[data-cy=enzo_flyout]"
Expected: "[data-cy=enzo_flyout]"
cy:command
✔
get [data-cy=support-request-form_input-description]
cy:command
✔
find textarea
cy:command
✔
assert expected **<textarea>** to be **visible**
cy:command
✔
type Test description
cy:command
✔
get [data-cy=support-request-form_file-upload-1]
cy:command
✔
shadow
cy:command
✔
find input[type="file"]
cy:command
✔
assert expected **<input>** to exist in the DOM
Actual: "<input>"
Expected: "<input>"
cy:command
✔
selectFile Object{3}, {force: true}
cy:command
✔
wait @cloudinaryUpload
cy:xhr
➟
POST https://dev.caronsale.de/api/v1/media/signature
Status: 200
cy:xhr
➟
(cloudinaryUpload) STUBBED POST https://api.cloudinary.com/v1_1/castle-tech-gmbh-dev/auto/upload
Status: 200
cy:command
✔
get [data-cy=support-request-form_button-submit]
cy:command
✔
assert expected **<enzo-button>** to be **visible**
cy:command
✔
scrollIntoView
cy:command
✔
click
cy:command
✔
get @submitSupportRequest.all
cy:command
✔
assert expected **[]** to have a length of **0**
cy:command
✘
get .checkbox-wrapper
cons:error
✘
TypeError: Cannot read properties of null (reading 'length')
at Object.next (http://localhost:4200/support-request.component-LM2UUJG2.js:535:17)
at ConsumerObserver.next (http://localhost:4200/chunk-S6TLEG7F.js:339:25)
at SafeSubscriber._next (http://localhost:4200/chunk-S6TLEG7F.js:308:22)
at SafeSubscriber.next (http://localhost:4200/chunk-S6TLEG7F.js:281:12)
at emit (http://localhost:4200/chunk-S6TLEG7F.js:1738:20)
at AsyncAction.emitWhenIdle (http://localhost:4200/chunk-S6TLEG7F.js:1749:7)
at AsyncAction._execute (http://localhost:4200/chunk-S6TLEG7F.js:1568:12)
at AsyncAction.execute (http://localhost:4200/chunk-S6TLEG7F.js:1557:24)
at AsyncScheduler.flush (http://localhost:4200/chunk-S6TLEG7F.js:1637:26)
at timer (http://localhost:4200/polyfill ...
cons:error
✘
TypeError: Cannot read properties of null (reading 'length')
at Object.next (http://localhost:4200/support-request.component-LM2UUJG2.js:535:17)
at ConsumerObserver.next (http://localhost:4200/chunk-S6TLEG7F.js:339:25)
at SafeSubscriber._next (http://localhost:4200/chunk-S6TLEG7F.js:308:22)
at SafeSubscriber.next (http://localhost:4200/chunk-S6TLEG7F.js:281:12)
at emit (http://localhost:4200/chunk-S6TLEG7F.js:1738:20)
at AsyncAction.emitWhenIdle (http://localhost:4200/chunk-S6TLEG7F.js:1749:7)
at AsyncAction._execute (http://localhost:4200/chunk-S6TLEG7F.js:1568:12)
at AsyncAction.execute (http://localhost:4200/chunk-S6TLEG7F.js:1557:24)
at AsyncScheduler.flush (http://localhost:4200/chunk-S6TLEG7F.js:1637:26)
at timer (http://localhost:4200/polyfill ...
✓ should submit form successfully when file is uploaded and terms checkbox is checked (3668ms)
✓ should not submit form when file is uploaded and terms checkbox is not checked (3054ms)
✓ should allow deleting an uploaded file (2391ms)
✓ should not require terms checkbox when no file is uploaded (3343ms)
✓ should upload multiple files (2460ms)
Support Request Submitted
✓ should display success view after form submission (3419ms)
✓ should return to Support Request Form when clicking back button (3733ms)
✓ should navigate to Buyer Cockpit when clicking done button (3430ms)
26 passing (2m)
1 failing
1) Support Request
Support Request Form
should require terms and conditions checkbox when file is uploaded:
AssertionError: Timed out retrying after 10000ms: Expected to find element: `.checkbox-wrapper`, but never found it.
at Context.eval (webpack:///../e2e/caronsale-frontend-web/support-request.spec.cy.ts:401:0)
────────────────────────────────────────────────────────────────────────────────────────────────────