forked from mozilla/experimenter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added analysis report link fixes mozilla#3066
- Loading branch information
Showing
2 changed files
with
70 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,6 +206,48 @@ describe("<ExperimentDetails />", () => { | |
}); | ||
}); | ||
|
||
it("renders with analysis report when live", async () => { | ||
await act(async () => { | ||
const { getByText } = renderWithRouter( | ||
wrapInExperimentProvider(<ExperimentDetails />, { | ||
initialState: { | ||
status: ExperimentStatus.LIVE, | ||
slug: "test-slug", | ||
name: "Test Name", | ||
objectives: "Test objectives", | ||
owner: "[email protected]", | ||
features: ["pinned_tabs", "picture_in_picture"], | ||
audience: "all_english", | ||
firefox_min_version: "78.0", | ||
}, | ||
}), | ||
); | ||
|
||
expect(getByText(/The results can be found/)).toBeInTheDocument(); | ||
}); | ||
}); | ||
|
||
it("renders without analysis report when not live", async () => { | ||
await act(async () => { | ||
const { queryByText } = renderWithRouter( | ||
wrapInExperimentProvider(<ExperimentDetails />, { | ||
initialState: { | ||
status: ExperimentStatus.DRAFT, | ||
slug: "test-slug", | ||
name: "Test Name", | ||
objectives: "Test objectives", | ||
owner: "[email protected]", | ||
features: ["pinned_tabs", "picture_in_picture"], | ||
audience: "all_english", | ||
firefox_min_version: "78.0", | ||
}, | ||
}), | ||
); | ||
|
||
expect(queryByText(/The results can be found/)).toBe(null); | ||
}); | ||
}); | ||
|
||
it("sends you to the edit page when the 'Back' button is clicked", async () => { | ||
await act(async () => { | ||
const { getByText, history } = renderWithRouter( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters