diff --git a/my-chords-tester/src/App.js b/my-chords-tester/src/App.js
index a89835210..ee1148cd6 100644
--- a/my-chords-tester/src/App.js
+++ b/my-chords-tester/src/App.js
@@ -4,6 +4,7 @@ import ChordBlock from '@tombatossals/react-chords/lib/Chord/ChordBlock'
import guitarChords from '@tombatossals/chords-db/lib/guitar.json';
import ukuleleChords from '@tombatossals/chords-db/lib/ukulele.json';
import pianoChords from '@tombatossals/chords-db/lib/piano.json';
+import cavaquinhoChords from '@tombatossals/chords-db/lib/cavaquinho.json';
import { addMidiToPosition } from '@tombatossals/react-chords/lib/Chord/midiUtils';
import './App.css';
@@ -46,6 +47,19 @@ const instruments = {
standard: []
}
}
+ },
+ cavaquinho: {
+ name: 'Cavaquinho',
+ chords: cavaquinhoChords,
+ config: {
+ strings: 4,
+ fretsOnChord: 4,
+ name: 'Cavaquinho',
+ keys: [],
+ tunings: {
+ standard: ['D', 'G', 'B', 'D']
+ }
+ }
}
};
diff --git a/my-chords-tester/src/App.test.js b/my-chords-tester/src/App.test.js
index 1f03afeec..5dd492d5e 100644
--- a/my-chords-tester/src/App.test.js
+++ b/my-chords-tester/src/App.test.js
@@ -1,8 +1,30 @@
import { render, screen } from '@testing-library/react';
import App from './App';
+import { BrowserRouter } from 'react-router-dom';
-test('renders learn react link', () => {
- render();
- const linkElement = screen.getByText(/learn react/i);
- expect(linkElement).toBeInTheDocument();
+describe('Cavaquinho Instrument Support', () => {
+ test('renders all instruments including cavaquinho', () => {
+ render(
+
+
+
+ );
+
+ expect(screen.getByText('Guitar')).toBeInTheDocument();
+ expect(screen.getByText('Ukulele')).toBeInTheDocument();
+ expect(screen.getByText('Piano')).toBeInTheDocument();
+ expect(screen.getByText('Cavaquinho')).toBeInTheDocument();
+ });
+
+ test('cavaquinho is navigable', () => {
+ render(
+
+
+
+ );
+
+ const cavaquinhoLink = screen.getByText('Cavaquinho');
+ expect(cavaquinhoLink).toBeInTheDocument();
+ expect(cavaquinhoLink.closest('a')).toHaveAttribute('href', '/cavaquinho');
+ });
});