Skip to content

Smoke Testing 2020-10-09 #5079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 80 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
dc52de0
Refactor challenge list
LieutenantRoger Aug 24, 2020
b41f46c
Fix tests
LieutenantRoger Sep 2, 2020
54ef309
restore the package-lock.json
LieutenantRoger Sep 2, 2020
0e84539
additional fix on 2020-09-12
LieutenantRoger Sep 12, 2020
229ed9a
integrate sub-community filter
LieutenantRoger Sep 12, 2020
5ec9c71
adjust the groups param
LieutenantRoger Sep 12, 2020
934d620
update groupId into groups
LieutenantRoger Sep 13, 2020
39c44ba
update the groupId into group name
LieutenantRoger Sep 19, 2020
6f843f5
fix issues on sub community dropdown list
LieutenantRoger Sep 20, 2020
2846f46
Fix: for #4594
luizrrodrigues Sep 21, 2020
07e1bab
ci: Deploy feature-refactor-challengelist to Test
luizrrodrigues Sep 21, 2020
69030c7
ci: Deploy feature-refactor-challengelist to Stag
luizrrodrigues Sep 21, 2020
46d11e6
Fix issues for:
LieutenantRoger Sep 21, 2020
fa93b3d
Merge pull request #4983 from topcoder-platform/feature-refactor-chal…
sushilshinde Sep 22, 2020
5009021
Fix issue: https://github.com/topcoder-platform/community-app/issues/…
LieutenantRoger Sep 22, 2020
ea48bcd
Display the number of filters applied
gets0ul Sep 23, 2020
e1d09bd
Merge pull request #4986 from gets0ul/issue-4966
sushilshinde Sep 23, 2020
962d894
fix: for issue #4964
narekcat Sep 23, 2020
d025513
Fix sorted of by 'Most recent' of My Challenges bucket and sorted by …
gets0ul Sep 23, 2020
fbe8ea2
fix(challenge-listing): do not render buckets that have 0 challenges
cagdas001 Sep 23, 2020
5c59bf9
Fix issue: https://github.com/topcoder-platform/community-app/issues/…
LieutenantRoger Sep 23, 2020
959e5a2
Fix comment. Sorting by review start date is ascending as in prod env.
gets0ul Sep 23, 2020
4e60e7a
Revert back the comment. As sorting is in descending order.
gets0ul Sep 23, 2020
66ef300
Merge pull request #4993 from topcoder-platform/feature-refactor-chal…
luizrrodrigues Sep 24, 2020
74870c9
Merge pull request #4992 from cagdas001/fix-4962
luizrrodrigues Sep 24, 2020
57918b7
ci: Remove feature-refactor-challengelist from Stag env
luizrrodrigues Sep 24, 2020
346296a
Merge branch 'feature-refactor-challengelist' into issue-4964
narekcat Sep 24, 2020
92df869
Apply the same sorting to other buckets.
gets0ul Sep 24, 2020
f14f861
fix(challenge-listing): add NO_LIVE_CHALLENGES messsage to All bucket…
cagdas001 Sep 24, 2020
524e091
Fix challenge detail screen
LieutenantRoger Sep 26, 2020
64a6ef5
Revert Review Opportunities sort to asc
luizrrodrigues Sep 29, 2020
692b747
Merge pull request #4991 from gets0ul/issue-4973
luizrrodrigues Sep 29, 2020
83e012b
Merge pull request #4989 from narekcat/issue-4964
luizrrodrigues Sep 29, 2020
8e0504e
ci: deploy feature-refactor-challengelist to Stag
luizrrodrigues Sep 29, 2020
db8315b
stays on main challenge listing when view more challenges is clicked.
gets0ul Sep 29, 2020
79a6894
update the track name
LieutenantRoger Sep 30, 2020
7e0f013
Update track name
luizrrodrigues Sep 30, 2020
97d3c88
Merge pull request #5008 from topcoder-platform/feature-refactor-chal…
luizrrodrigues Oct 1, 2020
003bc67
fix: for issue #4965
luizrrodrigues Oct 1, 2020
b307906
fix groupId issues
LieutenantRoger Oct 1, 2020
4993459
fix: add placeholder challenge cards when loading
cagdas001 Oct 1, 2020
c0c7eeb
fix(challenge-listing): ongoing challenges bucket won't include openF…
cagdas001 Oct 1, 2020
a352932
Merge pull request #5017 from gets0ul/issue_5002-fix
luizrrodrigues Oct 2, 2020
cb067d6
Merge pull request #5001 from cagdas001/fix-4962
luizrrodrigues Oct 2, 2020
79069fa
Merge remote-tracking branch 'origin/listing-develop-sync' into featu…
luizrrodrigues Oct 5, 2020
87bf184
Challengelist sync missing COMPETITION_TRACKS rename
luizrrodrigues Oct 5, 2020
aab2a5a
Merge branch 'feature-refactor-challengelist' into listing-develop-sync
luizrrodrigues Oct 5, 2020
635e834
Merge branch 'listing-develop-sync' into feature-refactor-challengeli…
luizrrodrigues Oct 5, 2020
bd61d11
Merge pull request #5031 from topcoder-platform/feature-refactor-chal…
luizrrodrigues Oct 5, 2020
944b0fd
fix side impact
LieutenantRoger Oct 5, 2020
0a5c95c
Merge pull request #5052 from topcoder-platform/Issue-4976
luizrrodrigues Oct 5, 2020
e5a0e40
Revert hidden all communities
luizrrodrigues Oct 5, 2020
b9ff0f5
Hide cognitive and blockchain from dropdown filter
luizrrodrigues Oct 5, 2020
8472d1d
Merge pull request #5054 from topcoder-platform/issue-5048
luizrrodrigues Oct 5, 2020
6ad801e
Added hideFIlter to getList
luizrrodrigues Oct 5, 2020
d748517
Merge pull request #5055 from topcoder-platform/issue-5048
luizrrodrigues Oct 5, 2020
18ee933
fix: for issue #5045
luizrrodrigues Oct 5, 2020
1fb7677
fix: issue #5050
gets0ul Oct 6, 2020
6ba93d9
Merge pull request #5058 from gets0ul/issue-5050
luizrrodrigues Oct 6, 2020
dd8b91a
ci: deploy listing-develop-sync to QA env
luizrrodrigues Oct 6, 2020
381aac7
fix: for issue #5036
luizrrodrigues Oct 7, 2020
bdf52ae
fix(challenge-listing): date filters will use correct query params
cagdas001 Oct 8, 2020
978b98f
Merge pull request #5039 from cagdas001/fix-4984
luizrrodrigues Oct 8, 2020
c04d780
Merge pull request #5067 from topcoder-platform/feature-refactor-chal…
luizrrodrigues Oct 8, 2020
7034dfc
ci: remove listing-develop-sync from Test env
luizrrodrigues Oct 8, 2020
838f7b6
feat: past challenges implementation
gets0ul Oct 8, 2020
8c78eb7
fix: style lint
gets0ul Oct 8, 2020
3c9ceeb
Merge pull request #5070 from gets0ul/past_challenges_impl
luizrrodrigues Oct 8, 2020
47d327d
Hide onGoing bucket
luizrrodrigues Oct 8, 2020
52d9250
Merge pull request #5074 from topcoder-platform/issue-5073
luizrrodrigues Oct 8, 2020
0336140
f2f filterfix
PrakashDurlabhji Oct 8, 2020
4d81d90
Merge pull request #5077 from PrakashDurlabhji/f2f-filterfix
luizrrodrigues Oct 8, 2020
d683364
Implement TCO filter to Challenge Listing page
luizrrodrigues Oct 8, 2020
3ef7095
Merge branch 'listing-develop-sync' into issue-5056
luizrrodrigues Oct 8, 2020
abc124f
Merge branch 'listing-develop-sync' into issue-5056
luizrrodrigues Oct 9, 2020
3f9137d
fix: for issue #5056
luizrrodrigues Oct 9, 2020
ed10471
Merge pull request #5078 from topcoder-platform/issue-5056
luizrrodrigues Oct 9, 2020
79ef6ce
Fix TCO not showing in Challenge Listing filter
luizrrodrigues Oct 9, 2020
e2e5d1c
Fix snapshot
luizrrodrigues Oct 9, 2020
76f9b5c
Merge branch 'develop' into listing-develop-sync
luizrrodrigues Oct 9, 2020
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
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ workflows:
context : org-global
filters:
branches:
only:
- hot-fix-ad-code
- feature-contentful
only:
- develop
# This is alternate dev env for parallel testing
- "build-qa":
context : org-global
Expand Down
168 changes: 3 additions & 165 deletions __tests__/shared/actions/challenge-listing/sidebar.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
import sidebarActions from 'actions/challenge-listing/sidebar';

