Skip to content

Commit c26d6bf

Browse files
committed
ui+tests+locales: updates tests & auth wording
1 parent fb825ab commit c26d6bf

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

app/src/__tests__/components/auth/AuthPage.spec.tsx

+5-12
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,9 @@ describe('AuthPage ', () => {
2626
expect(getByText('Terminal')).toBeInTheDocument();
2727
});
2828

29-
it('should display the password field', () => {
30-
const { getByLabelText } = render();
31-
expect(getByLabelText('Enter your password in the field above')).toBeInTheDocument();
32-
});
33-
34-
it('should display the submit button', () => {
29+
it('should display the login button', () => {
3530
const { getByText } = render();
36-
expect(getByText('Submit')).toBeInTheDocument();
31+
expect(getByText('Login')).toBeInTheDocument();
3732
});
3833

3934
it('should display nothing when the store is not initialized', () => {
@@ -49,7 +44,7 @@ describe('AuthPage ', () => {
4944

5045
it('should display an error when submitting an empty password', async () => {
5146
const { getByText, findByText } = render();
52-
fireEvent.click(getByText('Submit'));
47+
fireEvent.click(getByText('Login'));
5348
expect(await findByText('oops, password is required')).toBeInTheDocument();
5449
});
5550

@@ -59,10 +54,8 @@ describe('AuthPage ', () => {
5954
return undefined as any;
6055
});
6156

62-
const { getByText, getByLabelText, findByText } = render();
63-
const input = getByLabelText('Enter your password in the field above');
64-
fireEvent.change(input, { target: { value: 'test-pw' } });
65-
fireEvent.click(getByText('Submit'));
57+
const { getByText, findByText } = render();
58+
fireEvent.click(getByText('Login'));
6659
expect(await findByText('oops, that password is incorrect')).toBeInTheDocument();
6760
});
6861
});

app/src/i18n/locales/en-US.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"cmps.auth.AuthPage.terminal": "Terminal",
2727
"cmps.auth.AuthPage.subtitle": "Efficiently manage Lightning node liquidity",
2828
"cmps.auth.AuthPage.passLabel": "Enter your password in the field above",
29-
"cmps.auth.AuthPage.submitBtn": "Submit",
29+
"cmps.auth.AuthPage.loginBtn": "Login",
3030
"cmps.common.Tile.maximizeTip": "Maximize",
3131
"cmps.common.PageHeader.exportTip": "Download CSV",
3232
"cmps.common.PageHeader.helpTip": "Take a Tour",

0 commit comments

Comments
 (0)