Skip to content

Commit

Permalink
Merge branch 'master' into feat/table-of-contents
Browse files Browse the repository at this point in the history
  • Loading branch information
Shurtu-gal authored Dec 8, 2023
2 parents 03cbadc + 9af5c53 commit c29457f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 28 deletions.
2 changes: 1 addition & 1 deletion components/buttons/ScrollButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function ScrollButton(){

})
}
return <div className="fixed bottom-14 right-4 h-16 w-12 z-50">
return <div className="fixed bottom-14 right-4 h-16 w-12 z-40">
{backToTopButton &&(
<button className="rounded-full shadow-md bg-white " onClick={scrollUp}> <img src={scrollImage}/></button>
)}
Expand Down
2 changes: 1 addition & 1 deletion components/navigation/MobileNavMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Link from 'next/link';

export default function MobileNavMenu({ onClickClose = () => {} }) {
return (
<div className="fixed top-0 inset-x-0 py-2 transition transform origin-top-right max-h-full lg:hidden overflow-y-scroll">
<div className="fixed top-0 z-60 inset-x-0 py-2 transition transform origin-top-right max-h-full lg:hidden overflow-y-scroll">
<div className="rounded-lg shadow-lg">
<div className="rounded-lg shadow-xs bg-white divide-y-2 divide-gray-50">
<div className="pt-5 pb-6 px-5 space-y-6">
Expand Down
3 changes: 1 addition & 2 deletions components/navigation/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import LearningPanel from './LearningPanel'
import CommunityPanel from "./CommunityPanel"
import MobileNavMenu from './MobileNavMenu'
import otherItems from './otherItems'

import GithubButton from "../buttons/GithubButton"
import { SearchButton } from '../AlgoliaSearch';
import IconLoupe from '../icons/Loupe';
Expand Down Expand Up @@ -100,7 +99,7 @@ export default function NavBar({
useEffect(() => {
setMobileMenuOpen(false);
setOpen(null);
}, [asPath])
}, [asPath]);

return (
<div className={`bg-white ${className} z-50`}>
Expand Down
7 changes: 0 additions & 7 deletions config/meetings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
"banner": "",
"date": "2023-09-06T16:00:00.000Z"
},
{
"title": "AsyncAPI spec v3 support in Diff",
"calLink": "https://www.google.com/calendar/event?eid=YnVvZWt1azlwcTQxNzZnNzNpZ2c3cjdmbzAgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/858",
"banner": "",
"date": "2023-08-29T13:30:00.000Z"
},
{
"title": "Brainstorm on AsyncAPI Cheat Sheet Poster",
"calLink": "https://www.google.com/calendar/event?eid=bGx1dXBuc2x1a29mN3RzMmQzcGFjaWM4anMgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
Expand Down
12 changes: 6 additions & 6 deletions config/newsroom_videos.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"image_url": "https://i.ytimg.com/vi/YREb9wuYCOA/hqdefault.jpg",
"title": "AsyncAPI v3 announcement",
"description": "Join us live to learn about all the goodies that AsyncAPI v3 brings.",
"videoId": "YREb9wuYCOA"
},
{
"image_url": "https://i.ytimg.com/vi/g6CPg77Lf5Q/hqdefault.jpg",
"title": "AsyncAPI Conf on Tour 2023 in Bangalore, India",
Expand All @@ -17,12 +23,6 @@
"description": "https://github.com/asyncapi/community/issues/917.",
"videoId": "KDort611FNg"
},
{
"image_url": "https://i.ytimg.com/vi/YREb9wuYCOA/hqdefault.jpg",
"title": "AsyncAPI v3 announcement",
"description": "Join us live to learn about all the goodies that AsyncAPI v3 brings.",
"videoId": "YREb9wuYCOA"
},
{
"image_url": "https://i.ytimg.com/vi/Vm4ZKFb2PVE/hqdefault.jpg",
"title": "Community Meeting(October 31th, 2023)",
Expand Down
14 changes: 8 additions & 6 deletions cypress/test/components/campaignTests/AnnouncementHero.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,28 @@ beforeEach(() => {
mount(<AnnouncementHero />);
});

// .skip should be removed once the AnnouncementHero component is rendered in the website
describe('AnnouncementHero Component', () => {
it('should render the component when the date is within the valid range', () => {
it.skip('should render the component when the date is within the valid range', () => {
const mockDate = new Date(2021, 10, 12).getTime();
cy.clock(mockDate);
cy.get('[data-testid="AnnouncementHero-main-div"]').should('exist');
});

//check if announcement rendered is small or large .
it('should render a small announcement when "small" prop is true', () => {
it.skip('should render a small announcement when "small" prop is true', () => {
mount(<AnnouncementHero small />);
cy.get('[data-testid="AnnouncementHero-main-div"]').should('have.class', 'mb-4');
});

it('should display the correct event information', () => {
it.skip('should display the correct event information', () => {
// Assert the event details
cy.get('[data-testid="Paragraph-test"]').should('exist');
cy.get('h2').should('exist');

});
it('should have a link and text for the button', () => {

it.skip('should have a link and text for the button', () => {
mount(<AnnouncementHero />);
cy.get('[data-testid="Button-link"]')
.should('have.attr', 'target', '_blank')
Expand All @@ -38,7 +40,7 @@ describe('AnnouncementHero Component', () => {
});

//check if announcement rendered is small or large .
it('should render a small announcement when "small" prop is true', () => {
it.skip('should render a small announcement when "small" prop is true', () => {
const mockDate = new Date('2023-05-01T00:00:00Z');
cy.clock(mockDate.getTime());

Expand All @@ -47,7 +49,7 @@ describe('AnnouncementHero Component', () => {
cy.get('[data-testid="AnnouncementHero-main-div"]').should('have.class', 'mb-4');
});

it('should render a large announcement when "small" prop is false', () => {
it.skip('should render a large announcement when "small" prop is false', () => {
const mockDate = new Date('2023-05-01T00:00:00Z');
cy.clock(mockDate.getTime());

Expand Down
11 changes: 6 additions & 5 deletions cypress/test/components/campaignTests/Banner.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import React from 'react';
import { mount } from '@cypress/react';
import Banner from '../../../../components/campaigns/Banner';

// .skip should be removed once the Banner component is rendered in the website with default functionalities
describe('Banner Component', () => {
it('should not render the banner when the date is not within the valid range', () => {
it.skip('should not render the banner when the date is not within the valid range', () => {
const today = new Date();
const [day, month, year] = [today.getUTCDate(), today.getUTCMonth(), today.getUTCFullYear()];
if (year > 2022 || month !== 10 || day < 6) {
Expand All @@ -17,21 +18,21 @@ describe('Banner Component', () => {
}
});

it('should render the banner when the date is within the valid range', () => {
it.skip('should render the banner when the date is within the valid range', () => {
const mockDate = new Date(2021, 10, 12).getTime();
cy.clock(mockDate);
mount(<Banner />);
cy.get('[data-testid="Banner-main-div"]').should('be.visible');
});

it('should display the correct message when the date is within the valid range', () => {
it.skip('should display the correct message when the date is within the valid range', () => {
const mockDate = new Date(2021, 10, 12).getTime();
cy.clock(mockDate);
mount(<Banner />);
cy.contains('.font-medium', 'AsyncAPI Conference 2022 has ended').should('be.visible');
});

it('should have a link to the recordings playlist', () => {
it.skip('should have a link to the recordings playlist', () => {
const mockDate = new Date(2021, 10, 12).getTime();
cy.clock(mockDate);
mount(<Banner />);
Expand All @@ -41,7 +42,7 @@ describe('Banner Component', () => {
.should('have.attr', 'rel', 'noopener noreferrer');
});

it('should have the max-w-screen-xl class in the div element', () => {
it.skip('should have the max-w-screen-xl class in the div element', () => {
const mockDate = new Date(2021, 10, 12).getTime();
cy.clock(mockDate);
mount(<Banner />);
Expand Down

0 comments on commit c29457f

Please sign in to comment.