Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
1cbef2272b
commit
cc5762bc54
4
Gemfile
4
Gemfile
|
|
@ -89,7 +89,7 @@ gem 'doorkeeper', '~> 5.6', '>= 5.6.6' # rubocop:todo Gemfile/MissingFeatureCate
|
|||
gem 'doorkeeper-openid_connect', '~> 1.8', '>= 1.8.7' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'doorkeeper-device_authorization_grant', '~> 1.0.0', feature_category: :system_access
|
||||
gem 'rexml', '~> 3.3.2' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'ruby-saml', '~> 1.15.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'ruby-saml', '~> 1.17.0', feature_category: :system_access
|
||||
gem 'omniauth', '~> 2.1.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'omniauth-auth0', '~> 3.1' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'omniauth-azure-activedirectory-v2', '~> 2.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
|
|
@ -98,7 +98,7 @@ gem 'omniauth-github', '2.0.1' # rubocop:todo Gemfile/MissingFeatureCategory
|
|||
gem 'omniauth-gitlab', '~> 4.0.0', path: 'vendor/gems/omniauth-gitlab' # See vendor/gems/omniauth-gitlab/README.md # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'omniauth-google-oauth2', '~> 1.1' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'omniauth-oauth2-generic', '~> 0.2.2' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'omniauth-saml', '~> 2.1.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'omniauth-saml', '~> 2.2.1', feature_category: :system_access
|
||||
gem 'omniauth-shibboleth-redux', '~> 2.0', require: 'omniauth-shibboleth' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'omniauth_crowd', '~> 2.4.0', path: 'vendor/gems/omniauth_crowd' # See vendor/gems/omniauth_crowd/README.md # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
gem 'omniauth_openid_connect', '~> 0.8.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@
|
|||
{"name":"omniauth-google-oauth2","version":"1.1.1","platform":"ruby","checksum":"4496f126e84eaf760f9c6a5c69e5e7511f98092d7f25ad79fd2c0ae5e09b5039"},
|
||||
{"name":"omniauth-oauth2","version":"1.8.0","platform":"ruby","checksum":"b2f8e9559cc7e2d4efba57607691d6d2b634b879fc5b5b6ccfefa3da85089e78"},
|
||||
{"name":"omniauth-oauth2-generic","version":"0.2.8","platform":"ruby","checksum":"ce6e8539019d5ebf2f48867072b9f248f148bb4cbe7166dee655865abfae7613"},
|
||||
{"name":"omniauth-saml","version":"2.1.0","platform":"ruby","checksum":"969cb7ba271891d09dfa57b206fc274f43203c52727492517decda93decc6906"},
|
||||
{"name":"omniauth-saml","version":"2.2.1","platform":"ruby","checksum":"8abb6bf8d38a50f52c7cc905d32877c7b2c79dbc9c225fcc3d3e56723411d602"},
|
||||
{"name":"omniauth-shibboleth-redux","version":"2.0.0","platform":"ruby","checksum":"e9b353fd103405fcc8549e8510b9cad857acf0b286d764fac5dba8a93ab8ffe1"},
|
||||
{"name":"omniauth_openid_connect","version":"0.8.0","platform":"ruby","checksum":"1f2f3890386e2a742221cee0d2e903b78d874e6fab9ea3bfa31c1462f4793d25"},
|
||||
{"name":"open4","version":"1.3.4","platform":"ruby","checksum":"a1df037310624ecc1ea1d81264b11c83e96d0c3c1c6043108d37d396dcd0f4b1"},
|
||||
|
|
@ -612,7 +612,7 @@
|
|||
{"name":"ruby-magic","version":"0.6.0","platform":"ruby","checksum":"7b2138877b7d23aff812c95564eba6473b74b815ef85beb0eb792e729a2b6101"},
|
||||
{"name":"ruby-openai","version":"3.7.0","platform":"ruby","checksum":"fb735d4c055e282ade264cab9864944c05a8a10e0cddd45a0551e8a9851b1850"},
|
||||
{"name":"ruby-progressbar","version":"1.11.0","platform":"ruby","checksum":"cc127db3866dc414ffccbf92928a241e585b3aa2b758a5563e74a6ee0f57d50a"},
|
||||
{"name":"ruby-saml","version":"1.15.0","platform":"ruby","checksum":"3a9dda2b448310f4f90d5cf0967d4b668530fa7994d2a4d9cbfdfa62e35f76a3"},
|
||||
{"name":"ruby-saml","version":"1.17.0","platform":"ruby","checksum":"0419839ba3312d255e35fe3cc7ae155e4a241fd468796caebcf61164aa01b8a9"},
|
||||
{"name":"ruby-statistics","version":"3.0.0","platform":"ruby","checksum":"610301370346931cb701e3a8d3d3e28eb65681162cae6066c0c11abf20efdc81"},
|
||||
{"name":"ruby2_keywords","version":"0.0.5","platform":"ruby","checksum":"ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef"},
|
||||
{"name":"ruby_parser","version":"3.21.0","platform":"ruby","checksum":"3842893d2f4602dcd93c0a79d77f9ce8e1ce197d41ac533d8e25c684f8f1c56b"},
|
||||
|
|
|
|||
12
Gemfile.lock
12
Gemfile.lock
|
|
@ -1236,9 +1236,9 @@ GEM
|
|||
omniauth-oauth2-generic (0.2.8)
|
||||
omniauth-oauth2 (~> 1.0)
|
||||
rake
|
||||
omniauth-saml (2.1.0)
|
||||
omniauth (~> 2.0)
|
||||
ruby-saml (~> 1.12)
|
||||
omniauth-saml (2.2.1)
|
||||
omniauth (~> 2.1)
|
||||
ruby-saml (~> 1.17)
|
||||
omniauth-shibboleth-redux (2.0.0)
|
||||
omniauth (>= 2.0.0)
|
||||
omniauth_openid_connect (0.8.0)
|
||||
|
|
@ -1661,7 +1661,7 @@ GEM
|
|||
ruby-openai (3.7.0)
|
||||
httparty (>= 0.18.1)
|
||||
ruby-progressbar (1.11.0)
|
||||
ruby-saml (1.15.0)
|
||||
ruby-saml (1.17.0)
|
||||
nokogiri (>= 1.13.10)
|
||||
rexml
|
||||
ruby-statistics (3.0.0)
|
||||
|
|
@ -2173,7 +2173,7 @@ DEPENDENCIES
|
|||
omniauth-google-oauth2 (~> 1.1)
|
||||
omniauth-oauth2-generic (~> 0.2.2)
|
||||
omniauth-salesforce (~> 1.0.5)!
|
||||
omniauth-saml (~> 2.1.0)
|
||||
omniauth-saml (~> 2.2.1)
|
||||
omniauth-shibboleth-redux (~> 2.0)
|
||||
omniauth_crowd (~> 2.4.0)!
|
||||
omniauth_openid_connect (~> 0.8.0)
|
||||
|
|
@ -2257,7 +2257,7 @@ DEPENDENCIES
|
|||
ruby-magic (~> 0.6)
|
||||
ruby-openai (~> 3.7)
|
||||
ruby-progressbar (~> 1.10)
|
||||
ruby-saml (~> 1.15.0)
|
||||
ruby-saml (~> 1.17.0)
|
||||
rubyzip (~> 2.3.2)
|
||||
rugged (~> 1.6)
|
||||
sanitize (~> 6.0.2)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ With the GitLab spoke in ServiceNow, you can automate actions for GitLab
|
|||
projects, groups, users, issues, merge requests, branches, and repositories.
|
||||
|
||||
For a full list of features, see the
|
||||
[GitLab spoke documentation](https://docs.servicenow.com/bundle/tokyo-application-development/page/administer/integrationhub-store-spokes/concept/gitlab-spoke.html).
|
||||
[GitLab spoke documentation (Xanadu Release)](https://docs.servicenow.com/bundle/xanadu-integrate-applications/page/administer/integrationhub-store-spokes/concept/gitlab-spoke.html).
|
||||
|
||||
You must [configure GitLab as an OAuth2 authentication service provider](../../integration/oauth_provider.md),
|
||||
which involves creating an application and then providing the Application ID
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ describe('ReportedContent', () => {
|
|||
});
|
||||
|
||||
it('contains an image with the screenshot', () => {
|
||||
expect(findModal().find('img').attributes('src')).toBe(report.screenshot);
|
||||
expect(findModal().find('img').element.src).toBe(report.screenshot);
|
||||
expect(findModal().find('img').attributes('alt')).toBe(
|
||||
REPORTED_CONTENT_I18N.screenshotTitle,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -69,6 +69,6 @@ describe('Badge component', () => {
|
|||
|
||||
await reloadButton.trigger('click');
|
||||
|
||||
expect(badgeImage.attributes('src')).toBe(`${dummyProps.imageUrl}#retries=1`);
|
||||
expect(badgeImage.element.src).toBe(`${dummyProps.imageUrl}#retries=1`);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -58,8 +58,15 @@ describe('Design management list item component', () => {
|
|||
it('image is not rendered', () => {
|
||||
createComponent();
|
||||
|
||||
const image = wrapper.find('img');
|
||||
expect(image.attributes('src')).toBe('');
|
||||
const imageSrc = wrapper.find('img').element.src;
|
||||
|
||||
/**
|
||||
* Test for <img> tag source handling.
|
||||
* When running this spec in Vue 3 mode, the src attribute
|
||||
* of the image element is null. While in browser `img.src` would
|
||||
* be an empty string, in `jsdom` it can be `null`.
|
||||
*/
|
||||
expect(imageSrc === '' || imageSrc === null).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -93,7 +100,7 @@ describe('Design management list item component', () => {
|
|||
});
|
||||
|
||||
it('renders an image', () => {
|
||||
expect(image.attributes('src')).toBe('http://via.placeholder.com/300');
|
||||
expect(image.element.src).toBe('http://via.placeholder.com/300');
|
||||
expect(image.isVisible()).toBe(true);
|
||||
});
|
||||
|
||||
|
|
@ -110,7 +117,7 @@ describe('Design management list item component', () => {
|
|||
wrapper.setProps({ imageV432x230: mockSrc });
|
||||
|
||||
await nextTick();
|
||||
expect(image.attributes('src')).toBe(mockSrc);
|
||||
expect(image.element.src).toBe(mockSrc);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ describe('SubgroupsAndProjectsEmptyState', () => {
|
|||
createComponent();
|
||||
|
||||
expect(findNewSubgroupLink().attributes('href')).toBe(defaultProvide.newSubgroupPath);
|
||||
expect(findNewSubgroupIllustration().attributes('src')).toBe(
|
||||
expect(findNewSubgroupIllustration().element.src).toBe(
|
||||
defaultProvide.newSubgroupIllustration,
|
||||
);
|
||||
});
|
||||
|
|
@ -55,9 +55,7 @@ describe('SubgroupsAndProjectsEmptyState', () => {
|
|||
createComponent();
|
||||
|
||||
expect(findNewProjectLink().attributes('href')).toBe(defaultProvide.newProjectPath);
|
||||
expect(findNewProjectIllustration().attributes('src')).toBe(
|
||||
defaultProvide.newProjectIllustration,
|
||||
);
|
||||
expect(findNewProjectIllustration().element.src).toBe(defaultProvide.newProjectIllustration);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ describe('IDE TerminalEmptyState', () => {
|
|||
const img = wrapper.find('.svg-content img');
|
||||
|
||||
expect(img.exists()).toBe(true);
|
||||
expect(img.attributes('src')).toBe(TEST_PATH);
|
||||
expect(img.element.src).toBe(TEST_PATH);
|
||||
});
|
||||
|
||||
it('when loading, shows loading icon', () => {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ describe('App component', () => {
|
|||
});
|
||||
|
||||
it('displays the correct svg illustration', () => {
|
||||
expect(wrapper.find('img').attributes('src')).toBe('illustrations/project-create-new-sm.svg');
|
||||
expect(wrapper.find('img').element.src).toBe('illustrations/project-create-new-sm.svg');
|
||||
});
|
||||
|
||||
it('renders ForkForm component', () => {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ describe('Image Viewer', () => {
|
|||
createComponent(blobData);
|
||||
|
||||
expect(findImage().exists()).toBe(true);
|
||||
expect(findImage().attributes('src')).toBe(externalStorageUrl);
|
||||
expect(findImage().element.src).toBe(externalStorageUrl);
|
||||
expect(findImage().attributes('alt')).toBe(DEFAULT_BLOB_DATA.name);
|
||||
});
|
||||
});
|
||||
|
|
@ -34,7 +34,7 @@ describe('Image Viewer', () => {
|
|||
createComponent(DEFAULT_BLOB_DATA);
|
||||
|
||||
expect(findImage().exists()).toBe(true);
|
||||
expect(findImage().attributes('src')).toBe(DEFAULT_BLOB_DATA.rawPath);
|
||||
expect(findImage().element.src).toBe(DEFAULT_BLOB_DATA.rawPath);
|
||||
expect(findImage().attributes('alt')).toBe(DEFAULT_BLOB_DATA.name);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -65,6 +65,6 @@ describe('AssigneeAvatar', () => {
|
|||
},
|
||||
});
|
||||
|
||||
expect(findImg().attributes('src')).toEqual(expected);
|
||||
expect(findImg().element.src).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ describe('Assignee component', () => {
|
|||
const assignee = collapsedChildren.at(0);
|
||||
|
||||
expect(collapsedChildren.length).toBe(1);
|
||||
expect(assignee.find('.avatar').attributes('src')).toBe(UsersMock.user.avatar);
|
||||
expect(assignee.find('.avatar').element.src).toBe(UsersMock.user.avatar);
|
||||
expect(assignee.find('.avatar').attributes('alt')).toBe(`${UsersMock.user.name}'s avatar`);
|
||||
|
||||
expect(trimText(assignee.find('.author').text())).toBe(UsersMock.user.name);
|
||||
|
|
@ -100,14 +100,14 @@ describe('Assignee component', () => {
|
|||
|
||||
const first = collapsedChildren.at(0);
|
||||
|
||||
expect(first.find('.avatar').attributes('src')).toBe(users[0].avatar_url);
|
||||
expect(first.find('.avatar').element.src).toBe(users[0].avatar_url);
|
||||
expect(first.find('.avatar').attributes('alt')).toBe(`${users[0].name}'s avatar`);
|
||||
|
||||
expect(trimText(first.find('.author').text())).toBe(users[0].name);
|
||||
|
||||
const second = collapsedChildren.at(1);
|
||||
|
||||
expect(second.find('.avatar').attributes('src')).toBe(users[1].avatar_url);
|
||||
expect(second.find('.avatar').element.src).toBe(users[1].avatar_url);
|
||||
expect(second.find('.avatar').attributes('alt')).toBe(`${users[1].name}'s avatar`);
|
||||
|
||||
expect(trimText(second.find('.author').text())).toBe(users[1].name);
|
||||
|
|
@ -126,7 +126,7 @@ describe('Assignee component', () => {
|
|||
|
||||
const first = collapsedChildren.at(0);
|
||||
|
||||
expect(first.find('.avatar').attributes('src')).toBe(users[0].avatar_url);
|
||||
expect(first.find('.avatar').element.src).toBe(users[0].avatar_url);
|
||||
expect(first.find('.avatar').attributes('alt')).toBe(`${users[0].name}'s avatar`);
|
||||
|
||||
expect(trimText(first.find('.author').text())).toBe(users[0].name);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ describe('Brand Logo component', () => {
|
|||
it('renders it', () => {
|
||||
createWrapper();
|
||||
expect(findBrandLogo().exists()).toBe(true);
|
||||
expect(findBrandLogo().attributes('src')).toBe(defaultPropsData.logoUrl);
|
||||
expect(findBrandLogo().element.src).toBe(defaultPropsData.logoUrl);
|
||||
});
|
||||
|
||||
it('when logoUrl given empty', () => {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ describe('MrWidgetAuthor', () => {
|
|||
});
|
||||
|
||||
it('renders image with avatar url', () => {
|
||||
expect(wrapper.find('img').attributes('src')).toBe(
|
||||
expect(wrapper.find('img').element.src).toBe(
|
||||
'http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
|
||||
);
|
||||
});
|
||||
|
|
@ -52,7 +52,7 @@ describe('MrWidgetAuthor', () => {
|
|||
|
||||
await nextTick();
|
||||
|
||||
expect(wrapper.find('img').attributes('src')).toBe('no_avatar.png');
|
||||
expect(wrapper.find('img').element.src).toBe('no_avatar.png');
|
||||
});
|
||||
|
||||
it('renders author name', () => {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ describe('MRWidgetSuggestPipeline', () => {
|
|||
const image = wrapper.find('[data-testid="pipeline-image"]');
|
||||
|
||||
expect(image.exists()).toBe(true);
|
||||
expect(image.attributes().src).toBe(suggestProps.pipelineSvgPath);
|
||||
expect(image.element.src).toBe(suggestProps.pipelineSvgPath);
|
||||
});
|
||||
|
||||
describe('tracking', () => {
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ describe('Alert Details Sidebar Assignees', () => {
|
|||
props: { alert: mockAlerts[1] },
|
||||
});
|
||||
|
||||
expect(findAssigned().find('img').attributes('src')).toBe('/url');
|
||||
expect(findAssigned().find('img').element.src).toBe('/url');
|
||||
expect(findAssigned().find('.dropdown-menu-user-full-name').text()).toBe('root');
|
||||
expect(findAssigned().find('.dropdown-menu-user-username').text()).toBe('@root');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ describe('Image Viewer', () => {
|
|||
propsData: { path: GREEN_BOX_IMAGE_URL, fileSize: 1024 },
|
||||
});
|
||||
|
||||
expect(wrapper.find('img').element).toHaveAttr('src', GREEN_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('img').element.src).toBe(GREEN_BOX_IMAGE_URL);
|
||||
});
|
||||
|
||||
describe('file sizes', () => {
|
||||
|
|
@ -29,7 +29,9 @@ describe('Image Viewer', () => {
|
|||
const imageInfo = wrapper.find('.image-info');
|
||||
|
||||
expect(imageInfo.exists()).toBe(elementExists);
|
||||
expect(imageInfo.element?.textContent.trim()).toBe(humanizedFileSize);
|
||||
if (imageInfo.exists()) {
|
||||
expect(imageInfo.element.textContent.trim()).toBe(humanizedFileSize);
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
|
@ -40,7 +42,7 @@ describe('Image Viewer', () => {
|
|||
propsData: { path: '/url/hello#1.jpg' },
|
||||
});
|
||||
|
||||
expect(wrapper.find('img').attributes('src')).toBe('/url/hello%231.jpg');
|
||||
expect(wrapper.find('img').element.src).toBe('/url/hello%231.jpg');
|
||||
});
|
||||
it('outputs path without transformations when outputting a Blob', () => {
|
||||
const file = new File([], DUMMY_IMAGE_BLOB_PATH);
|
||||
|
|
@ -48,7 +50,7 @@ describe('Image Viewer', () => {
|
|||
wrapper = shallowMount(ImageViewer, {
|
||||
propsData: { path },
|
||||
});
|
||||
expect(wrapper.find('img').attributes('src')).toBe(path);
|
||||
expect(wrapper.find('img').element.src).toBe(path);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ describe('DiffViewer', () => {
|
|||
|
||||
createComponent({ ...requiredProps, projectPath: '' });
|
||||
|
||||
expect(wrapper.find('.deleted img').attributes('src')).toBe(`//-/raw/DEF/${RED_BOX_IMAGE_URL}`);
|
||||
expect(wrapper.find('.added img').attributes('src')).toBe(`//-/raw/ABC/${GREEN_BOX_IMAGE_URL}`);
|
||||
expect(wrapper.find('.deleted img').element.src).toBe(`//-/raw/DEF/${RED_BOX_IMAGE_URL}`);
|
||||
expect(wrapper.find('.added img').element.src).toBe(`//-/raw/ABC/${GREEN_BOX_IMAGE_URL}`);
|
||||
});
|
||||
|
||||
it('renders fallback download diff display', () => {
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ describe('ImageDiffViewer component', () => {
|
|||
createComponent(allProps);
|
||||
const metaInfoElements = wrapper.findAll('.image-info');
|
||||
|
||||
expect(wrapper.find('.added img').attributes('src')).toBe(GREEN_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('.deleted img').attributes('src')).toBe(RED_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('.added img').element.src).toBe(GREEN_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('.deleted img').element.src).toBe(RED_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('.view-modes-menu li.active').text()).toBe('2-up');
|
||||
expect(wrapper.find('.view-modes-menu li:nth-child(2)').text()).toBe('Swipe');
|
||||
expect(wrapper.find('.view-modes-menu li:nth-child(3)').text()).toBe('Onion skin');
|
||||
|
|
@ -59,14 +59,14 @@ describe('ImageDiffViewer component', () => {
|
|||
it('renders image diff for new', () => {
|
||||
createComponent({ ...allProps, diffMode: 'new', oldPath: '' });
|
||||
|
||||
expect(wrapper.find('.added img').attributes('src')).toBe(GREEN_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('.added img').element.src).toBe(GREEN_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('.image-info').text()).toBe('1.00 KiB');
|
||||
});
|
||||
|
||||
it('renders image diff for deleted', () => {
|
||||
createComponent({ ...allProps, diffMode: 'deleted', newPath: '' });
|
||||
|
||||
expect(wrapper.find('.deleted img').attributes('src')).toBe(RED_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('.deleted img').element.src).toBe(RED_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('.image-info').text()).toBe('2.00 KiB');
|
||||
});
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ describe('ImageDiffViewer component', () => {
|
|||
{ 'image-overlay': '<span class="overlay">test</span>' },
|
||||
);
|
||||
|
||||
expect(wrapper.find('img').attributes('src')).toBe(GREEN_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('img').element.src).toBe(GREEN_BOX_IMAGE_URL);
|
||||
expect(wrapper.find('.overlay').exists()).toBe(true);
|
||||
expect(wrapper.find('.image-info').text()).toBe('2.00 KiB');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ describe('Welcome page', () => {
|
|||
},
|
||||
});
|
||||
|
||||
expect(wrapper.find('img').attributes('src')).toBe(mockImgSrc);
|
||||
expect(wrapper.find('img').element.src).toBe(mockImgSrc);
|
||||
});
|
||||
|
||||
it('renders footer slot if provided', () => {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ describe('Experimental new namespace creation app', () => {
|
|||
});
|
||||
|
||||
it('renders images', () => {
|
||||
expect(findImage().attributes('src')).toBe(DEFAULT_PROPS.panels[1].imageSrc);
|
||||
expect(findImage().element.src).toBe(DEFAULT_PROPS.panels[1].imageSrc);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ describe('Design item component', () => {
|
|||
const findEventIcon = () => findDesignEvent().findComponent(GlIcon);
|
||||
const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
|
||||
const findImage = () => wrapper.find('img');
|
||||
const findImageSrc = () => findImage().element.src;
|
||||
|
||||
function createComponent({
|
||||
notesCount = 0,
|
||||
|
|
@ -61,7 +62,15 @@ describe('Design item component', () => {
|
|||
it('image is not rendered', () => {
|
||||
createComponent();
|
||||
|
||||
expect(findImage().attributes('src')).toBe('');
|
||||
const imageSrc = findImageSrc();
|
||||
|
||||
/**
|
||||
* Test for <img> tag source handling.
|
||||
* When running this spec in Vue 3 mode, the src attribute
|
||||
* of the image element is null. While in browser `img.src` would
|
||||
* be an empty string, in `jsdom` it can be `null`.
|
||||
*/
|
||||
expect(imageSrc === '' || imageSrc === null).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -95,7 +104,7 @@ describe('Design item component', () => {
|
|||
});
|
||||
|
||||
it('renders an image', () => {
|
||||
expect(image.attributes('src')).toBe('http://via.placeholder.com/300');
|
||||
expect(findImageSrc()).toBe('http://via.placeholder.com/300');
|
||||
expect(image.isVisible()).toBe(true);
|
||||
});
|
||||
|
||||
|
|
@ -129,7 +138,7 @@ describe('Design item component', () => {
|
|||
});
|
||||
|
||||
it('renders imageV432x230 image', () => {
|
||||
expect(findImage().attributes('src')).toBe(mockSrc);
|
||||
expect(findImageSrc()).toBe(mockSrc);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue