Skip to content

Commit

Permalink
Merge pull request #567 from Real-Dev-Squad/develop
Browse files Browse the repository at this point in the history
Dev to Main Sync
  • Loading branch information
iamitprakash authored Oct 13, 2023
2 parents 70f2b50 + 95dacfc commit d560e90
Show file tree
Hide file tree
Showing 15 changed files with 183 additions and 223 deletions.
12 changes: 6 additions & 6 deletions __tests__/tasks/profile-picture.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const puppeteer = require('puppeteer');
const API_BASE_URL = 'https://staging-api.realdevsquad.com';
const { members } = require('../../mock-data/members');
const { allUsersData } = require('../../mock-data/users');

describe('Task Page - Assignee Profile Pic', () => {
let browser;
Expand All @@ -20,7 +20,7 @@ describe('Task Page - Assignee Profile Pic', () => {
page.on('request', (interceptedRequest) => {
const url = interceptedRequest.url();

if (url === `${API_BASE_URL}/members`) {
if (url === `${API_BASE_URL}/users`) {
interceptedRequest.respond({
status: 200,
contentType: 'application/json',
Expand All @@ -29,7 +29,7 @@ describe('Task Page - Assignee Profile Pic', () => {
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
},
body: JSON.stringify(members),
body: JSON.stringify(allUsersData),
});
} else {
interceptedRequest.continue();
Expand All @@ -52,7 +52,7 @@ describe('Task Page - Assignee Profile Pic', () => {

it('Profile picture with url', async () => {
const inputElement = await page.$('input#assignee');
const name = 'satyam';
const name = 'Arpit_02';

//Trigger the input event manually
for (let i = 0; i < name.length; i++) {
Expand All @@ -64,7 +64,7 @@ describe('Task Page - Assignee Profile Pic', () => {
await page.waitForTimeout(2000);
const imgSrc = await page.$eval('#list-items img', (img) => img.src);
const expectedImageFilename =
'https://res.cloudinary.com/imgprc/image/upload/v1688145505/profile/tu4zVmwFX91e9oEuSWLg/woqilcqdbp0cudcexkem.jpg';
'https://res.cloudinary.com/realdevsquad/image/upload/v1679878917/profile/54vObOfoscwiIVNMSqnN/askdcanhcehukqrdugge.jpg';
expect(imgSrc.endsWith(expectedImageFilename)).toBe(true);
});

Expand All @@ -75,7 +75,7 @@ describe('Task Page - Assignee Profile Pic', () => {
await page.keyboard.press('Backspace');
await new Promise((resolve) => setTimeout(resolve, 500));

const name = 'sumit';
const name = '19sriram';
for (let i = 0; i < name.length; i++) {
await inputElement.type(name[i], { delay: 100 });
}
Expand Down
2 changes: 1 addition & 1 deletion __tests__/tasks/task-dependency.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Input box', () => {
},
body: JSON.stringify(levels),
});
} else if (url === `${API_BASE_URL}/members`) {
} else if (url === `${API_BASE_URL}/users`) {
interceptedRequest.respond({
status: 200,
contentType: 'application/json',
Expand Down
2 changes: 1 addition & 1 deletion __tests__/user-details/task-duedate-hover.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Tasks On User Management Page', () => {
}
});
await page.goto(
'http://localhost:8000/users/details/index.html?username=sunny-s&dev=true',
'http://localhost:8000/users/details/index.html?username=sunny-s',
);

await page.evaluate(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Tests the "Onboarding > 31 Days" Filter', () => {
interceptedRequest.continue();
}
});
await page.goto('http://localhost:8000/users/?dev=true');
await page.goto('http://localhost:8000/users/');

await page.waitForNetworkIdle();
});
Expand Down
2 changes: 1 addition & 1 deletion __tests__/users/onboarding31days.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Tests the "Onboarding > 31 Days" Filter', () => {
interceptedRequest.continue();
}
});
await page.goto('http://localhost:8000/users/?dev=true');
await page.goto('http://localhost:8000/users/');

await page.waitForNetworkIdle();
});
Expand Down
41 changes: 19 additions & 22 deletions online-members/constants.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
'use strict';

// Members Constants
const MEMBERS_CLASS = 'members';
const MEMBERS_CLASS_LIST = [MEMBERS_CLASS];
const MEMBERS_UL_CLASS_LIST = ['members-list'];
const MEMBERS_LIST_ID = 'members-list';
const MEMBERS_CONTAINER_CLASS_LIST = ['members-container'];
const MEMBERS_CONTAINER_ID = 'members-container';
const MEMBERS_ONLINE_CLASS = 'members-online';
const MEMBERS_ONLINE_HIDDEN_CLASS = 'members-online-hidden';
const MEMBERS_ONLINE_CLASS_LIST = [
MEMBERS_ONLINE_CLASS,
MEMBERS_ONLINE_HIDDEN_CLASS,
];

const PROFILE_NAME_CLASS = 'members-profile-and-name';
// Users Constants
const USERS_CLASS = 'users';
const USERS_CLASS_LIST = [USERS_CLASS];
const USERS_UL_CLASS_LIST = ['users-list'];
const USERS_LIST_ID = 'users-list';
const USERS_CONTAINER_CLASS_LIST = ['users-container'];
const USERS_CONTAINER_ID = 'users-container';
const USERS_ONLINE_CLASS = 'users-online';
const USERS_ONLINE_HIDDEN_CLASS = 'users-online-hidden';
const USERS_ONLINE_CLASS_LIST = [USERS_ONLINE_CLASS, USERS_ONLINE_HIDDEN_CLASS];

const PROFILE_NAME_CLASS = 'users-profile-and-name';
const PROFILE_NAME_CLASS_LIST = [PROFILE_NAME_CLASS];

// Members Search Constants
const MEMBERS_SEARCH_CLASS_LIST = ['members-search'];
const MEMBERS_SEARCH_INPUT_CLASS_LIST = ['members-search-input'];
const MEMBERS_SEARCH_ID = 'search-members';
const MEMBERS_SEARCH_PLACEHOLDER = 'Search for members';
// Users Search Constants
const USERS_SEARCH_CLASS_LIST = ['users-search'];
const USERS_SEARCH_INPUT_CLASS_LIST = ['users-search-input'];
const USERS_SEARCH_ID = 'search-users';
const USERS_SEARCH_PLACEHOLDER = 'Search for users';

// Task Constants
const TASKS_CONTAINER_ID = 'task-container';
Expand All @@ -31,7 +28,7 @@ const TASKS_CLASS_LIST = ['task'];
const TASKS_CONTAINER_CLASS_LIST = ['tasks-container'];

// RDS Api Constants
const RDS_API_MEMBERS = API_BASE_URL + '/members';
const RDS_API_USERS = API_BASE_URL + '/users';
const RDS_API_TASKS_USERS = API_BASE_URL + '/tasks';
const RDS_CLOUDINARY_CLOUD_URL = `https://res.cloudinary.com/realdevsquad/image/upload`;

Expand All @@ -41,7 +38,7 @@ const RDS_SSE_ONLINE_URL = 'https://online.realdevsquad.com/online-members';
const RDS_PROFILE_IMAGE_SIZE = 'w_40,h_40';
const RDS_PROFILE_DEFAULT_IMAGE = '';

const PROFILE_IMAGE_CLASS = 'members-profile';
const PROFILE_IMAGE_CLASS = 'users-profile';
const PROFILE_IMAGE_CLASS_LIST = [PROFILE_IMAGE_CLASS];

/* MESSAGES CONSTANTS */
Expand Down
24 changes: 12 additions & 12 deletions online-members/online-members.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
width: 100%;
}

.members-container {
.users-container {
margin: 10px;
border: 2px solid black;
border-radius: 5px;
Expand All @@ -44,11 +44,11 @@
min-width: 260px;
}

.members-list {
.users-list {
overflow: hidden;
}

.members {
.users {
margin: 10px;
padding: 0 5px;
border: 2px solid black;
Expand All @@ -62,32 +62,32 @@
background: #8abbcd;
}

.members:hover {
.users:hover {
background: #5992a7;
}

.members.dragging {
.users.dragging {
background: transparent;
color: transparent;
border: transparent;
}

.members-online {
.users-online {
width: 10px;
height: 10px;
background-color: rgb(58, 247, 58);
border-radius: 50%;
}

.members-online-hidden {
.users-online-hidden {
display: none;
}

.members.scale {
.users.scale {
transform: scale(1.1);
}

.members-search {
.users-search {
margin: 10px;
height: 4rem;
width: 15rem;
Expand All @@ -98,18 +98,18 @@
align-items: center;
}

.members-search-input {
.users-search-input {
height: 2rem;
width: 15rem;
}

.members-profile {
.users-profile {
border-radius: 50%;
width: 25px;
margin-right: 5px;
}

.members-profile-and-name {
.users-profile-and-name {
display: flex;
align-items: center;
}
Expand Down
2 changes: 1 addition & 1 deletion online-members/online-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!-- Task -->
<div class="task-container" id="task-container"></div>
<!-- Members -->
<div class="members-container" id="members-container"></div>
<div class="users-container" id="users-container"></div>
</div>
<footer>
<p class="info-repo">
Expand Down
Loading

0 comments on commit d560e90

Please sign in to comment.