Commit 59d74b5c authored by Phil Hughes's avatar Phil Hughes

Merge branch 'ek-fix-deep-linking-vsa-stages' into 'master'

Fix stage table loading with a deep linked stage

See merge request gitlab-org/gitlab!60261
parents e8e4b6dd a3fea5d9
......@@ -55,11 +55,11 @@ export default {
},
isDefaultTestStage() {
const { currentStage } = this;
return !currentStage.custom && currentStage.name.toLowerCase().trim() === 'test';
return !currentStage.custom && currentStage.title?.toLowerCase().trim() === 'test';
},
isDefaultStagingStage() {
const { currentStage } = this;
return !currentStage.custom && currentStage.name.toLowerCase().trim() === 'staging';
return !currentStage.custom && currentStage.title?.toLowerCase().trim() === 'staging';
},
isMergeRequestStage() {
const [firstEvent] = this.stageEvents;
......
---
title: Fix stage table loading with a deep linked stage
merge_request: 60261
author:
type: fixed
......@@ -70,6 +70,22 @@ describe('StageTable', () => {
});
});
describe('with minimal stage data', () => {
beforeEach(() => {
wrapper = createComponent({ currentStage: { title: 'New stage title' } });
});
it('will render the correct events', () => {
const evs = findStageEvents();
expect(evs).toHaveLength(issueEvents.length);
const titles = evs.wrappers.map((ev) => findStageEventTitle(ev).text());
issueEvents.forEach((ev, index) => {
expect(titles[index]).toBe(ev.title);
});
});
});
describe('default event', () => {
beforeEach(() => {
wrapper = createComponent({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment