Skip to content

Commit 8c27571

Browse files
add application button on home page for super user and added status field in application details (#669)
* add application button on home page for super user and added status field in application details * updated tests for button * filter button image issue --------- Co-authored-by: Satyam Bajpai <[email protected]>
1 parent 8fa2e86 commit 8c27571

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

__tests__/home/home.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,22 @@ describe('Home Page', () => {
494494
expect(latestSyncStatusText).not.toBe(`Last Sync: In progress`);
495495
});
496496

497+
it('should display Applications button', async () => {
498+
const applicationButton = await page.$('#application-button');
499+
expect(applicationButton).toBeTruthy();
500+
const applicationButtonHref = await page.evaluate(
501+
(el) => el.getAttribute('href'),
502+
applicationButton,
503+
);
504+
expect(applicationButtonHref).toBe('/applications');
505+
const applicationButtonText = await page.evaluate(
506+
(el) => el.innerText,
507+
applicationButton,
508+
);
509+
const trimmedApplicationButtonText = applicationButtonText.trim();
510+
expect(trimmedApplicationButtonText).toBe('Applications');
511+
});
512+
497513
it('should close hamburger menu on clicking anywhere on the screen except the menu', async () => {
498514
await page.setViewport({ width: 970, height: 1800 });
499515
await page.goto('http://localhost:8000/index.html');

applications/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h1>RDS Join Applications</h1>
2020

2121
<img
2222
class="funnel-icon"
23-
src="/taskRequests/assets/funnel.svg"
23+
src="/task-requests/assets/funnel.svg"
2424
alt="funnel icon"
2525
/>
2626
</button>

applications/script.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ function openApplicationDetails(application) {
8484
username: application.biodata.firstName,
8585
id: application.id,
8686
applicationDetails: [
87+
{
88+
title: 'Status',
89+
description: application.status,
90+
},
8791
{
8892
title: 'Introduction',
8993
description: application.intro.introduction,

index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@
149149
</a>
150150
<a class="action-button" href="/groups/index.html"> Discord Groups </a>
151151
<a class="action-button" href="/standup/index.html"> Standup Updates</a>
152+
<a
153+
id="application-button"
154+
href="/applications"
155+
class="action-button element-display-remove"
156+
>
157+
Applications
158+
</a>
152159
<div class="button-container element-display-remove" id="sync-repo-div">
153160
<button id="repo-sync-button" class="action-button">
154161
<span class="spinner"></span>

0 commit comments

Comments
 (0)