Skip to content

Commit

Permalink
chore: enable new submission flow [Do not merge] (#10274)
Browse files Browse the repository at this point in the history
* chore: enable new submission flow

* fix: broken tests
  • Loading branch information
MounirDhahri committed Jun 6, 2024
1 parent d8d0ddf commit a7f5352
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fireEvent, screen } from "@testing-library/react-native"
import { MyCollectionWhySellTestsQuery } from "__generated__/MyCollectionWhySellTestsQuery.graphql"
import { GlobalStore } from "app/store/GlobalStore"
import { GlobalStore, __globalStoreTestUtils__ } from "app/store/GlobalStore"
import { navigate } from "app/system/navigation/navigate"
import { flushPromiseQueue } from "app/utils/tests/flushPromiseQueue"
import { mockTrackEvent } from "app/utils/tests/globallyMockedStuff"
Expand Down Expand Up @@ -51,6 +51,9 @@ describe("MyCollectionWhySell", () => {
// P1 related tests
describe("Artwork without submission", () => {
describe("Navigation", () => {
beforeEach(() => {
__globalStoreTestUtils__?.injectFeatureFlags({ AREnableNewSubmissionFlow: false })
})
it("navigates to the sale form when Submit for Sale is pressed", () => {
renderWithWrappers(<TestRenderer contextModule="insights" />)

Expand All @@ -62,6 +65,7 @@ describe("MyCollectionWhySell", () => {
fireEvent.press(button)
expect(navigate).toBeCalledWith("/sell/submissions/new")
})

it("navigates to the explanatory page when learn more is press", () => {
renderWithWrappers(<TestRenderer contextModule="insights" />)

Expand Down Expand Up @@ -141,6 +145,9 @@ describe("MyCollectionWhySell", () => {
})

describe("Behavior", () => {
beforeEach(() => {
__globalStoreTestUtils__?.injectFeatureFlags({ AREnableNewSubmissionFlow: false })
})
it("initializes the submission form", async () => {
renderWithWrappers(<TestRenderer contextModule="oldAbout" />)
resolveData({
Expand Down
6 changes: 4 additions & 2 deletions src/app/store/config/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ export const features = {
},
AREnableNewSubmissionFlow: {
description: "Enable new submission flow",
readyForRelease: false,
readyForRelease: true,
showInDevMenu: true,
echoFlagKey: "AREnableNewSubmissionFlow",
},
AREnableSubmitMyCollectionArtworkInSubmitFlow: {
description: "Enable Start Submission from My Collection in submit artwork flow",
Expand All @@ -282,8 +283,9 @@ export const features = {
},
AREnableSaveAndContinueSubmission: {
description: "Enable save and continue submission flow",
readyForRelease: false,
readyForRelease: true,
showInDevMenu: true,
echoFlagKey: "AREnableSaveAndContinueSubmission",
},
} satisfies { [key: string]: FeatureDescriptor }

Expand Down

0 comments on commit a7f5352

Please sign in to comment.