From 1e2e155aef5d5e59d106484a4a163a7f0f1f9745 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 12 Jul 2023 02:38:02 +0200 Subject: [PATCH 1/3] chore: update meetings.json and newsrooom_videos.json (#1932) --- config/meetings.json | 7 ++++++ config/newsroom_videos.json | 12 +++++----- dashboard.json | 45 +++++++++++-------------------------- 3 files changed, 26 insertions(+), 38 deletions(-) diff --git a/config/meetings.json b/config/meetings.json index cb36564351d6..a14a3d7e5c91 100644 --- a/config/meetings.json +++ b/config/meetings.json @@ -220,5 +220,12 @@ "url": "https://github.com/asyncapi/community/issues/791", "banner": "", "date": "2023-08-03T14:30:00.000Z" + }, + { + "title": "Community Meeting", + "calLink": "https://www.google.com/calendar/event?eid=MmpwYXMxYjBscjlnYWhtMHR2MnQ2MTMwM2cgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", + "url": "https://github.com/asyncapi/community/issues/798", + "banner": "https://user-images.githubusercontent.com/40604284/252807786-f93110e3-c344-4080-9c4f-9d32cb324680.png", + "date": "2023-07-25T08:00:00.000Z" } ] \ No newline at end of file diff --git a/config/newsroom_videos.json b/config/newsroom_videos.json index 7f757c8ea12b..0164b59d7047 100644 --- a/config/newsroom_videos.json +++ b/config/newsroom_videos.json @@ -1,4 +1,10 @@ [ + { + "image_url": "https://i.ytimg.com/vi/5o5BHJqGxIg/hqdefault.jpg", + "title": "Community Meeting (July 11th 2023)", + "description": "https://github.com/asyncapi/community/issues/784.", + "videoId": "5o5BHJqGxIg" + }, { "image_url": "https://i.ytimg.com/vi/Lunp8eSLONc/hqdefault.jpg", "title": "Spec 3.0 DOCS Meeting (July 6th 2023)", @@ -22,11 +28,5 @@ "title": "Fran AMA AsyncAPI — 23 June 2023", "description": "https://github.com/asyncapi/community/issues/764 AI-generated summary: - Fran and Benjamin discussed the release of version ...", "videoId": "1jiRDmuA-zg" - }, - { - "image_url": "https://i.ytimg.com/vi/dRu9itGfJ1E/hqdefault.jpg", - "title": "AsyncAPI Spec 3.0 Docs Meeting", - "description": "https://github.com/asyncapi/community/issues/749.", - "videoId": "dRu9itGfJ1E" } ] \ No newline at end of file diff --git a/dashboard.json b/dashboard.json index 133099fc7458..197b16fe2949 100644 --- a/dashboard.json +++ b/dashboard.json @@ -56,7 +56,7 @@ "resourcePath": "/asyncapi/bindings/pull/84", "repo": "asyncapi/bindings", "labels": [], - "score": 23.548316277439216 + "score": 23.835490866188476 }, { "id": "I_kwDOBGu-185CELGB", @@ -110,16 +110,12 @@ "resourcePath": "/asyncapi/spec/issues/663", "repo": "asyncapi/spec", "labels": [ - { - "name": "stale", - "color": "819cd3" - }, { "name": "💭 Strawman (RFC 0)", "color": "C2E0C6" } ], - "score": 21.25091956744515 + "score": 21.538094156194408 }, { "id": "PR_kwDOBW5R_c5TUuUu", @@ -144,26 +140,26 @@ "score": 16.65612614745701 }, { - "id": "PR_kwDOBGu-185KHmXZ", + "id": "PR_kwDOFLhIt85RTiHb", "isPR": true, "isAssigned": false, - "title": "feat: new traits merge mechanism", - "author": "magicmatatjahu", - "resourcePath": "/asyncapi/spec/pull/907", - "repo": "asyncapi/spec", + "title": "docs: add flowchart for GSoC23 project in README.md", + "author": "14Richa", + "resourcePath": "/asyncapi/community/pull/719", + "repo": "asyncapi/community", "labels": [], "score": 14.645904026212197 }, { - "id": "PR_kwDOFLhIt85RTiHb", + "id": "PR_kwDOBGu-185KHmXZ", "isPR": true, "isAssigned": false, - "title": "docs: add flowchart for GSoC23 project in README.md", - "author": "14Richa", - "resourcePath": "/asyncapi/community/pull/719", - "repo": "asyncapi/community", + "title": "feat: new traits merge mechanism", + "author": "magicmatatjahu", + "resourcePath": "/asyncapi/spec/pull/907", + "repo": "asyncapi/spec", "labels": [], - "score": 14.358729437462937 + "score": 14.645904026212197 } ], "goodFirstIssues": [ @@ -527,21 +523,6 @@ } ] }, - { - "id": "I_kwDOE8Qh385pckK7", - "title": "Improve the example display name", - "isAssigned": false, - "resourcePath": "/asyncapi/modelina/issues/1417", - "repo": "asyncapi/modelina", - "author": "sambhavgupta0705", - "area": "javascript", - "labels": [ - { - "name": "enhancement", - "color": "a2eeef" - } - ] - }, { "id": "I_kwDOFLhIt85o9dDJ", "title": "Add 2023 mentorship directory", From b44aa95434ad8111560279f122afba31e030d9a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 09:50:57 +0200 Subject: [PATCH 2/3] chore(deps): bump semver from 5.7.1 to 5.7.2 (#1935) --- package-lock.json | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0ca4662364d5..71db8d393650 100644 --- a/package-lock.json +++ b/package-lock.json @@ -262,9 +262,9 @@ } }, "node_modules/@babel/core/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -5059,10 +5059,13 @@ } }, "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } }, "node_modules/eslint-scope": { "version": "5.1.1", @@ -11395,9 +11398,9 @@ } }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -13194,9 +13197,9 @@ }, "dependencies": { "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" }, "source-map": { "version": "0.5.7", @@ -16962,9 +16965,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -21955,9 +21958,9 @@ } }, "semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } From 3360e157c2a891d13b91878f8a2903d8a1ba2ae3 Mon Sep 17 00:00:00 2001 From: Aadrika Bhargava <64789514+reachaadrika@users.noreply.github.com> Date: Wed, 12 Jul 2023 17:19:26 +0530 Subject: [PATCH 3/3] feat: adding unit tests for button component (#1818) --- components/buttons/Button.js | 8 +-- components/buttons/ChapterSuggestion.js | 1 + components/buttons/DocsButton.js | 8 +-- components/buttons/GitHubIssue.js | 2 +- components/buttons/ICSFileButton.js | 2 +- cypress/test/buttons/ApplyJob.cy.js | 22 +++++++ cypress/test/buttons/Buttons.cy.js | 64 +++++++++++++++++++ cypress/test/buttons/ChapterSuggestion.cy.js | 40 ++++++++++++ cypress/test/buttons/DocsButton.cy.js | 32 ++++++++++ cypress/test/buttons/GithubButton.cy.js | 27 ++++++++ cypress/test/buttons/GithubIssue.cy.js | 19 ++++++ .../test/buttons/GoogleCalendarButton.cy.js | 24 +++++++ cypress/test/buttons/ICSFileButton.cy.js | 26 ++++++++ .../test/buttons/OpenInPlaygroundButton.cy.js | 9 +++ cypress/test/buttons/OpenInStudioButton.cy.js | 21 ++++++ cypress/test/buttons/SlackButton.cy.js | 27 ++++++++ cypress/test/buttons/SubscribeButton.cy.js | 27 ++++++++ cypress/test/buttons/YoutubeButton.cy.js | 27 ++++++++ 18 files changed, 376 insertions(+), 10 deletions(-) create mode 100644 cypress/test/buttons/ApplyJob.cy.js create mode 100644 cypress/test/buttons/Buttons.cy.js create mode 100644 cypress/test/buttons/ChapterSuggestion.cy.js create mode 100644 cypress/test/buttons/DocsButton.cy.js create mode 100644 cypress/test/buttons/GithubButton.cy.js create mode 100644 cypress/test/buttons/GithubIssue.cy.js create mode 100644 cypress/test/buttons/GoogleCalendarButton.cy.js create mode 100644 cypress/test/buttons/ICSFileButton.cy.js create mode 100644 cypress/test/buttons/OpenInPlaygroundButton.cy.js create mode 100644 cypress/test/buttons/OpenInStudioButton.cy.js create mode 100644 cypress/test/buttons/SlackButton.cy.js create mode 100644 cypress/test/buttons/SubscribeButton.cy.js create mode 100644 cypress/test/buttons/YoutubeButton.cy.js diff --git a/components/buttons/Button.js b/components/buttons/Button.js index 3c19313c6cb4..d75e61f8a2f9 100644 --- a/components/buttons/Button.js +++ b/components/buttons/Button.js @@ -19,16 +19,16 @@ export default function Button({ if (!href) { return ( - @@ -37,7 +37,7 @@ export default function Button({ return ( - + { icon && iconPosition === 'left' && ( {icon} diff --git a/components/buttons/ChapterSuggestion.js b/components/buttons/ChapterSuggestion.js index 137b944c09cf..3d28a1f80010 100644 --- a/components/buttons/ChapterSuggestion.js +++ b/components/buttons/ChapterSuggestion.js @@ -16,6 +16,7 @@ export default function ChapterSuggestion({ rel="noopener noreferrer" title={description} className={`${className} flex flex-col mt-4 p-6 max-w-lg rounded shadow-md border border-gray-200 text-gray-900 transition-all duration-300 ease-in-out hover:shadow-lg hover:border-gray-300`} + data-testid="ChapterSuggestion-link" >
{title}

{description}

diff --git a/components/buttons/DocsButton.js b/components/buttons/DocsButton.js index c8b64b4f72c5..4f9d5d2af239 100644 --- a/components/buttons/DocsButton.js +++ b/components/buttons/DocsButton.js @@ -7,7 +7,7 @@ export default function DocsButton({ post, className='' }) { { post?.prevPage &&
-
+
-
{post.prevPage.title}
+
{post.prevPage.title}
@@ -36,7 +36,7 @@ export default function DocsButton({ post, className='' }) { { post?.nextPage &&
-
+
Up Next
@@ -55,7 +55,7 @@ export default function DocsButton({ post, className='' }) { />
-
{post.nextPage.title}
+
{post.nextPage.title}
diff --git a/components/buttons/GitHubIssue.js b/components/buttons/GitHubIssue.js index c54098d6fb63..30fcdcde47c9 100644 --- a/components/buttons/GitHubIssue.js +++ b/components/buttons/GitHubIssue.js @@ -2,7 +2,7 @@ import React from 'react' export default function GitHubIssue({className=''}) { return ( - + Github:AsyncAPI Create Issue on GitHub diff --git a/components/buttons/ICSFileButton.js b/components/buttons/ICSFileButton.js index e7e4dbdd1260..78ac35cc6095 100644 --- a/components/buttons/ICSFileButton.js +++ b/components/buttons/ICSFileButton.js @@ -1,7 +1,7 @@ import Button from './Button'; import IconCalendar from '../icons/Calendar'; -export default function GoogleCalendarButton({ +export default function ICSFButton({ text = 'Download ICS File', href, target = '_blank', diff --git a/cypress/test/buttons/ApplyJob.cy.js b/cypress/test/buttons/ApplyJob.cy.js new file mode 100644 index 000000000000..69189e8156f4 --- /dev/null +++ b/cypress/test/buttons/ApplyJob.cy.js @@ -0,0 +1,22 @@ +import React from 'react'; +import { mount } from 'cypress/react'; +import ApplyJobButton from '../../../components/buttons/ApplyJob'; + +describe('ApplyJobButton', () => { + const job = { + contact: 'https://www.asyncapi.com/', + }; + + beforeEach(() => { + mount(); + }); + + it('renders the ApplyJobButton component', () => { + cy.contains('Apply for this job').should('exist'); + }); + + it('sets the correct href and target attributes', () => { + cy.get('[data-testid="Button-link"]').should('have.attr', 'href', 'https://www.asyncapi.com/'); + cy.get('[data-testid="Button-link"]').should('have.attr', 'target', '_blank'); + }); +}); diff --git a/cypress/test/buttons/Buttons.cy.js b/cypress/test/buttons/Buttons.cy.js new file mode 100644 index 000000000000..38a30d26bc47 --- /dev/null +++ b/cypress/test/buttons/Buttons.cy.js @@ -0,0 +1,64 @@ +import React from 'react'; +import { mount } from 'cypress/react'; +import Button from '../../../components/buttons/Button'; +import IconGithub from '../../../components/icons/Github' +describe('Button component', () => { + it('renders a button without href', () => { + const text = 'Click me'; + const type = 'button'; + const icon = ; + mount( +