Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions __tests__/home/home.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,20 @@ describe('Home Page', () => {
expect(syncExternalAccountsUpdate).toBeTruthy();
});
it('should display the task requests button', async () => {
await page.goto('http://localhost:8000/?dev=true');
await page.goto('http://localhost:8000');
await page.waitForNetworkIdle();
const taskRequestsButton = await page.$('#task-requests-link');
expect(taskRequestsButton).toBeTruthy();
});
it('should go to the task requests page', async () => {
await page.goto('http://localhost:8000/?dev=true');
await page.goto('http://localhost:8000');
await page.waitForNetworkIdle();

const taskRequestsButton = await page.$('#task-requests-link');
await taskRequestsButton.click();
await page.waitForNetworkIdle();
const newUrl = page.url();
expect(newUrl).toContain('/taskRequests');
expect(newUrl).toContain('/task-requests');
});
it('should call the right api endpoint when Sync External Accounts button is clicked', async () => {
let isRightUrlCalled = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ describe('Task Requests', () => {
page.on('request', (request) => {
if (
request.url() === `${API_BASE_URL}/taskRequests` ||
request.url() === `${API_BASE_URL}/taskRequests?dev=true` ||
request.url() ===
`${API_BASE_URL}/taskRequests?size=20&q=status%3Apending+sort%3Acreated-asc&dev=true`
`${API_BASE_URL}/taskRequests?size=20&q=status%3Apending+sort%3Acreated-asc`
) {
request.respond({
status: 200,
Expand All @@ -44,7 +43,7 @@ describe('Task Requests', () => {
});
} else if (
request.url() ===
`${API_BASE_URL}/taskRequests?size=20&q=status%3Aapproved++sort%3Acreated-asc&dev=true`
`${API_BASE_URL}/taskRequests?size=20&q=status%3Aapproved++sort%3Acreated-asc`
) {
const list = [];
for (let i = 0; i < 20; i++) {
Expand All @@ -55,14 +54,14 @@ describe('Task Requests', () => {
contentType: 'application/json',
body: JSON.stringify({
data: list,
next: '/taskRequests?size=20&q=status%3Aapproved++sort%3Acreated-asc&dev=true',
next: '/taskRequests?size=20&q=status%3Aapproved++sort%3Acreated-asc',
}),
});
} else {
request.continue();
}
});
await page.goto(`${SITE_URL}/taskRequests`);
await page.goto(`${SITE_URL}/task-requests`);
await page.waitForNetworkIdle();
});

Expand Down Expand Up @@ -107,7 +106,7 @@ describe('Task Requests', () => {
expect(
await modal.evaluate((el) => el.classList.contains('hidden')),
).toBe(false);
await page.mouse.click(20, 20);
await page.mouse.click(200, 200);
expect(
await modal.evaluate((el) => el.classList.contains('hidden')),
).toBe(true);
Expand Down Expand Up @@ -227,7 +226,7 @@ describe('createCustomElement', () => {

page = await browser.newPage();

await page.goto(`${SITE_URL}/taskRequests`);
await page.goto(`${SITE_URL}/task-requests`);
await page.waitForNetworkIdle();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Task request details page', () => {
}
});
await page.goto(
'http://localhost:8000/taskRequests/details/?id=dM5wwD9QsiTzi7eG7Oq5',
'http://localhost:8000/task-requests/details/?id=dM5wwD9QsiTzi7eG7Oq5',
);
});

Expand Down Expand Up @@ -123,7 +123,7 @@ describe('Task request details page with status creation', () => {
}
});
await page.goto(
'http://localhost:8000/taskRequests/details/?id=uC0IUpkFMx393XjnKx4w',
'http://localhost:8000/task-requests/details/?id=uC0IUpkFMx393XjnKx4w',
);
});

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<a
id="task-requests-link"
class="action-button element-display-remove"
href="taskRequests"
href="task-requests"
>
Task Requests
</a>
Expand Down
3 changes: 1 addition & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ const syncIdle7dUsersUpdate = document.getElementById(
);
const repoSyncStatusUpdate = document.getElementById(SYNC_REPO_STATUS_UPDATE);
const params = new URLSearchParams(window.location.search);
const taskRequestsLink =
params.get('dev') === 'true' && document.getElementById(TASK_REQUESTS_LINK);
const taskRequestsLink = document.getElementById(TASK_REQUESTS_LINK);

const syncNicknamesStatusUpdate = document.getElementById(
SYNC_NICKNAMES_STATUS_UPDATE,
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;400;700;800&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="/taskRequests/details/style.css" />
<link rel="stylesheet" href="/task-requests/details/style.css" />

<title>Task Requests | Real Dev Squad</title>
<script src="/helpers/loadENV.js"></script>
<script src="/taskRequests/util.js"></script>
<script src="/taskRequests/constants.js"></script>
<script src="/task-requests/util.js"></script>
<script src="/task-requests/constants.js"></script>
<script src="/utils/time/index.js"></script>
<script src="/taskRequests/details/script.js" defer></script>
<script src="/task-requests/details/script.js" defer></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"
integrity="sha512-LhccdVNGe2QMEfI3x4DVV3ckMRe36TfydKss6mJpdHjNFiV07dFpS2xzeZedptKZrwxfICJpez09iNioiSZ3hA=="
Expand All @@ -30,7 +30,7 @@
<div class="header">
<div class="header__contents">
<img
src="/taskRequests/assets/RDSLogo.png"
src="/task-requests/assets/RDSLogo.png"
alt="RDS logo"
height="48"
width="48"
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions taskRequests/index.html → task-requests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
/>

<title>Task Requests | Real Dev Squad</title>
<link rel="stylesheet" href="/taskRequests/style.css" />
<link rel="stylesheet" href="/task-requests/style.css" />
<script src="/helpers/loadENV.js"></script>
<script src="/taskRequests/constants.js"></script>
<script src="/taskRequests/util.js"></script>
<script src="/task-requests/constants.js"></script>
<script src="/task-requests/util.js"></script>
<script src="/utils.js"></script>
<script src="/taskRequests/script.js" defer></script>
<script src="/task-requests/script.js" defer></script>
</head>

<body>
<div class="header">
<div class="header__contents">
<img
src="/taskRequests/assets/RDSLogo.png"
src="/task-requests/assets/RDSLogo.png"
alt="RDS logo"
height="48"
width="48"
Expand All @@ -38,7 +38,7 @@
<button class="sort-button">
<img
id="asc-sort-icon"
src="/taskRequests/assets/sort-menu.svg"
src="/task-requests/assets/sort-menu.svg"
alt="sort-icon"
/>
</button>
Expand All @@ -60,7 +60,7 @@ <h3 id="sort-dialog-label">Sort By</h3>

<img
class="funnel-icon"
src="/taskRequests/assets/funnel.svg"
src="/task-requests/assets/funnel.svg"
alt="funnel icon"
/>
</button>
Expand Down
3 changes: 1 addition & 2 deletions taskRequests/script.js → task-requests/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ let isDataLoading = false;
let selectedSortButton = null;

const filterStates = {
dev: true,
status: Status.PENDING,
order: CREATED_TIME,
size: DEFAULT_PAGE_SIZE,
Expand Down Expand Up @@ -98,7 +97,7 @@ function getRemainingCount(requestors) {
}
}
function openTaskDetails(id) {
const url = new URL(`/taskRequests/details`, window.location.href);
const url = new URL(`/task-requests/details`, window.location.href);

url.searchParams.append('id', id);
window.location.href = url;
Expand Down
27 changes: 12 additions & 15 deletions taskRequests/style.css → task-requests/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ body {
max-width: 1440px;
margin: 0 auto;
padding: 2.5rem;
position: relative;
}
.container__filters {
margin: 1rem 0;
Expand Down Expand Up @@ -140,12 +141,11 @@ body {
border-radius: 0.31rem;
flex-direction: column;
align-items: center;
padding: 10px;
padding-bottom: 1rem;
padding: 1rem;
padding-bottom: 1.5rem;
z-index: 2;
position: absolute;
top: 11.25rem;
right: 1rem;
top: 5.5rem;
background-color: var(--white);
}

Expand All @@ -163,6 +163,7 @@ body {
.selected {
background-color: var(--dark-gray-color);
}

.sort-container:hover {
background-color: var(--color-gray-light);
}
Expand All @@ -181,12 +182,10 @@ body {
border-radius: 0.31rem;
flex-direction: column;
align-items: center;
padding: 10px;
padding-bottom: 1rem;
z-index: 1;
padding: 1rem;
padding-bottom: 1.5rem;
position: absolute;
top: 11.25rem;
right: 1rem;
top: 5.5rem;
background-color: var(--white);
}

Expand Down Expand Up @@ -279,16 +278,14 @@ body {
font-weight: 600;
text-align: center;
font-size: 1.5rem;
margin: 2rem;
width: 100vw;
width: 100%;
position: absolute;
}
.taskRequest__message--error {
color: var(--color-error);
font-weight: 600;
text-align: center;
font-size: 1.5rem;
margin: 2rem;
width: 100vw;
}
.taskRequest__card {
cursor: pointer;
Expand Down Expand Up @@ -394,7 +391,7 @@ body {

.filter-modal,
.sort-modal {
top: 10.5rem;
top: 4.5rem;
}
.funnel-icon {
margin: auto;
Expand All @@ -408,7 +405,7 @@ body {

.filter-modal,
.sort-modal {
top: 10rem;
top: 4rem;
}
}
@media (max-width: 1439px) {
Expand Down
File renamed without changes.