import React from 'react';
import { render, screen } from '@testing-library/react';

// Mock windowsSlice to avoid import.meta.url (Web Worker) compile error in ts-jest
jest.mock('../store/windowsSlice', () => ({
  selectWindows: () => ({}),
  windowsSlice: { reducer: (s = {}) => s },
}));

import Options from './Options';

it('should load and display Options', async () => {
  render(<Options />);

  expect(
    screen.getByText((content, element) => {
      return element !== null && element.tagName.toLowerCase() === 'h1' && content === 'Tabvana Options';
    })
  ).toBeInTheDocument();
});
