Skip to content

Commit

Permalink
Merge branch 'main' into fix-filter-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
priyankarpal authored Oct 6, 2023
2 parents cb6b439 + 4c13c5a commit b0f366f
Show file tree
Hide file tree
Showing 16 changed files with 79 additions and 36 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

name: 'Author Assign'

on:
pull_request_target:
types: [opened, reopened]

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
36 changes: 12 additions & 24 deletions cypress/e2e/homePage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,26 @@
/// <reference types="cypress" />
// / <reference types="cypress" />

import { CONTRIBUTORS_COUNT, TWEET_COUNT } from '../support/constant';
import { CONTRIBUTORS_COUNT, TESTIMONIALS_COUNT } from '../support/constant';

describe('Test home page', () => {
beforeEach(() => {
cy.intercept('POST', '**/v1/graphql').as('contribs');
cy.visit('/');
cy.wait('@contribs');
});

it('Header component should render properly', () => {
cy.get('[data-testid="app-header"]').should('be.visible');
cy.get('[data-testid="app-logo"]').should('be.visible');
cy.get('[data-testid="plays-search-box-container"]').should('not.exist');
cy.get('[data-testid="header-links-container"]').should('be.visible');
cy.get('[data-testid="browse-btn"]').should('be.visible').as('browseBtn');
cy.get('[data-testid="create-btn"]').should('be.visible');
cy.get('[data-testid="ideas-btn"]').should('be.visible');
cy.get('[data-testid="github-btn"]').should('be.visible');
cy.get('[data-testid="twitter-btn"]').should('be.visible');
cy.get('[data-testid="share-btn"]').should('be.visible');
cy.get('[data-testid="leaderboard-btn"]').should('be.visible');
cy.header();
});

cy.get('@browseBtn').click();
cy.get('[data-testid="plays-search-box-container"]').should('be.visible');
it('Testitomonials section should render and navigation must be clickable', () => {
cy.get('[data-testid="testimonials-section"]').scrollIntoView().should('be.visible');
cy.get('[data-testid="testimonials-swiper"]').scrollIntoView().should('be.visible');
});

it('Tweet section should render with all tweets', () => {
cy.intercept('GET', 'https://cdn.syndication.twimg.com/*').as('tweets');
cy.wait('@tweets');
cy.get('[data-testid="tweet-container"]').scrollIntoView().should('be.visible');
cy.get('[data-testid="tweet-container"] [id*="twitter-widget"]').should(
'have.length',
TWEET_COUNT
);
cy.get('[data-testid="watch-svg"]').should('not.exist');
it('Testitomonials should have a number of slides', () => {
cy.get('[data-testid="testimonials-swiper"]').scrollIntoView().should('be.visible');
cy.get('.swiper-slide').should('have.length', TESTIMONIALS_COUNT);
});

it('Contributors section should render with all contributors', () => {
Expand Down
11 changes: 11 additions & 0 deletions cypress/e2e/ideasPage.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// / <reference types="cypress" />

describe('Test play ideas page', () => {
beforeEach(() => {
cy.visit('/ideas');
});

it('Header component should render properly', () => {
cy.header();
});
});
11 changes: 11 additions & 0 deletions cypress/e2e/leaderboardPage.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// / <reference types="cypress" />

describe('Test leaderboard page', () => {
beforeEach(() => {
cy.visit('/leaderboard');
});

it('Header component should render properly', () => {
cy.header();
});
});
19 changes: 18 additions & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="cypress" />
// / <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
Expand Down Expand Up @@ -35,3 +35,20 @@
// }
// }
// }

// methods
Cypress.Commands.add('header', () => {
cy.get('[data-testid="app-header"]').should('be.visible');
cy.get('[data-testid="app-logo"]').should('be.visible');
cy.get('[data-testid="plays-search-box-container"]').should('not.exist');
cy.get('[data-testid="header-links-container"]').should('be.visible');
cy.get('[data-testid="browse-btn"]').should('be.visible').as('browseBtn');
cy.get('[data-testid="create-btn"]').should('be.visible');
cy.get('[data-testid="ideas-btn"]').should('be.visible');
cy.get('[data-testid="github-btn"]').should('be.visible');
cy.get('[data-testid="twitter-btn"]').should('be.visible');
cy.get('[data-testid="share-btn"]').should('be.visible');
cy.get('[data-testid="leaderboard-btn"]').should('be.visible');
cy.get('@browseBtn').click();
cy.get('[data-testid="plays-search-box-container"]').should('be.visible');
});
2 changes: 1 addition & 1 deletion cypress/support/constant.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const TWEET_COUNT = 11;
export const TESTIMONIALS_COUNT = 9;
export const CONTRIBUTORS_COUNT = 29;
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'App.css';
import './App.css';
import { Outlet } from 'react-router-dom';

function App() {
Expand Down
8 changes: 5 additions & 3 deletions src/common/home/Sponsors.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ const Sponsors = () => {
<h3>Event Partners</h3>
<div className="content">
<div className="partners-sponsors-grid">
{eventPartners.map((p) => (
{eventPartners.map((p, index) => (
<a
className="partners-sponsors-grid-item"
href={p.website}
key={index}
rel="noreferrer"
target="_blank"
>
Expand All @@ -72,10 +73,11 @@ const Sponsors = () => {
<h3>Event Sponsors</h3>
<div className="content">
<div className="partners-sponsors-grid">
{eventSponsors.map((s) => (
{eventSponsors.map((s, index) => (
<a
className="partners-sponsors-grid-item"
href={s.website}
key={index}
rel="noreferrer"
target="_blank"
>
Expand Down Expand Up @@ -142,7 +144,7 @@ const Sponsors = () => {
alignItems: 'center'
}}
>
{/* {primeSponsors.map((p) => (
{/* {primeSponsors.map((p,index) => (
<a className="prime-sponsors-grid-item" rel="noreferrer" target="_blank">
abcd
</a>
Expand Down
4 changes: 2 additions & 2 deletions src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import RouteDefs from 'common/routing/RouteDefs';
import { SearchContextProvider } from 'common/search/search-context';
import 'index.css';
import './index.css';
import React, { useState } from 'react';
import { createRoot } from 'react-dom/client';
import reportWebVitals from 'reportWebVitals';
import reportWebVitals from './reportWebVitals';
import register from './registerServiceWorker';
import ErrorBoundry from './ErrorBoundary/ErrorBoundary';
import Notification from 'common/components/Notification';
Expand Down
2 changes: 1 addition & 1 deletion src/plays/github-user-finder/components/ProfileCard.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useResultContext } from '../context/ResultContext';
import { formatDate } from '../../../common/utils/commonUtils';
import { formatDate } from 'common/utils/commonUtils';

const ProfileCard = () => {
const { results } = useResultContext();
Expand Down
2 changes: 1 addition & 1 deletion src/plays/personal-profile-card/PersonalProfileCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PlayHeader from 'common/playlists/PlayHeader';
import React, { useState, ChangeEvent, useEffect } from 'react';

import useLocalStorage from '../../common/hooks/useLocalStorage';
import useLocalStorage from 'common/hooks/useLocalStorage';
import ProfileType from './types';
import ProfileCard from './components/profile-card';
import ProfileForm from './components/profile-form';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useRef } from 'react';
import { FaQuoteLeft } from 'react-icons/fa';
import data from '../data';

const CardContainer = ({
gradientColor,
quote,
Expand Down
2 changes: 1 addition & 1 deletion src/plays/video-preview/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { formatDurationCount, formatViewCount } from '../../common/utils/formatCount';
import { formatDurationCount, formatViewCount } from 'common/utils/formatCount';
import { GoVerified } from 'react-icons/go';
import { VERIFIED_CHANNEL } from './utils/constants';

Expand Down

0 comments on commit b0f366f

Please sign in to comment.