summaryrefslogtreecommitdiff
path: root/spec/frontend/packages/details/components
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/packages/details/components')
-rw-r--r--spec/frontend/packages/details/components/__snapshots__/package_title_spec.js.snap8
-rw-r--r--spec/frontend/packages/details/components/additional_metadata_spec.js4
-rw-r--r--spec/frontend/packages/details/components/conan_installation_spec.js12
-rw-r--r--spec/frontend/packages/details/components/maven_installation_spec.js18
-rw-r--r--spec/frontend/packages/details/components/npm_installation_spec.js24
-rw-r--r--spec/frontend/packages/details/components/nuget_installation_spec.js12
-rw-r--r--spec/frontend/packages/details/components/package_files_spec.js1
-rw-r--r--spec/frontend/packages/details/components/package_history_spec.js10
8 files changed, 24 insertions, 65 deletions
diff --git a/spec/frontend/packages/details/components/__snapshots__/package_title_spec.js.snap b/spec/frontend/packages/details/components/__snapshots__/package_title_spec.js.snap
index d317264bdae..318cea98b92 100644
--- a/spec/frontend/packages/details/components/__snapshots__/package_title_spec.js.snap
+++ b/spec/frontend/packages/details/components/__snapshots__/package_title_spec.js.snap
@@ -9,7 +9,7 @@ exports[`PackageTitle renders with tags 1`] = `
class="gl-display-flex gl-justify-content-space-between gl-py-3"
>
<div
- class="gl-flex-direction-column"
+ class="gl-flex-direction-column gl-flex-grow-1"
>
<div
class="gl-display-flex"
@@ -54,6 +54,7 @@ exports[`PackageTitle renders with tags 1`] = `
link=""
size="s"
text="maven"
+ texttooltip=""
/>
</div>
<div
@@ -65,6 +66,7 @@ exports[`PackageTitle renders with tags 1`] = `
link=""
size="s"
text="300 bytes"
+ texttooltip=""
/>
</div>
<div
@@ -95,7 +97,7 @@ exports[`PackageTitle renders without tags 1`] = `
class="gl-display-flex gl-justify-content-space-between gl-py-3"
>
<div
- class="gl-flex-direction-column"
+ class="gl-flex-direction-column gl-flex-grow-1"
>
<div
class="gl-display-flex"
@@ -140,6 +142,7 @@ exports[`PackageTitle renders without tags 1`] = `
link=""
size="s"
text="maven"
+ texttooltip=""
/>
</div>
<div
@@ -151,6 +154,7 @@ exports[`PackageTitle renders without tags 1`] = `
link=""
size="s"
text="300 bytes"
+ texttooltip=""
/>
</div>
</div>
diff --git a/spec/frontend/packages/details/components/additional_metadata_spec.js b/spec/frontend/packages/details/components/additional_metadata_spec.js
index 111e4205abb..8466a630ecb 100644
--- a/spec/frontend/packages/details/components/additional_metadata_spec.js
+++ b/spec/frontend/packages/details/components/additional_metadata_spec.js
@@ -11,7 +11,7 @@ describe('Package Additional Metadata', () => {
packageEntity: { ...mavenPackage },
};
- const mountComponent = props => {
+ const mountComponent = (props) => {
wrapper = shallowMount(component, {
propsData: { ...defaultProps, ...props },
stubs: {
@@ -33,7 +33,7 @@ describe('Package Additional Metadata', () => {
const findConanRecipe = () => wrapper.find('[data-testid="conan-recipe"]');
const findMavenApp = () => wrapper.find('[data-testid="maven-app"]');
const findMavenGroup = () => wrapper.find('[data-testid="maven-group"]');
- const findElementLink = container => container.find(GlLink);
+ const findElementLink = (container) => container.find(GlLink);
it('has the correct title', () => {
mountComponent();
diff --git a/spec/frontend/packages/details/components/conan_installation_spec.js b/spec/frontend/packages/details/components/conan_installation_spec.js
index c79d1bb50dd..92c1f8e7f4a 100644
--- a/spec/frontend/packages/details/components/conan_installation_spec.js
+++ b/spec/frontend/packages/details/components/conan_installation_spec.js
@@ -48,21 +48,13 @@ describe('ConanInstallation', () => {
describe('installation commands', () => {
it('renders the correct command', () => {
- expect(
- findCodeInstructions()
- .at(0)
- .props('instruction'),
- ).toBe(conanInstallationCommandStr);
+ expect(findCodeInstructions().at(0).props('instruction')).toBe(conanInstallationCommandStr);
});
});
describe('setup commands', () => {
it('renders the correct command', () => {
- expect(
- findCodeInstructions()
- .at(1)
- .props('instruction'),
- ).toBe(conanSetupCommandStr);
+ expect(findCodeInstructions().at(1).props('instruction')).toBe(conanSetupCommandStr);
});
});
});
diff --git a/spec/frontend/packages/details/components/maven_installation_spec.js b/spec/frontend/packages/details/components/maven_installation_spec.js
index f301a03a7f3..ff62969e709 100644
--- a/spec/frontend/packages/details/components/maven_installation_spec.js
+++ b/spec/frontend/packages/details/components/maven_installation_spec.js
@@ -51,11 +51,7 @@ describe('MavenInstallation', () => {
describe('installation commands', () => {
it('renders the correct xml block', () => {
- expect(
- findCodeInstructions()
- .at(0)
- .props(),
- ).toMatchObject({
+ expect(findCodeInstructions().at(0).props()).toMatchObject({
instruction: xmlCodeBlock,
multiline: true,
trackingAction: TrackingActions.COPY_MAVEN_XML,
@@ -63,11 +59,7 @@ describe('MavenInstallation', () => {
});
it('renders the correct maven command', () => {
- expect(
- findCodeInstructions()
- .at(1)
- .props(),
- ).toMatchObject({
+ expect(findCodeInstructions().at(1).props()).toMatchObject({
instruction: mavenCommandStr,
multiline: false,
trackingAction: TrackingActions.COPY_MAVEN_COMMAND,
@@ -77,11 +69,7 @@ describe('MavenInstallation', () => {
describe('setup commands', () => {
it('renders the correct xml block', () => {
- expect(
- findCodeInstructions()
- .at(2)
- .props(),
- ).toMatchObject({
+ expect(findCodeInstructions().at(2).props()).toMatchObject({
instruction: mavenSetupXml,
multiline: true,
trackingAction: TrackingActions.COPY_MAVEN_SETUP,
diff --git a/spec/frontend/packages/details/components/npm_installation_spec.js b/spec/frontend/packages/details/components/npm_installation_spec.js
index 4223a05453c..dd6e62185a9 100644
--- a/spec/frontend/packages/details/components/npm_installation_spec.js
+++ b/spec/frontend/packages/details/components/npm_installation_spec.js
@@ -47,11 +47,7 @@ describe('NpmInstallation', () => {
describe('installation commands', () => {
it('renders the correct npm command', () => {
- expect(
- findCodeInstructions()
- .at(0)
- .props(),
- ).toMatchObject({
+ expect(findCodeInstructions().at(0).props()).toMatchObject({
instruction: 'npm i @Test/package',
multiline: false,
trackingAction: TrackingActions.COPY_NPM_INSTALL_COMMAND,
@@ -59,11 +55,7 @@ describe('NpmInstallation', () => {
});
it('renders the correct yarn command', () => {
- expect(
- findCodeInstructions()
- .at(1)
- .props(),
- ).toMatchObject({
+ expect(findCodeInstructions().at(1).props()).toMatchObject({
instruction: 'yarn add @Test/package',
multiline: false,
trackingAction: TrackingActions.COPY_YARN_INSTALL_COMMAND,
@@ -73,11 +65,7 @@ describe('NpmInstallation', () => {
describe('setup commands', () => {
it('renders the correct npm command', () => {
- expect(
- findCodeInstructions()
- .at(2)
- .props(),
- ).toMatchObject({
+ expect(findCodeInstructions().at(2).props()).toMatchObject({
instruction: 'echo @Test:registry=undefined/ >> .npmrc',
multiline: false,
trackingAction: TrackingActions.COPY_NPM_SETUP_COMMAND,
@@ -85,11 +73,7 @@ describe('NpmInstallation', () => {
});
it('renders the correct yarn command', () => {
- expect(
- findCodeInstructions()
- .at(3)
- .props(),
- ).toMatchObject({
+ expect(findCodeInstructions().at(3).props()).toMatchObject({
instruction: 'echo \\"@Test:registry\\" \\"undefined/\\" >> .yarnrc',
multiline: false,
trackingAction: TrackingActions.COPY_YARN_SETUP_COMMAND,
diff --git a/spec/frontend/packages/details/components/nuget_installation_spec.js b/spec/frontend/packages/details/components/nuget_installation_spec.js
index b381d131e94..685d0808dd9 100644
--- a/spec/frontend/packages/details/components/nuget_installation_spec.js
+++ b/spec/frontend/packages/details/components/nuget_installation_spec.js
@@ -49,11 +49,7 @@ describe('NugetInstallation', () => {
describe('installation commands', () => {
it('renders the correct command', () => {
- expect(
- findCodeInstructions()
- .at(0)
- .props(),
- ).toMatchObject({
+ expect(findCodeInstructions().at(0).props()).toMatchObject({
instruction: nugetInstallationCommandStr,
trackingAction: TrackingActions.COPY_NUGET_INSTALL_COMMAND,
});
@@ -62,11 +58,7 @@ describe('NugetInstallation', () => {
describe('setup commands', () => {
it('renders the correct command', () => {
- expect(
- findCodeInstructions()
- .at(1)
- .props(),
- ).toMatchObject({
+ expect(findCodeInstructions().at(1).props()).toMatchObject({
instruction: nugetSetupCommandStr,
trackingAction: TrackingActions.COPY_NUGET_SETUP_COMMAND,
});
diff --git a/spec/frontend/packages/details/components/package_files_spec.js b/spec/frontend/packages/details/components/package_files_spec.js
index 813a2170154..9bcf6ed9235 100644
--- a/spec/frontend/packages/details/components/package_files_spec.js
+++ b/spec/frontend/packages/details/components/package_files_spec.js
@@ -24,7 +24,6 @@ describe('Package Files', () => {
stubs: {
...stubChildren(component),
GlTable: false,
- GlLink: '<div><slot></slot></div>',
},
});
};
diff --git a/spec/frontend/packages/details/components/package_history_spec.js b/spec/frontend/packages/details/components/package_history_spec.js
index c43ac9b9c40..5a6b386e2ca 100644
--- a/spec/frontend/packages/details/components/package_history_spec.js
+++ b/spec/frontend/packages/details/components/package_history_spec.js
@@ -15,10 +15,10 @@ describe('Package History', () => {
packageEntity: { ...mavenPackage },
};
- const createPipelines = amount =>
+ const createPipelines = (amount) =>
[...Array(amount)].map((x, index) => ({ ...mockPipelineInfo, id: index + 1 }));
- const mountComponent = props => {
+ const mountComponent = (props) => {
wrapper = shallowMount(component, {
propsData: { ...defaultProps, ...props },
stubs: {
@@ -35,9 +35,9 @@ describe('Package History', () => {
wrapper = null;
});
- const findHistoryElement = testId => wrapper.find(`[data-testid="${testId}"]`);
- const findElementLink = container => container.find(GlLink);
- const findElementTimeAgo = container => container.find(TimeAgoTooltip);
+ const findHistoryElement = (testId) => wrapper.find(`[data-testid="${testId}"]`);
+ const findElementLink = (container) => container.find(GlLink);
+ const findElementTimeAgo = (container) => container.find(TimeAgoTooltip);
const findTitle = () => wrapper.find('[data-testid="title"]');
const findTimeline = () => wrapper.find('[data-testid="timeline"]');