Skip to content

Commit

Permalink
sentence case
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAlec committed Aug 9, 2024
1 parent ac7f92a commit de32e23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/wallet/components/WalletDropdownFundLink.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('WalletDropdownFundLink', () => {
const linkElement = screen.getByRole('link');
expect(linkElement).toBeInTheDocument();
expect(linkElement).toHaveAttribute('href', FUNDING_URL);
expect(screen.getByText('Fund Wallet')).toBeInTheDocument();
expect(screen.getByText('Fund wallet')).toBeInTheDocument();
});

it('renders correctly with custom icon element', () => {
Expand All @@ -22,7 +22,7 @@ describe('WalletDropdownFundLink', () => {
const linkElement = screen.getByRole('link');
expect(linkElement).toBeInTheDocument();
expect(linkElement).toHaveAttribute('href', FUNDING_URL);
expect(screen.getByText('Fund Wallet')).toBeInTheDocument();
expect(screen.getByText('Fund wallet')).toBeInTheDocument();
expect(screen.getByLabelText('custom-icon')).toBeInTheDocument();
});

Expand All @@ -45,13 +45,13 @@ describe('WalletDropdownFundLink', () => {

render(<WalletDropdownFundLink openIn="window" />);

const linkElement = screen.getByText('Fund Wallet');
const linkElement = screen.getByText('Fund wallet');
fireEvent.click(linkElement);

// Check if window.open was called with the correct arguments
expect(mockOpen).toHaveBeenCalledWith(

Check failure on line 52 in src/wallet/components/WalletDropdownFundLink.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

src/wallet/components/WalletDropdownFundLink.test.tsx > WalletDropdownFundLink > opens a new window when clicked with type="window"

AssertionError: expected "spy" to be called with arguments: [ StringContaining{…}, …(2) ] Received: 1st spy call: Array [ - StringContaining "http://keys.coinbase.com/funding", - "Coinbase Fund wallet", - StringContaining "width=600,height=700", + "http://keys.coinbase.com/funding?dappName=&dappUrl=http://localhost:3000/&onchainkit=0.28.7", + "Coinbase Fund Wallet", + "width=600,height=700,resizable,scrollbars=yes,status=1,left=212,top=34", ] Number of calls: 1 ❯ src/wallet/components/WalletDropdownFundLink.test.tsx:52:22
expect.stringContaining('http://keys.coinbase.com/funding'),
'Coinbase Fund Wallet',
'Coinbase Fund wallet',
expect.stringContaining('width=600,height=700'),
);

Expand All @@ -77,14 +77,14 @@ describe('WalletDropdownFundLink', () => {

render(<WalletDropdownFundLink openIn="window" windowSize={size} />);

const linkElement = screen.getByText('Fund Wallet');
const linkElement = screen.getByText('Fund wallet');
fireEvent.click(linkElement);

const expectedLeft = (1024 - width) / 2;
const expectedTop = (768 - height) / 2;
expect(mockOpen).toHaveBeenCalledWith(

Check failure on line 85 in src/wallet/components/WalletDropdownFundLink.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

src/wallet/components/WalletDropdownFundLink.test.tsx > WalletDropdownFundLink > opens a new window when clicked with type="window" and windowSize="s"

AssertionError: expected "spy" to be called with arguments: [ StringContaining{…}, …(2) ] Received: 1st spy call: Array [ - StringContaining "http://keys.coinbase.com/funding", - "Coinbase Fund wallet", - StringContaining "width=400,height=500,resizable,scrollbars=yes,status=1,left=312,top=134", + "http://keys.coinbase.com/funding?dappName=&dappUrl=http://localhost:3000/&onchainkit=0.28.7", + "Coinbase Fund Wallet", + "width=400,height=500,resizable,scrollbars=yes,status=1,left=312,top=134", ] Number of calls: 1 ❯ src/wallet/components/WalletDropdownFundLink.test.tsx:85:24

Check failure on line 85 in src/wallet/components/WalletDropdownFundLink.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

src/wallet/components/WalletDropdownFundLink.test.tsx > WalletDropdownFundLink > opens a new window when clicked with type="window" and windowSize="m"

AssertionError: expected "spy" to be called with arguments: [ StringContaining{…}, …(2) ] Received: 1st spy call: Array [ - StringContaining "http://keys.coinbase.com/funding", - "Coinbase Fund wallet", - StringContaining "width=600,height=700,resizable,scrollbars=yes,status=1,left=212,top=34", + "http://keys.coinbase.com/funding?dappName=&dappUrl=http://localhost:3000/&onchainkit=0.28.7", + "Coinbase Fund Wallet", + "width=600,height=700,resizable,scrollbars=yes,status=1,left=212,top=34", ] Number of calls: 1 ❯ src/wallet/components/WalletDropdownFundLink.test.tsx:85:24

Check failure on line 85 in src/wallet/components/WalletDropdownFundLink.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

src/wallet/components/WalletDropdownFundLink.test.tsx > WalletDropdownFundLink > opens a new window when clicked with type="window" and windowSize="l"

AssertionError: expected "spy" to be called with arguments: [ StringContaining{…}, …(2) ] Received: 1st spy call: Array [ - StringContaining "http://keys.coinbase.com/funding", - "Coinbase Fund wallet", - StringContaining "width=800,height=900,resizable,scrollbars=yes,status=1,left=112,top=-66", + "http://keys.coinbase.com/funding?dappName=&dappUrl=http://localhost:3000/&onchainkit=0.28.7", + "Coinbase Fund Wallet", + "width=800,height=900,resizable,scrollbars=yes,status=1,left=112,top=-66", ] Number of calls: 1 ❯ src/wallet/components/WalletDropdownFundLink.test.tsx:85:24
expect.stringContaining('http://keys.coinbase.com/funding'),
'Coinbase Fund Wallet',
'Coinbase Fund wallet',
expect.stringContaining(
`width=${width},height=${height},resizable,scrollbars=yes,status=1,left=${expectedLeft},top=${expectedTop}`,
),
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/components/WalletDropdownFundLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function WalletDropdownFundLink({
rel,
openIn = 'tab',
target,
text = 'Fund Wallet',
text = 'Fund wallet',
windowSize = 'm',
}: WalletDropdownFundLinkReact) {
const iconSvg = useMemo(() => {
Expand Down

0 comments on commit de32e23

Please sign in to comment.