Skip to content
Snippets Groups Projects
Commit d4f623a2 authored by Reinder Kraaij's avatar Reinder Kraaij :eye:
Browse files

Resolve TMSS-2707 "Part iv"

parent 21f3a6eb
No related branches found
No related tags found
1 merge request!1239Resolve TMSS-2707 "Part iv"
...@@ -40,9 +40,9 @@ const setMockSpy = (() => { ...@@ -40,9 +40,9 @@ const setMockSpy = (() => {
periodCategoriesSpy.mockImplementation(() => { return Promise.resolve([{ url: "Single Cycle", value: 'Single Cycle' }, { url: "Long Term", value: 'Long Term' }]) }); periodCategoriesSpy.mockImplementation(() => { return Promise.resolve([{ url: "Single Cycle", value: 'Single Cycle' }, { url: "Long Term", value: 'Long Term' }]) });
allCycleSpy = jest.spyOn(CycleService, 'getAllCycles'); allCycleSpy = jest.spyOn(CycleService, 'getAllCycles');
allCycleSpy.mockImplementation(() => { allCycleSpy.mockImplementation(() => {
return Promise.resolve([{ url: "http://localhost:3000/api/cycle/Cycle-0/", name: 'Cycle-0' }, return Promise.resolve([{ url: "https://localhost:3000/api/cycle/Cycle-0/", name: 'Cycle-0' },
{ url: "http://localhost:3000/api/cycle/Cycle-1/", name: 'Cycle-1' }, { url: "https://localhost:3000/api/cycle/Cycle-1/", name: 'Cycle-1' },
{ url: "http://192.168.99.100:8008/api/cycle/Cycle%200/", name: 'Cycle 0' }]); { url: "https://192.168.99.100:8008/api/cycle/Cycle%200/", name: 'Cycle 0' }]);
}); });
projectDetailsSpy = jest.spyOn(ProjectService, 'getProjectDetails'); projectDetailsSpy = jest.spyOn(ProjectService, 'getProjectDetails');
projectDetailsSpy.mockImplementation((id) => { projectDetailsSpy.mockImplementation((id) => {
......
...@@ -327,6 +327,7 @@ export default function WeekView(props) { ...@@ -327,6 +327,7 @@ export default function WeekView(props) {
useEffect(() => { useEffect(() => {
// Check if the forceUpdate prop has changed and trigger a re-render // Check if the forceUpdate prop has changed and trigger a re-render
console.log(" Foring refrfeh") console.log(" Foring refrfeh")
if (props.grouping!==undefined)
updateGrouping(props.grouping); updateGrouping(props.grouping);
}, [props.grouping]); }, [props.grouping]);
......
...@@ -49,7 +49,7 @@ exports[`WeekView Render Contents WeekView renders correctly with data: DuringLo ...@@ -49,7 +49,7 @@ exports[`WeekView Render Contents WeekView renders correctly with data: DuringLo
Group By Group By
</span> </span>
<div <div
class="p-dropdown p-component p-inputwrapper w-full md:w-14rem" class="p-dropdown p-component p-inputwrapper p-inputwrapper-filled w-full md:w-14rem"
data-pc-name="dropdown" data-pc-name="dropdown"
data-pc-section="root" data-pc-section="root"
> >
...@@ -76,15 +76,17 @@ exports[`WeekView Render Contents WeekView renders correctly with data: DuringLo ...@@ -76,15 +76,17 @@ exports[`WeekView Render Contents WeekView renders correctly with data: DuringLo
<option <option
data-pc-section="option" data-pc-section="option"
selected="" selected=""
value="" value="group"
/> >
No Grouping
</option>
</select> </select>
</div> </div>
<span <span
class="p-dropdown-label p-inputtext p-dropdown-label-empty" class="p-dropdown-label p-inputtext"
data-pc-section="input" data-pc-section="input"
> >
empty No Grouping
</span> </span>
<div <div
aria-expanded="false" aria-expanded="false"
...@@ -1736,37 +1738,60 @@ exports[`WeekView Render Contents WeekView renders correctly with data: DuringLo ...@@ -1736,37 +1738,60 @@ exports[`WeekView Render Contents WeekView renders correctly with data: DuringLo
</div> </div>
<div <div
class="rct-outer" class="rct-outer"
style="height: 0px;" style="height: 40px;"
> >
<div <div
class="rct-sidebar" class="rct-sidebar"
style="width: 150px; height: 0px;" style="width: 150px; height: 40px;"
> >
<div <div
style="width: 150px;" style="width: 150px;"
/> >
<div
class="rct-sidebar-row rct-sidebar-row-even"
style="height: 40px; line-height: 40px;"
>
<div
class="group-renderer"
>
<span
class="week"
>
49
</span>
<a
href="/constraint/view/2023-12-03"
target="_new"
>
Dec 03 - Sun
</a>
</div>
</div>
</div>
</div> </div>
<div <div
class="rct-scroll" class="rct-scroll"
style="width: -150px; height: 20px; cursor: default; position: relative;" style="width: -150px; height: 60px; cursor: default; position: relative;"
> >
<div <div
style="position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px;" style="position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px;"
> >
<div
style="position: absolute; top: 0px; bottom: 0px; width: 2px; pointer-events: none; left: -146.71003136610378px; z-index: 998;"
/>
<div <div
class="rct-vertical-lines" class="rct-vertical-lines"
> >
<div <div
class="rct-vl " class="rct-vl "
style="pointer-events: none; top: 0px; left: 50400.58334008495px; width: -54750.6336878899px; height: 0px;" style="pointer-events: none; top: 0px; left: 50400.58334008495px; width: -54750.6336878899px; height: 40px;"
/> />
</div> </div>
<div <div
class="rct-horizontal-lines" class="rct-horizontal-lines"
/> >
<div
class="rct-hl-even "
style="width: -150px; height: 40px;"
/>
</div>
<div <div
class="rct-items" class="rct-items"
/> />
...@@ -1869,7 +1894,7 @@ exports[`WeekView Render Contents WeekView renders correctly with data: Loaded 1 ...@@ -1869,7 +1894,7 @@ exports[`WeekView Render Contents WeekView renders correctly with data: Loaded 1
Group By Group By
</span> </span>
<div <div
class="p-dropdown p-component p-inputwrapper w-full md:w-14rem" class="p-dropdown p-component p-inputwrapper p-inputwrapper-filled w-full md:w-14rem"
data-pc-name="dropdown" data-pc-name="dropdown"
data-pc-section="root" data-pc-section="root"
> >
...@@ -1896,15 +1921,17 @@ exports[`WeekView Render Contents WeekView renders correctly with data: Loaded 1 ...@@ -1896,15 +1921,17 @@ exports[`WeekView Render Contents WeekView renders correctly with data: Loaded 1
<option <option
data-pc-section="option" data-pc-section="option"
selected="" selected=""
value="" value="group"
/> >
No Grouping
</option>
</select> </select>
</div> </div>
<span <span
class="p-dropdown-label p-inputtext p-dropdown-label-empty" class="p-dropdown-label p-inputtext"
data-pc-section="input" data-pc-section="input"
> >
empty No Grouping
</span> </span>
<div <div
aria-expanded="false" aria-expanded="false"
...@@ -3556,37 +3583,60 @@ exports[`WeekView Render Contents WeekView renders correctly with data: Loaded 1 ...@@ -3556,37 +3583,60 @@ exports[`WeekView Render Contents WeekView renders correctly with data: Loaded 1
</div> </div>
<div <div
class="rct-outer" class="rct-outer"
style="height: 0px;" style="height: 40px;"
> >
<div <div
class="rct-sidebar" class="rct-sidebar"
style="width: 150px; height: 0px;" style="width: 150px; height: 40px;"
> >
<div <div
style="width: 150px;" style="width: 150px;"
/> >
<div
class="rct-sidebar-row rct-sidebar-row-even"
style="height: 40px; line-height: 40px;"
>
<div
class="group-renderer"
>
<span
class="week"
>
49
</span>
<a
href="/constraint/view/2023-12-03"
target="_new"
>
Dec 03 - Sun
</a>
</div>
</div>
</div>
</div> </div>
<div <div
class="rct-scroll" class="rct-scroll"
style="width: -150px; height: 20px; cursor: default; position: relative;" style="width: -150px; height: 60px; cursor: default; position: relative;"
> >
<div <div
style="position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px;" style="position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px;"
> >
<div
style="position: absolute; top: 0px; bottom: 0px; width: 2px; pointer-events: none; left: -146.71003136610378px; z-index: 998;"
/>
<div <div
class="rct-vertical-lines" class="rct-vertical-lines"
> >
<div <div
class="rct-vl " class="rct-vl "
style="pointer-events: none; top: 0px; left: 50400.58334008495px; width: -54750.6336878899px; height: 0px;" style="pointer-events: none; top: 0px; left: 50400.58334008495px; width: -54750.6336878899px; height: 40px;"
/> />
</div> </div>
<div <div
class="rct-horizontal-lines" class="rct-horizontal-lines"
/> >
<div
class="rct-hl-even "
style="width: -150px; height: 40px;"
/>
</div>
<div <div
class="rct-items" class="rct-items"
/> />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment