replace Polls history
strings with Poll history
(#10454)
Co-authored-by: Michael Weimann <michaelw@matrix.org>
This commit is contained in:
parent
f5115e047e
commit
6eda1fa6e2
11 changed files with 15 additions and 15 deletions
|
@ -77,7 +77,7 @@ describe("Poll history", () => {
|
||||||
function openPollHistory(): void {
|
function openPollHistory(): void {
|
||||||
cy.get('.mx_HeaderButtons [aria-label="Room info"]').click();
|
cy.get('.mx_HeaderButtons [aria-label="Room info"]').click();
|
||||||
cy.get(".mx_RoomSummaryCard").within(() => {
|
cy.get(".mx_RoomSummaryCard").within(() => {
|
||||||
cy.contains("Polls history").click();
|
cy.contains("Poll history").click();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ export default class RoomSettingsDialog extends React.Component<IProps, IState>
|
||||||
tabs.push(
|
tabs.push(
|
||||||
new Tab(
|
new Tab(
|
||||||
ROOM_POLL_HISTORY_TAB,
|
ROOM_POLL_HISTORY_TAB,
|
||||||
_td("Polls history"),
|
_td("Poll history"),
|
||||||
"mx_RoomSettingsDialog_pollsIcon",
|
"mx_RoomSettingsDialog_pollsIcon",
|
||||||
<PollHistoryTab roomId={this.props.roomId} onFinished={() => this.props.onFinished(true)} />,
|
<PollHistoryTab roomId={this.props.roomId} onFinished={() => this.props.onFinished(true)} />,
|
||||||
),
|
),
|
||||||
|
|
|
@ -63,7 +63,7 @@ export const PollHistory: React.FC<PollHistoryProps> = ({ room, matrixClient, pe
|
||||||
const title = focusedPoll ? (
|
const title = focusedPoll ? (
|
||||||
<PollDetailHeader filter={filter} onNavigateBack={() => setFocusedPollId(null)} />
|
<PollDetailHeader filter={filter} onNavigateBack={() => setFocusedPollId(null)} />
|
||||||
) : (
|
) : (
|
||||||
_t("Polls history")
|
_t("Poll history")
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -343,7 +343,7 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, permalinkCreator, onClose })
|
||||||
)}
|
)}
|
||||||
{!isVideoRoom && (
|
{!isVideoRoom && (
|
||||||
<Button className="mx_RoomSummaryCard_icon_poll" onClick={onRoomPollHistoryClick}>
|
<Button className="mx_RoomSummaryCard_icon_poll" onClick={onRoomPollHistoryClick}>
|
||||||
{_t("Polls history")}
|
{_t("Poll history")}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{pinningEnabled && !isVideoRoom && (
|
{pinningEnabled && !isVideoRoom && (
|
||||||
|
|
|
@ -2237,7 +2237,7 @@
|
||||||
"Not encrypted": "Not encrypted",
|
"Not encrypted": "Not encrypted",
|
||||||
"About": "About",
|
"About": "About",
|
||||||
"Files": "Files",
|
"Files": "Files",
|
||||||
"Polls history": "Polls history",
|
"Poll history": "Poll history",
|
||||||
"Pinned": "Pinned",
|
"Pinned": "Pinned",
|
||||||
"Export chat": "Export chat",
|
"Export chat": "Export chat",
|
||||||
"Share room": "Share room",
|
"Share room": "Share room",
|
||||||
|
|
|
@ -99,7 +99,7 @@ describe("<RoomSettingsDialog />", () => {
|
||||||
it("displays poll history when tab clicked", () => {
|
it("displays poll history when tab clicked", () => {
|
||||||
const { container } = getComponent();
|
const { container } = getComponent();
|
||||||
|
|
||||||
fireEvent.click(screen.getByText("Polls history"));
|
fireEvent.click(screen.getByText("Poll history"));
|
||||||
|
|
||||||
expect(container.querySelector(".mx_SettingsTab")).toMatchSnapshot();
|
expect(container.querySelector(".mx_SettingsTab")).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
|
|
|
@ -74,7 +74,7 @@ NodeList [
|
||||||
<span
|
<span
|
||||||
class="mx_TabbedView_tabLabel_text"
|
class="mx_TabbedView_tabLabel_text"
|
||||||
>
|
>
|
||||||
Polls history
|
Poll history
|
||||||
</span>
|
</span>
|
||||||
</div>,
|
</div>,
|
||||||
]
|
]
|
||||||
|
@ -90,7 +90,7 @@ exports[`<RoomSettingsDialog /> poll history displays poll history when tab clic
|
||||||
<h2
|
<h2
|
||||||
class="mx_Heading_h2 mx_PollHistory_header"
|
class="mx_Heading_h2 mx_PollHistory_header"
|
||||||
>
|
>
|
||||||
Polls history
|
Poll history
|
||||||
</h2>
|
</h2>
|
||||||
<div
|
<div
|
||||||
class="mx_PollHistoryList"
|
class="mx_PollHistoryList"
|
||||||
|
|
|
@ -318,7 +318,7 @@ describe("<PollHistory />", () => {
|
||||||
|
|
||||||
fireEvent.click(getByText("Question?"));
|
fireEvent.click(getByText("Question?"));
|
||||||
|
|
||||||
expect(queryByText("Polls history")).not.toBeInTheDocument();
|
expect(queryByText("Poll history")).not.toBeInTheDocument();
|
||||||
// elements from MPollBody
|
// elements from MPollBody
|
||||||
expect(getByText("Question?")).toMatchSnapshot();
|
expect(getByText("Question?")).toMatchSnapshot();
|
||||||
expect(getByText("Socks")).toBeInTheDocument();
|
expect(getByText("Socks")).toBeInTheDocument();
|
||||||
|
@ -394,13 +394,13 @@ describe("<PollHistory />", () => {
|
||||||
expect(getByText("Question?")).toBeInTheDocument();
|
expect(getByText("Question?")).toBeInTheDocument();
|
||||||
|
|
||||||
// header not shown
|
// header not shown
|
||||||
expect(queryByText("Polls history")).not.toBeInTheDocument();
|
expect(queryByText("Poll history")).not.toBeInTheDocument();
|
||||||
|
|
||||||
expect(getByText("Active polls")).toMatchSnapshot();
|
expect(getByText("Active polls")).toMatchSnapshot();
|
||||||
fireEvent.click(getByText("Active polls"));
|
fireEvent.click(getByText("Active polls"));
|
||||||
|
|
||||||
// main list header displayed again
|
// main list header displayed again
|
||||||
expect(getByText("Polls history")).toBeInTheDocument();
|
expect(getByText("Poll history")).toBeInTheDocument();
|
||||||
// active filter still active
|
// active filter still active
|
||||||
expect(getByTestId("filter-tab-PollHistory_filter-ACTIVE").firstElementChild).toBeChecked();
|
expect(getByTestId("filter-tab-PollHistory_filter-ACTIVE").firstElementChild).toBeChecked();
|
||||||
// list displayed
|
// list displayed
|
||||||
|
|
|
@ -37,7 +37,7 @@ exports[`<PollHistory /> renders a list of active polls when there are polls in
|
||||||
<h2
|
<h2
|
||||||
class="mx_Heading_h2 mx_PollHistory_header"
|
class="mx_Heading_h2 mx_PollHistory_header"
|
||||||
>
|
>
|
||||||
Polls history
|
Poll history
|
||||||
</h2>
|
</h2>
|
||||||
<div
|
<div
|
||||||
class="mx_PollHistoryList"
|
class="mx_PollHistoryList"
|
||||||
|
|
|
@ -137,13 +137,13 @@ describe("<RoomSummaryCard />", () => {
|
||||||
it("renders poll history option", () => {
|
it("renders poll history option", () => {
|
||||||
const { getByText } = getComponent();
|
const { getByText } = getComponent();
|
||||||
|
|
||||||
expect(getByText("Polls history")).toBeInTheDocument();
|
expect(getByText("Poll history")).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("opens poll history dialog on button click", () => {
|
it("opens poll history dialog on button click", () => {
|
||||||
const { getByText } = getComponent();
|
const { getByText } = getComponent();
|
||||||
|
|
||||||
fireEvent.click(getByText("Polls history"));
|
fireEvent.click(getByText("Poll history"));
|
||||||
|
|
||||||
expect(modalSpy).toHaveBeenCalledWith(PollHistoryDialog, {
|
expect(modalSpy).toHaveBeenCalledWith(PollHistoryDialog, {
|
||||||
room,
|
room,
|
||||||
|
|
|
@ -88,7 +88,7 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
>
|
>
|
||||||
Polls history
|
Poll history
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mx_AccessibleButton mx_BaseCard_Button mx_RoomSummaryCard_Button mx_RoomSummaryCard_icon_export"
|
class="mx_AccessibleButton mx_BaseCard_Button mx_RoomSummaryCard_Button mx_RoomSummaryCard_icon_export"
|
||||||
|
|
Loading…
Reference in a new issue