const actions = sidebarActions.challengeListing.sidebar;

const mockFetch = (ok, resolvesTo) => jest.fn(
() => Promise.resolve({ ok, json: () => resolvesTo }),
);

const createXHRmock = () => {
const open = jest.fn();
// be aware we use *function* because we need to get *this*
// from *new XmlHttpRequest()* call
const send = jest.fn().mockImplementation(() => {
this.onload();
});
const xhrMockClass = {
open,
send,
setRequestHeader: jest.fn(),
getAllResponseHeaders: jest.fn(),
};

window.XMLHttpRequest = jest.fn().mockImplementation(xhrMockClass);
};

let originalFetch;

beforeAll(() => {
Expand All @@ -34,145 +9,8 @@ afterAll(() => {
jest.clearAllMocks();
});

describe('challengeListing.sidebar.changeFilterName', () => {
const a = actions.changeFilterName('index', 'name');

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/CHANGE_FILTER_NAME');
});

test('payload is expected object', () => expect(a.payload).toEqual({
index: 'index',
name: 'name',
}));
});

describe('challengeListing.sidebar.deleteSavedFilter', () => {
global.fetch = mockFetch(true, 'dummy');
createXHRmock();

const a = actions.deleteSavedFilter('id', 'token');

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DELETE_SAVED_FILTER');
});

// FIXME: Broken in topcoder-react-lib v1000.8.0
// test('payload is a promise which resolves to the expected object', () =>
// a.payload.then(res => expect(res).toEqual('id')));
});

describe('challengeListing.sidebar.dragSavedFilterMove', () => {
const a = actions.dragSavedFilterMove(
{ target: { offsetHeight: 10 } },
{ y: 0, startIndex: 0, index: 10 },
);

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DRAG_SAVED_FILTER_MOVE');
});

test('payload is expected object', () => expect(a.payload).toEqual({ y: 0, startIndex: 0, index: 10 }));
});

describe('challengeListing.sidebar.dragSavedFilterMove with screenY', () => {
const a = actions.dragSavedFilterMove(
{ screenY: 10, target: { offsetHeight: 10 } },
{ y: 0, startIndex: 0, index: 10 },
);

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DRAG_SAVED_FILTER_MOVE');
});

test('payload is expected object', () => expect(a.payload).toEqual({
y: 0, startIndex: 0, index: 10, currentIndex: 1,
}));
});

describe('challengeListing.sidebar.dragSavedFilterMove same index', () => {
const a = actions.dragSavedFilterMove(
{ screenY: 10, target: { offsetHeight: 10 } },
{ y: 0, startIndex: 9, index: 10 },
);

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DRAG_SAVED_FILTER_MOVE');
describe('challengeListing.sidebar', () => {
test('not needed', () => {
expect(true).toBe(true);
});

test('payload is expected object', () => expect(a.payload).toEqual({ y: 0, startIndex: 9, index: 10 }));
});

describe('challengeListing.sidebar.dragSavedFilterStart', () => {
const a = actions.dragSavedFilterStart(10, { screenY: 5 });

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/DRAG_SAVED_FILTER_START');
});

test('payload is expected object', () => expect(a.payload).toEqual({ y: 5, startIndex: 10, currentIndex: 10 }));
});

describe('challengeListing.sidebar.getSavedFilters', () => {
global.fetch = mockFetch(true, []);

const a = actions.getSavedFilters('id', 'token');

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/GET_SAVED_FILTERS');
});

// FIXME: Broken in topcoder-react-lib v0.3.0
// test('payload is a promise which resolves to the expected object', () =>
// a.payload.then(res => expect(res).toEqual([])));
});

describe('challengeListing.sidebar.resetFilterName', () => {
const a = actions.resetFilterName(1);

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/RESET_FILTER_NAME');
});

test('payload is expected object', () => expect(a.payload).toEqual(1));
});

describe('challengeListing.sidebar.saveFilter', () => {
global.fetch = mockFetch(true, 'dummy');

const a = actions.saveFilterDone('name', {}, 'token');

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/SAVE_FILTER_DONE');
});

// FIXME: Broken in topcoder-react-lib v0.3.0
// test('payload is a promise which resolves to the expected object', () =>
// a.payload.then(res => expect(res).toEqual('dummy')));
});

describe('challengeListing.sidebar.updateAllSavedFilters', () => {
global.fetch = mockFetch(true, 'dummy');

const a = actions.updateAllSavedFilters([{ filter: {} }], 'token');

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/UPDATE_ALL_SAVED_FILTERS');
});

test('payload is undefined', () => expect(a.payload).toBeUndefined());
});

describe('challengeListing.sidebar.updateSavedFilter', () => {
global.fetch = mockFetch(true, 'dummy');

const a = actions.updateSavedFilter({}, 'token');

test('has expected type', () => {
expect(a.type).toBe('CHALLENGE_LISTING/SIDEBAR/UPDATE_SAVED_FILTER');
});

// FIXME: Broken in topcoder-react-lib v0.3.0
// test('payload is a promise which resolves to the expected object', () =>
// a.payload.then(res => expect(res).toEqual('dummy')));
});
Loading