Migrate more strings to translation keys (#11669)
This commit is contained in:
parent
0c6e56ca91
commit
5252361d1e
112 changed files with 4855 additions and 4542 deletions
|
@ -22,7 +22,7 @@ import { NonEmptyArray } from "../../../src/@types/common";
|
|||
import { _t } from "../../../src/languageHandler";
|
||||
|
||||
describe("<TabbedView />", () => {
|
||||
const generalTab = new Tab("GENERAL", "General", "general", <div>general</div>);
|
||||
const generalTab = new Tab("GENERAL", "common|general", "general", <div>general</div>);
|
||||
const labsTab = new Tab("LABS", "common|labs", "labs", <div>labs</div>);
|
||||
const securityTab = new Tab("SECURITY", "common|security", "security", <div>security</div>);
|
||||
const defaultProps = {
|
||||
|
@ -44,13 +44,13 @@ describe("<TabbedView />", () => {
|
|||
|
||||
it("renders first tab as active tab when no initialTabId", () => {
|
||||
const { container } = render(getComponent());
|
||||
expect(getActiveTab(container)?.textContent).toEqual(generalTab.label);
|
||||
expect(getActiveTab(container)?.textContent).toEqual(_t(generalTab.label));
|
||||
expect(getActiveTabBody(container)?.textContent).toEqual("general");
|
||||
});
|
||||
|
||||
it("renders first tab as active tab when initialTabId is not valid", () => {
|
||||
const { container } = render(getComponent({ initialTabId: "bad-tab-id" }));
|
||||
expect(getActiveTab(container)?.textContent).toEqual(generalTab.label);
|
||||
expect(getActiveTab(container)?.textContent).toEqual(_t(generalTab.label));
|
||||
expect(getActiveTabBody(container)?.textContent).toEqual("general");
|
||||
});
|
||||
|
||||
|
@ -97,7 +97,7 @@ describe("<TabbedView />", () => {
|
|||
it("does not reactivate inititalTabId on rerender", () => {
|
||||
const { container, getByTestId, rerender } = render(getComponent());
|
||||
|
||||
expect(getActiveTab(container)?.textContent).toEqual(generalTab.label);
|
||||
expect(getActiveTab(container)?.textContent).toEqual(_t(generalTab.label));
|
||||
|
||||
// make security tab active
|
||||
act(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue