Skip to content

Commit

Permalink
Add test discussion_posts
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-gai authored Nov 5, 2021
1 parent 7f26d70 commit aa2d09c
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web-app/test/fixtures/discussion_posts/author-with-at.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
author: "@philip-gai"
repository: https://github.com/philip-gai/repost
category: announcements
-->

# Author with @

Testing that the post works with the @ in the author name
9 changes: 9 additions & 0 deletions web-app/test/fixtures/discussion_posts/category-long.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
author: philip-gai
repository: https://github.com/philip-gai/repost-demo
category: https://github.com/philip-gai/repost-demo/discussions/categories/announcements
-->

# Short category

Testing that posting with a short category (no URL) will not break things
9 changes: 9 additions & 0 deletions web-app/test/fixtures/discussion_posts/category-short.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
author: philip-gai
repository: https://github.com/philip-gai/repost-demo
category: announcements
-->

# Short category

Testing that posting with a short category (no URL) will not break things
9 changes: 9 additions & 0 deletions web-app/test/fixtures/discussion_posts/happy-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
author: philip-gai
repository: https://github.com/philip-gai/repost
category: announcements
-->

# Happy Path

Testing a normal scenario like this works 👍🏼
13 changes: 13 additions & 0 deletions web-app/test/fixtures/discussion_posts/header-top-in-body.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!--
author: philip-gai
repository: https://github.com/philip-gai/repost-demo
category: announcements
-->

# This is the discussion title

# This should be a header at the beginning of the discussion body

Actual picture of me...

![image](https://media.giphy.com/media/o0vwzuFwCGAFO/giphy.gif)
12 changes: 12 additions & 0 deletions web-app/test/fixtures/discussion_posts/links-to-media.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!--
author: philip-gai
repository: https://github.com/philip-gai/repost-demo
team: https://github.com/orgs/elastico-group/teams/everyone
category: announcements
-->

# Discussion with user content media

Testing that posting a discussion with images will work

![observability-current-platform](https://user-images.githubusercontent.com/17363579/137337542-3a1bb39d-7f4d-40fc-a9ee-7727debf1675.png)
10 changes: 10 additions & 0 deletions web-app/test/fixtures/discussion_posts/repo-and-team-missing-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--
author: philip-gai
repository:
team:
category: announcements
-->

# Missing repo and team

Testing that missing the repo and team VALUES in the YAML will not break things
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!--
author: philip-gai
category: announcements
-->

# Missing Repo and Team 2

Testing that missing the YAML values for repo and team will not break things
9 changes: 9 additions & 0 deletions web-app/test/fixtures/discussion_posts/repo-external.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
author: philip-gai
repository: https://github.com/philip-gai/repost-demo
category: announcements
-->

# Different Repo

Testing that posting to a different repo will work
9 changes: 9 additions & 0 deletions web-app/test/fixtures/discussion_posts/repo-only-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
author: philip-gai
repository: https://github.com/philip-gai/repost-demo
category: announcements
-->

# Only Repo

Testing that the post works with only the repository in the YAML and no team
10 changes: 10 additions & 0 deletions web-app/test/fixtures/discussion_posts/repo-only-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--
author: philip-gai
repository: https://github.com/philip-gai/repost-demo
team:
category: announcements
-->

# Only Repo 2

Testing that the post works with only the repository in the YAML and no value for the team
9 changes: 9 additions & 0 deletions web-app/test/fixtures/discussion_posts/team-only-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
author: philip-gai
team: https://github.com/orgs/elastico-group/teams/everyone
category: announcements
-->

# Only team

Testing that missing repo YAML key will not break things
10 changes: 10 additions & 0 deletions web-app/test/fixtures/discussion_posts/team-only-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--
author: philip-gai
team: https://github.com/orgs/elastico-group/teams/everyone
repository:
category: announcements
-->

# Only team 2

Testing that missing VALUE but not key for repository will not break things
9 changes: 9 additions & 0 deletions web-app/test/fixtures/discussion_posts/unapproved.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
author: philip-gai
repository: https://github.com/philip-gai/repost
category: announcements
-->

# Don't Approve

Testing what will happen if you don't approve this post to be posted :)
9 changes: 9 additions & 0 deletions web-app/test/fixtures/discussion_posts/yaml-invalid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!--
author: philip-gai::::aadf:
repository: https://github.com/philip-gai/repost-demo
category: announcements
-->

# Invalid YAML

This is for testing invalid yaml

0 comments on commit aa2d09c

Please sign in to comment.