Skip to content

Commit

Permalink
Update ci.yml (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-shkaralevich authored Apr 19, 2024
1 parent a468ff7 commit f167a29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ jobs:
jest:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [ 18.x, 20.x ]
runs-on: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
Expand Down
6 changes: 3 additions & 3 deletions ui/tests/app/(index)/_components/AfterLogin.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('AfterLogin', () => {

const expectAdministration = (isAdmin: boolean) => {
if (isAdmin) {
expect(screen.getByRole('img', {name: 'key-solid'})).toHaveAttribute('src', 'uhgroupings/key-solid.svg');
expect(screen.getByRole('img', {name: 'key-solid'})).toHaveAttribute('src', '/uhgroupings/key-solid.svg');
expect(screen.queryByText('0')).not.toBeInTheDocument();
expect(screen.getByRole('heading', {name: 'Admin'})).toBeInTheDocument();
expect(screen.getByText('Manage the list of Administrators for this service. ' +
Expand All @@ -56,7 +56,7 @@ describe('AfterLogin', () => {
};

const expectMemberships = () => {
expect(screen.getByRole('img', {name: 'id-card'})).toHaveAttribute('src', 'uhgroupings/id-card-solid.svg');
expect(screen.getByRole('img', {name: 'id-card'})).toHaveAttribute('src', '/uhgroupings/id-card-solid.svg');
expect(screen.getByText(numberOfMemberships)).toBeInTheDocument();
expect(screen.getByRole('heading', {name: 'Memberships'})).toBeInTheDocument();
expect(screen.getByText('View and manage my memberships. ' +
Expand All @@ -68,7 +68,7 @@ describe('AfterLogin', () => {
const expectGroupings = (isOwner: boolean) => {
if (isOwner) {
expect(screen.getByRole('img', {name: 'wrench-solid'}))
.toHaveAttribute('src', 'uhgroupings/wrench-solid.svg');
.toHaveAttribute('src', '/uhgroupings/wrench-solid.svg');
expect(screen.getByText(numberOfGroupings)).toBeInTheDocument();
expect(screen.getByRole('heading', {name: 'Groupings'})).toBeInTheDocument();
expect(screen.getByText('Review members, manage Include and Exclude lists, ' +
Expand Down
12 changes: 0 additions & 12 deletions ui/tests/setupJest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ import User from '@/access/User';
enableFetchMocks();
loadEnvConfig(process.cwd());

Object.defineProperty(window, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation(query => ({
matches: false,
media: query,
onchange: null,
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
})),
});

export const createMockSession = (user: User | undefined) => ({
user,
destroy: jest.fn(),
Expand Down

0 comments on commit f167a29

Please sign in to comment.