diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 08:17:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 08:17:02 +0000 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /spec/frontend/members/components/table/members_table_spec.js | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) | |
download | gitlab-ce-b39512ed755239198a9c294b6a45e65c05900235.tar.gz |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'spec/frontend/members/components/table/members_table_spec.js')
-rw-r--r-- | spec/frontend/members/components/table/members_table_spec.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/spec/frontend/members/components/table/members_table_spec.js b/spec/frontend/members/components/table/members_table_spec.js index 08baa663bf0..0ed01396fcb 100644 --- a/spec/frontend/members/components/table/members_table_spec.js +++ b/spec/frontend/members/components/table/members_table_spec.js @@ -81,13 +81,13 @@ describe('MembersTable', () => { const url = 'https://localhost/foo-bar/-/project_members?tab=invited'; - const findTable = () => wrapper.find(GlTable); + const findTable = () => wrapper.findComponent(GlTable); const findTableCellByMemberId = (tableCellLabel, memberId) => wrapper .findByTestId(`members-table-row-${memberId}`) .find(`[data-label="${tableCellLabel}"][role="cell"]`); - const findPagination = () => extendedWrapper(wrapper.find(GlPagination)); + const findPagination = () => extendedWrapper(wrapper.findComponent(GlPagination)); const expectCorrectLinkToPage2 = () => { expect(findPagination().findByText('2', { selector: 'a' }).attributes('href')).toBe( @@ -126,7 +126,10 @@ describe('MembersTable', () => { if (expectedComponent) { expect( - wrapper.find(`[data-label="${label}"][role="cell"]`).find(expectedComponent).exists(), + wrapper + .find(`[data-label="${label}"][role="cell"]`) + .findComponent(expectedComponent) + .exists(), ).toBe(true); } }); @@ -179,7 +182,10 @@ describe('MembersTable', () => { expect(actionField.exists()).toBe(true); expect(actionField.classes('gl-sr-only')).toBe(true); expect( - wrapper.find(`[data-label="Actions"][role="cell"]`).find(MemberActionButtons).exists(), + wrapper + .find(`[data-label="Actions"][role="cell"]`) + .findComponent(MemberActionButtons) + .exists(), ).toBe(true); }); @@ -250,9 +256,9 @@ describe('MembersTable', () => { it('renders badge in "Max role" field', () => { createComponent({ members: [memberMock], tableFields: ['maxRole'] }); - expect(wrapper.find(`[data-label="Max role"][role="cell"]`).find(GlBadge).text()).toBe( - memberMock.accessLevel.stringValue, - ); + expect( + wrapper.find(`[data-label="Max role"][role="cell"]`).findComponent(GlBadge).text(), + ).toBe(memberMock.accessLevel.stringValue); }); }); |