Skip to content

Commit

Permalink
Fix typo - data-test-id -> data-testid
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Sep 8, 2024
1 parent 6f9213d commit 4e10741
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ exports[`Album view container should display an album 1`] = `
>
<div
class="text_header centered"
data-testid="position-header"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -214,7 +215,7 @@ exports[`Album view container should display an album 1`] = `
</div>
<div
class="track_table_header_spacer"
data-test-id="track-table-header-spacer"
data-testid="track-table-header-spacer"
/>
</div>
</div>
Expand All @@ -236,7 +237,7 @@ exports[`Album view container should display an album 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="0"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 0px; height: 42px; width: 100%; grid-template-columns: 4em 3em minmax(8em, 1fr) 6em 6em;"
tabindex="0"
Expand Down Expand Up @@ -343,7 +344,7 @@ exports[`Album view container should display an album 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="1"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 42px; height: 42px; width: 100%; grid-template-columns: 4em 3em minmax(8em, 1fr) 6em 6em;"
tabindex="1"
Expand Down Expand Up @@ -450,7 +451,7 @@ exports[`Album view container should display an album 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="2"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 84px; height: 42px; width: 100%; grid-template-columns: 4em 3em minmax(8em, 1fr) 6em 6em;"
tabindex="2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ exports[`Artist view container should display an artist 1`] = `
</div>
<div
class="track_table_header_spacer"
data-test-id="track-table-header-spacer"
data-testid="track-table-header-spacer"
/>
</div>
</div>
Expand All @@ -220,7 +220,7 @@ exports[`Artist view container should display an artist 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="2"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 0px; height: 42px; width: 100%; grid-template-columns: 3em 3em minmax(8em, 1fr) 1fr 6em;"
tabindex="2"
Expand Down Expand Up @@ -311,7 +311,7 @@ exports[`Artist view container should display an artist 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="1"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 42px; height: 42px; width: 100%; grid-template-columns: 3em 3em minmax(8em, 1fr) 1fr 6em;"
tabindex="1"
Expand Down Expand Up @@ -402,7 +402,7 @@ exports[`Artist view container should display an artist 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="0"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 84px; height: 42px; width: 100%; grid-template-columns: 3em 3em minmax(8em, 1fr) 1fr 6em;"
tabindex="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ exports[`Dashboard container should display top tracks after going to top tracks
>
<div
class="text_header centered"
data-testid="position-header"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -686,7 +687,7 @@ exports[`Dashboard container should display top tracks after going to top tracks
</div>
<div
class="track_table_header_spacer"
data-test-id="track-table-header-spacer"
data-testid="track-table-header-spacer"
/>
</div>
</div>
Expand All @@ -708,7 +709,7 @@ exports[`Dashboard container should display top tracks after going to top tracks
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="0"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 0px; height: 42px; width: 100%; grid-template-columns: 4em 3em 3em minmax(8em, 1fr) 1fr 6em 6em;"
tabindex="0"
Expand Down Expand Up @@ -830,7 +831,7 @@ exports[`Dashboard container should display top tracks after going to top tracks
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="1"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 42px; height: 42px; width: 100%; grid-template-columns: 4em 3em 3em minmax(8em, 1fr) 1fr 6em 6em;"
tabindex="1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ exports[`Deezer playlist adapter should display a Deezer playlist 1`] = `
>
<div
class="text_header centered"
data-testid="position-header"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -216,7 +217,7 @@ exports[`Deezer playlist adapter should display a Deezer playlist 1`] = `
</div>
<div
class="track_table_header_spacer"
data-test-id="track-table-header-spacer"
data-testid="track-table-header-spacer"
/>
</div>
</div>
Expand All @@ -238,7 +239,7 @@ exports[`Deezer playlist adapter should display a Deezer playlist 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="1"
data-rbd-draggable-id="0"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 0px; height: 42px; width: 100%; grid-template-columns: 4em 3em 3em minmax(8em, 1fr) 1fr 6em;"
tabindex="0"
Expand Down Expand Up @@ -354,7 +355,7 @@ exports[`Deezer playlist adapter should display a Deezer playlist 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="1"
data-rbd-draggable-id="1"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 42px; height: 42px; width: 100%; grid-template-columns: 4em 3em 3em minmax(8em, 1fr) 1fr 6em;"
tabindex="1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@

import React from 'react';
import { render, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { createMemoryHistory } from 'history';
import _, { pick } from 'lodash';

import { Track } from '@nuclear/core';

import { buildStoreState } from '../../../test/storeBuilders';
import { AnyProps, configureMockStore, setupI18Next, TestRouterProvider, TestStoreProvider, uuidRegex } from '../../../test/testUtils';
import MainContentContainer from '../MainContentContainer';
import PlayerBarContainer from '../PlayerBarContainer';
import { Track } from '@nuclear/core';
import userEvent from '@testing-library/user-event';

const updateStore = (key: string, value: object) => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ exports[`Favorite tracks view container should display favorite tracks 1`] = `
>
<div
class="text_header centered"
data-testid="position-header"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -330,7 +331,7 @@ exports[`Favorite tracks view container should display favorite tracks 1`] = `
</div>
<div
class="track_table_header_spacer"
data-test-id="track-table-header-spacer"
data-testid="track-table-header-spacer"
/>
</div>
</div>
Expand All @@ -352,7 +353,7 @@ exports[`Favorite tracks view container should display favorite tracks 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="1"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 0px; height: 42px; width: 100%; grid-template-columns: 3em 4em 3em minmax(8em, 1fr) 1fr 6em;"
tabindex="1"
Expand Down Expand Up @@ -468,7 +469,7 @@ exports[`Favorite tracks view container should display favorite tracks 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="0"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 42px; height: 42px; width: 100%; grid-template-columns: 3em 4em 3em minmax(8em, 1fr) 1fr 6em;"
tabindex="0"
Expand Down Expand Up @@ -823,6 +824,7 @@ exports[`Favorite tracks view container should show a popup when a track is clic
>
<div
class="text_header centered"
data-testid="position-header"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -902,7 +904,7 @@ exports[`Favorite tracks view container should show a popup when a track is clic
</div>
<div
class="track_table_header_spacer"
data-test-id="track-table-header-spacer"
data-testid="track-table-header-spacer"
/>
</div>
</div>
Expand All @@ -924,7 +926,7 @@ exports[`Favorite tracks view container should show a popup when a track is clic
class="grid_track_table_row"
data-rbd-draggable-context-id="2"
data-rbd-draggable-id="1"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 0px; height: 42px; width: 100%; grid-template-columns: 3em 4em 3em minmax(8em, 1fr) 1fr 6em;"
tabindex="1"
Expand Down Expand Up @@ -1040,7 +1042,7 @@ exports[`Favorite tracks view container should show a popup when a track is clic
class="grid_track_table_row"
data-rbd-draggable-context-id="2"
data-rbd-draggable-id="0"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 42px; height: 42px; width: 100%; grid-template-columns: 3em 4em 3em minmax(8em, 1fr) 1fr 6em;"
tabindex="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@ exports[`Library view container should display local library in simple list mode
>
<div
class="text_header centered"
data-testid="position-header"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -953,7 +954,7 @@ exports[`Library view container should display local library in simple list mode
</div>
<div
class="track_table_header_spacer"
data-test-id="track-table-header-spacer"
data-testid="track-table-header-spacer"
/>
</div>
</div>
Expand All @@ -975,7 +976,7 @@ exports[`Library view container should display local library in simple list mode
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="0"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 0px; height: 42px; width: 100%; grid-template-columns: 4em 3em minmax(8em, 1fr) 1fr 1fr 6em 6em;"
tabindex="0"
Expand Down Expand Up @@ -1088,7 +1089,7 @@ exports[`Library view container should display local library in simple list mode
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="1"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 42px; height: 42px; width: 100%; grid-template-columns: 4em 3em minmax(8em, 1fr) 1fr 1fr 6em 6em;"
tabindex="1"
Expand Down Expand Up @@ -1201,7 +1202,7 @@ exports[`Library view container should display local library in simple list mode
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="2"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 84px; height: 42px; width: 100%; grid-template-columns: 4em 3em minmax(8em, 1fr) 1fr 1fr 6em 6em;"
tabindex="2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/ban-ts-comment */
import { fireEvent, render, waitFor, within } from '@testing-library/react';
import { fireEvent, prettyDOM, render, waitFor, within } from '@testing-library/react';
import React from 'react';
import { createMemoryHistory } from 'history';
import { store as electronStore } from '@nuclear/core';
Expand Down Expand Up @@ -313,6 +313,7 @@ describe('Playlist view container - utils', () => {
};
reorder = onReorder(playlist, updatePlaylist);
});

it('should reorder tracks correctly (1)', () => {
reorder(0, 2);
expect(newPlaylist).toEqual({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ exports[`Playlist view container should display a playlist 1`] = `
>
<div
class="text_header centered"
data-testid="position-header"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -226,7 +227,7 @@ exports[`Playlist view container should display a playlist 1`] = `
</div>
<div
class="track_table_header_spacer"
data-test-id="track-table-header-spacer"
data-testid="track-table-header-spacer"
/>
</div>
</div>
Expand All @@ -251,7 +252,7 @@ exports[`Playlist view container should display a playlist 1`] = `
data-rbd-drag-handle-draggable-id="0"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="0"
data-test-id="track-table-row"
data-testid="track-table-row"
draggable="false"
role="button"
style="position: absolute; left: 0px; top: 0px; height: 42px; width: 100%; grid-template-columns: 3em 4em 3em 3em minmax(8em, 1fr) 1fr 6em;"
Expand Down Expand Up @@ -386,7 +387,7 @@ exports[`Playlist view container should display a playlist 1`] = `
data-rbd-drag-handle-draggable-id="1"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="1"
data-test-id="track-table-row"
data-testid="track-table-row"
draggable="false"
role="button"
style="position: absolute; left: 0px; top: 42px; height: 42px; width: 100%; grid-template-columns: 3em 4em 3em 3em minmax(8em, 1fr) 1fr 6em;"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ exports[`Spotfiy playlist adapter should display a Spotify playlist 1`] = `
>
<div
class="text_header centered"
data-testid="position-header"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -229,7 +230,7 @@ exports[`Spotfiy playlist adapter should display a Spotify playlist 1`] = `
</div>
<div
class="track_table_header_spacer"
data-test-id="track-table-header-spacer"
data-testid="track-table-header-spacer"
/>
</div>
</div>
Expand All @@ -251,7 +252,7 @@ exports[`Spotfiy playlist adapter should display a Spotify playlist 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="0"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 0px; height: 42px; width: 100%; grid-template-columns: 4em 3em 3em minmax(8em, 1fr) 1fr 6em 6em;"
tabindex="0"
Expand Down Expand Up @@ -373,7 +374,7 @@ exports[`Spotfiy playlist adapter should display a Spotify playlist 1`] = `
class="grid_track_table_row"
data-rbd-draggable-context-id="0"
data-rbd-draggable-id="1"
data-test-id="track-table-row"
data-testid="track-table-row"
role="row"
style="position: absolute; left: 0px; top: 42px; height: 42px; width: 100%; grid-template-columns: 4em 3em 3em minmax(8em, 1fr) 1fr 6em 6em;"
tabindex="1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const GridTrackTableRow = memo(<T extends Track>({ index, style, data }:
{
(draggableProvided, draggableSnapshot) => (
<div
data-test-id='track-table-row'
data-testid='track-table-row'
className={cx(
styles.grid_track_table_row,
{ [styles.is_dragging]: draggableSnapshot.isDragging }
Expand Down
Loading

0 comments on commit 4e10741

Please sign in to comment.