Skip to content

Commit

Permalink
Preliminary fix tests. Tests are extened in a another PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
lupusA committed Mar 13, 2024
1 parent 9c97dc9 commit 4fcec02
Show file tree
Hide file tree
Showing 2 changed files with 1,053 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/tests/Preferences.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,16 @@ describe('Calling the preference page', () => {
})
})


/**
*
*/
describe('Select the light theme', () => {
test('Should select light theme', () => {
userEvent.selectOptions(
screen.getByTestId('themeSelector'),
screen.getByRole('option', { name: "light" }));

expect(screen.getByRole('option', { name: "light" }).selected).toBe(true)
screen.getByRole('option', { name: "theme.light" }));

expect(screen.getByRole('option', { name: "theme.light" }).selected).toBe(true)
expect(wrapper).toMatchSnapshot();
})
})
Expand All @@ -46,8 +44,8 @@ describe('Select the light theme', () => {
*/
describe('Test number of themes', () => {
test('Should have four themes', () => {
let theme = screen.getByRole('combobox', { name: "Theme" });
expect(theme).toHaveLength(4);
let selector = screen.getByTestId('themeSelector');
expect(selector).toHaveLength(4);
expect(wrapper).toMatchSnapshot();
})
})
Expand All @@ -57,8 +55,8 @@ describe('Test number of themes', () => {
*/
describe('Test byte representation', () => {
test('Should have two options', () => {
let theme = screen.getByRole('combobox', { name: "Byte representation" });
expect(theme).toHaveLength(2);
let selector = screen.getByTestId('bytesBaseInput');
expect(selector).toHaveLength(2);
expect(wrapper).toMatchSnapshot();
})
})
Loading

0 comments on commit 4fcec02

Please sign in to comment.