[CORL-218] In Stream Approve and Reject (#2340)

* feat: instream moderation

* fix: tests

* test: add tests for in stream moderation

* fix: lint

* fix: snapshots
This commit is contained in:
Kiwi
2019-06-04 19:27:15 +02:00
committed by GitHub
parent 1cf2f61bfb
commit 593d94ddbb
74 changed files with 1106 additions and 297 deletions
@@ -72,7 +72,7 @@ it("logs out", async () => {
userMenu.props.onClick();
const signOutButton = await waitForElement(() =>
within(testRenderer.root).getByText("Sign Out")
within(testRenderer.root).getByText("Sign Out", { selector: "button" })
);
signOutButton.props.onClick();
@@ -161,7 +161,7 @@ it("change user role", async () => {
TestRenderer.act(() => {
within(popup)
.getByText("Staff")
.getByText("Staff", { selector: "button" })
.props.onClick();
});
@@ -360,7 +360,7 @@ it("ban user", async () => {
TestRenderer.act(() => {
within(popup)
.getByText("Ban User")
.getByText("Ban User", { selector: "button" })
.props.onClick();
});
@@ -434,7 +434,7 @@ it("remove user ban", async () => {
TestRenderer.act(() => {
within(popup)
.getByText("Remove Ban")
.getByText("Remove Ban", { selector: "button" })
.props.onClick();
});
@@ -61,6 +61,12 @@ exports[`change settings: during submit: oidc without errors 1`] = `
target="_blank"
>
https://openid.net/connect/
<span
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
open_in_new
</span>
</a>
</p>
<hr
@@ -497,6 +503,12 @@ For more information visit:
target="_blank"
>
https://developers.facebook.com/docs/facebook-login/web
<span
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
open_in_new
</span>
</a>
.
</p>
@@ -772,6 +784,12 @@ exports[`change settings: enable oidc configure box 1`] = `
target="_blank"
>
https://openid.net/connect/
<span
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
open_in_new
</span>
</a>
</p>
<hr
@@ -1206,6 +1224,12 @@ exports[`change settings: oidc validation errors 1`] = `
target="_blank"
>
https://openid.net/connect/
<span
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
open_in_new
</span>
</a>
</p>
<hr
@@ -2082,6 +2106,12 @@ integration to register for a new account.
target="_blank"
>
https://openid.net/connect/
<span
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
open_in_new
</span>
</a>
</p>
<hr
@@ -2736,6 +2766,12 @@ to create and set up a web application. For more information visit:
target="_blank"
>
https://developers.google.com/identity/protocols/OAuth2WebServer#creatingcred
<span
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
open_in_new
</span>
</a>
.
</p>
@@ -3010,6 +3046,12 @@ For more information visit:
target="_blank"
>
https://developers.facebook.com/docs/facebook-login/web
<span
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
open_in_new
</span>
</a>
.
</p>
@@ -67,7 +67,7 @@ exports[`rejected queue accepts comment in rejected queue: dangling 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -88,7 +88,6 @@ exports[`rejected queue accepts comment in rejected queue: dangling 1`] = `
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -267,7 +266,7 @@ exports[`rejected queue renders rejected queue with comments 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -288,7 +287,6 @@ exports[`rejected queue renders rejected queue with comments 1`] = `
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -454,7 +452,7 @@ exports[`rejected queue renders rejected queue with comments 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -475,7 +473,6 @@ exports[`rejected queue renders rejected queue with comments 1`] = `
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -647,7 +644,7 @@ exports[`rejected queue renders rejected queue with comments and load more 1`] =
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -668,7 +665,6 @@ exports[`rejected queue renders rejected queue with comments and load more 1`] =
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -863,7 +859,7 @@ exports[`reported queue accepts comment in reported queue: dangling 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -884,7 +880,6 @@ exports[`reported queue accepts comment in reported queue: dangling 1`] = `
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -1066,7 +1061,7 @@ exports[`reported queue rejects comment in reported queue: dangling 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -1087,7 +1082,6 @@ exports[`reported queue rejects comment in reported queue: dangling 1`] = `
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -1287,7 +1281,7 @@ exports[`reported queue renders reported queue with comments 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -1308,7 +1302,6 @@ exports[`reported queue renders reported queue with comments 1`] = `
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -1474,7 +1467,7 @@ exports[`reported queue renders reported queue with comments 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -1495,7 +1488,6 @@ exports[`reported queue renders reported queue with comments 1`] = `
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -1677,7 +1669,7 @@ exports[`reported queue renders reported queue with comments 2`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -1698,7 +1690,6 @@ exports[`reported queue renders reported queue with comments 2`] = `
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -1864,7 +1855,7 @@ exports[`reported queue renders reported queue with comments 2`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -1885,7 +1876,6 @@ exports[`reported queue renders reported queue with comments 2`] = `
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -2057,7 +2047,7 @@ exports[`reported queue renders reported queue with comments and load more 1`] =
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -2078,7 +2068,6 @@ exports[`reported queue renders reported queue with comments and load more 1`] =
className="TextLink-root ModerateCard-link"
href="/admin/moderate/story-1"
onClick={[Function]}
target="_blank"
>
Moderate Story
</a>
@@ -2519,7 +2508,7 @@ exports[`single comment view accepts single comment 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -2687,7 +2676,7 @@ exports[`single comment view rejects single comment 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -2890,7 +2879,7 @@ exports[`single comment view renders single comment view 1`] = `
aria-hidden="true"
className="Icon-root Icon-xs TextLink-icon"
>
launch
open_in_new
</span>
</a>
</div>
@@ -191,7 +191,7 @@ it("change story status", async () => {
TestRenderer.act(() => {
within(popup)
.getByText("Closed")
.getByText("Closed", { selector: "button" })
.props.onClick();
});
@@ -205,7 +205,7 @@ it("change story status", async () => {
TestRenderer.act(() => {
within(popup)
.getByText("Open")
.getByText("Open", { selector: "button" })
.props.onClick();
});