| technologyType: "Backend", | technologyType: "Backend", | ||||
| isChecked: false, | isChecked: false, | ||||
| }, | }, | ||||
| ]); | |||||
| ]) | |||||
| }); | }); | ||||
| afterEach(() => { | afterEach(() => { | ||||
| fireEvent.click(container.getByTestId("ad-filters-submit")[0]); | fireEvent.click(container.getByTestId("ad-filters-submit")[0]); | ||||
| expect(container.getElementsByClassName("ad-card").length).toBeGreaterThan(0); | |||||
| expect( | |||||
| container.getElementsByClassName("ad-card").length | |||||
| ).toBeGreaterThan(0); | |||||
| }); | }); | ||||
| }); | }); | ||||
| it("Should render Ads", async () => { | |||||
| const { container } = render(cont); | |||||
| waitFor(() => | |||||
| expect( | |||||
| container.getElementsByClassName("ad-card").length | |||||
| ).toBeGreaterThan(0) | |||||
| ); | |||||
| }); | |||||
| it("Should navigate to ad details when click on ad card", async () => { | |||||
| const { container } = render(cont); | |||||
| fireEvent.click(container.getElementsByClassName("ad-card")[0]); | |||||
| expect(props.history.push).toHaveBeenCalledWith("/ads/1"); | |||||
| }); | |||||
| }); | }); |
| margin-bottom: 9px; | margin-bottom: 9px; | ||||
| } | } | ||||
| .apply-for-ad-modal-form-control { | |||||
| border: none; | |||||
| box-sizing: border-box; | |||||
| outline: 0; | |||||
| position: relative; | |||||
| width: 100%; | |||||
| } | |||||
| .apply-for-ad-modal-form-control input[type="date"]::-webkit-calendar-picker-indicator { | |||||
| background: transparent; | |||||
| bottom: 0; | |||||
| color: transparent; | |||||
| cursor: pointer; | |||||
| height: auto; | |||||
| left: 0; | |||||
| position: absolute; | |||||
| right: 0; | |||||
| top: 0; | |||||
| width: auto; | |||||
| } | |||||
| .apply-for-ad-modal-form-control label { | .apply-for-ad-modal-form-control label { | ||||
| font-family: "Source Sans Pro"; | font-family: "Source Sans Pro"; | ||||
| font-style: normal; | font-style: normal; | ||||
| color: #226cb0; | color: #226cb0; | ||||
| cursor: pointer; | cursor: pointer; | ||||
| } | } | ||||
| .create-ad-form-control-first-step-input { | |||||
| border: none; | |||||
| box-sizing: border-box; | |||||
| outline: 0; | |||||
| position: relative; | |||||
| width: 100%; | |||||
| } | |||||
| .create-ad-form-control input[type="date"]::-webkit-calendar-picker-indicator { | |||||
| background: transparent; | |||||
| bottom: 0; | |||||
| color: transparent; | |||||
| cursor: pointer; | |||||
| height: auto; | |||||
| left: 0; | |||||
| position: absolute; | |||||
| right: 0; | |||||
| top: 0; | |||||
| width: auto; | |||||
| } |
| } | } | ||||
| .pattern-details-card-sub-card-add-email input, | .pattern-details-card-sub-card-add-email input, | ||||
| .pattern-details-card-sub-card-add-email select { | |||||
| .pattern-details-card-sub-card-add-email select { | |||||
| margin-right: 18px; | margin-right: 18px; | ||||
| flex: 50; | flex: 50; | ||||
| box-sizing: border-box; | box-sizing: border-box; | ||||
| flex-direction: column; | flex-direction: column; | ||||
| height: 256px !important; | height: 256px !important; | ||||
| border: 2px solid#ccc !important; | border: 2px solid#ccc !important; | ||||
| background:rgb(224, 224, 224) !important; | |||||
| background: rgb(224, 224, 224) !important; | |||||
| border-radius: 6px; | border-radius: 6px; | ||||
| padding: 1rem; | padding: 1rem; | ||||
| } | } | ||||
| color: #272727; | color: #272727; | ||||
| } | } | ||||
| .custom-drawer-sub-card-content-sub { | |||||
| border: none; | |||||
| box-sizing: border-box; | |||||
| outline: 0; | |||||
| position: relative; | |||||
| width: 100% !important; | |||||
| } | |||||
| .custom-drawer-sub-card-content-sub input { | |||||
| width: 100% !important; | |||||
| } | |||||
| .custom-drawer-sub-card-content-input-1::-webkit-calendar-picker-indicator, | |||||
| .custom-drawer-sub-card-content-input-2::-webkit-calendar-picker-indicator { | |||||
| background: transparent; | |||||
| bottom: 0; | |||||
| color: transparent; | |||||
| cursor: pointer; | |||||
| height: auto; | |||||
| left: 0; | |||||
| position: absolute; | |||||
| right: 0; | |||||
| top: 0; | |||||
| width: auto; | |||||
| } | |||||
| .custom-drawer-sub-card-content-sub-label { | .custom-drawer-sub-card-content-sub-label { | ||||
| font-family: "Source Sans Pro"; | font-family: "Source Sans Pro"; | ||||
| font-style: normal; | font-style: normal; |
| </div> | </div> | ||||
| <div className="custom-drawer-sub-card-content"> | <div className="custom-drawer-sub-card-content"> | ||||
| <FormGroup style={{ marginBottom: "9px" }}> | <FormGroup style={{ marginBottom: "9px" }}> | ||||
| <label className="custom-drawer-sub-card-content-sub-label"> | |||||
| Od | |||||
| </label> | |||||
| <input | |||||
| type="date" | |||||
| onChange={(e) => setFromDate(e.target.value)} | |||||
| value={fromDate} | |||||
| /> | |||||
| <div className="custom-drawer-sub-card-content-sub"> | |||||
| <label className="custom-drawer-sub-card-content-sub-label"> | |||||
| Od | |||||
| </label> | |||||
| <input | |||||
| type="date" | |||||
| className="custom-drawer-sub-card-content-input-1" | |||||
| onChange={(e) => setFromDate(e.target.value)} | |||||
| value={fromDate} | |||||
| /> | |||||
| </div> | |||||
| </FormGroup> | </FormGroup> | ||||
| <FormGroup> | <FormGroup> | ||||
| <label className="custom-drawer-sub-card-content-sub-label"> | |||||
| Do | |||||
| </label> | |||||
| <input | |||||
| type="date" | |||||
| onChange={(e) => setToDate(e.target.value)} | |||||
| value={toDate} | |||||
| /> | |||||
| <div className="custom-drawer-sub-card-content-sub"> | |||||
| <label className="custom-drawer-sub-card-content-sub-label"> | |||||
| Do | |||||
| </label> | |||||
| <input | |||||
| type="date" | |||||
| className="custom-drawer-sub-card-content-input-2" | |||||
| onChange={(e) => setToDate(e.target.value)} | |||||
| value={toDate} | |||||
| /> | |||||
| </div> | |||||
| </FormGroup> | </FormGroup> | ||||
| </div> | </div> | ||||
| </div> | </div> |
| expiredAt, | expiredAt, | ||||
| setExpiredAt, | setExpiredAt, | ||||
| }) => { | }) => { | ||||
| const employmentTypeHandler = (type) => { | const employmentTypeHandler = (type) => { | ||||
| setEmploymentType(type); | setEmploymentType(type); | ||||
| }; | }; |
| selectionLevelFilter={selectionLevelFilter} | selectionLevelFilter={selectionLevelFilter} | ||||
| onChangeFilterCheckboxes={handleFilterCheckboxes} | onChangeFilterCheckboxes={handleFilterCheckboxes} | ||||
| /> | /> | ||||
| {/* <CustomDrawer | |||||
| title="Šabloni" | |||||
| open={openFilterDrawer} | |||||
| onCloseDrawer={closeFilterDrawerHandler} | |||||
| > | |||||
| <form onSubmit={submitFiltersHandler}> | |||||
| <div className="custom-drawer"> | |||||
| <div> | |||||
| <div className="custom-drawer-sub-card"> | |||||
| <div className="custom-drawer-sub-card-label"> | |||||
| <p>Kategorija</p> | |||||
| </div> | |||||
| <div className="custom-drawer-sub-card-content"> | |||||
| <FormGroup> | |||||
| {selectionLevelFilter.map((process) => ( | |||||
| <FormControlLabel | |||||
| key={process.id} | |||||
| control={ | |||||
| <Checkbox | |||||
| value={process.name} | |||||
| checked={process.isChecked} | |||||
| onChange={handleFilterCheckboxes.bind( | |||||
| this, | |||||
| process.id | |||||
| )} | |||||
| /> | |||||
| } | |||||
| label={process.name} | |||||
| /> | |||||
| ))} | |||||
| </FormGroup> | |||||
| </div> | |||||
| </div> | |||||
| <div className="custom-drawer-sub-card"> | |||||
| <div className="custom-drawer-sub-card-label"> | |||||
| <p>Datum kreiranja</p> | |||||
| </div> | |||||
| <div className="custom-drawer-sub-card-content"> | |||||
| <FormGroup style={{ marginBottom: "9px" }}> | |||||
| <label className="custom-drawer-sub-card-content-sub-label"> | |||||
| Od | |||||
| </label> | |||||
| <input | |||||
| type="date" | |||||
| onChange={(e) => setFromDate(e.target.value)} | |||||
| value={fromDate} | |||||
| /> | |||||
| </FormGroup> | |||||
| <FormGroup> | |||||
| <label className="custom-drawer-sub-card-content-sub-label"> | |||||
| Do | |||||
| </label> | |||||
| <input | |||||
| type="date" | |||||
| onChange={(e) => setToDate(e.target.value)} | |||||
| value={toDate} | |||||
| /> | |||||
| </FormGroup> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <div className="custom-drawer-submit"> | |||||
| <button className="c-btn c-btn--primary">Pretrazi</button> | |||||
| </div> | |||||
| </div> | |||||
| </form> | |||||
| </CustomDrawer> */} | |||||
| <CustomModal | <CustomModal | ||||
| open={openAddPatternModal} | open={openAddPatternModal} | ||||
| onCloseModal={closeAddPatternModalHandler} | onCloseModal={closeAddPatternModalHandler} | ||||
| onInit={(evt, editor) => (addPatternEditor.current = editor)} | onInit={(evt, editor) => (addPatternEditor.current = editor)} | ||||
| style={{ height: "100px !important" }} | style={{ height: "100px !important" }} | ||||
| /> | /> | ||||
| {/* <textarea | |||||
| rows="11" | |||||
| value={addPatternMessage} | |||||
| onChange={(e) => { | |||||
| if (e.target.value === "\n") { | |||||
| setAddPatternMessage("<br>"); | |||||
| } else { | |||||
| setAddPatternMessage(e.target.value); | |||||
| } | |||||
| }} | |||||
| ></textarea> */} | |||||
| </div> | </div> | ||||
| <div className="add-pattern-modal-form-control"> | <div className="add-pattern-modal-form-control"> | ||||
| <input type="submit" value="DODAJ ŠABLON" /> | <input type="submit" value="DODAJ ŠABLON" /> | ||||
| onInit={(evt, editor) => (editPatternEditor.current = editor)} | onInit={(evt, editor) => (editPatternEditor.current = editor)} | ||||
| style={{ height: "100px !important" }} | style={{ height: "100px !important" }} | ||||
| /> | /> | ||||
| {/* <textarea | |||||
| rows="11" | |||||
| onChange={(e) => | |||||
| setEditPattern((oldState) => ({ | |||||
| ...oldState, | |||||
| message: e.target.value, | |||||
| })) | |||||
| } | |||||
| value={editPattern ? editPattern.message : ""} | |||||
| ></textarea> */} | |||||
| </div> | </div> | ||||
| <div className="edit-pattern-modal-form-control"> | <div className="edit-pattern-modal-form-control"> | ||||
| <input type="submit" value="UREDI ŠABLON" /> | <input type="submit" value="UREDI ŠABLON" /> |