Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test, add an e2e-test for multi-scopes and a new lane forked from another lane #7247

Merged
merged 2 commits into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions e2e/harmony/lanes/merge-lanes.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,4 +1119,40 @@ describe('merge lanes', function () {
expect(lane.components).to.have.lengthOf(2);
});
});
describe('merge from main when on a forked-new-lane from another scope', () => {
before(() => {
helper.scopeHelper.setNewLocalAndRemoteScopes();
const { scopeName, scopePath } = helper.scopeHelper.getNewBareScope();
const anotherRemote = scopeName;
helper.scopeHelper.addRemoteScope(scopePath);
helper.scopeHelper.addRemoteScope(scopePath, helper.scopes.remotePath);
helper.scopeHelper.addRemoteScope(helper.scopes.remotePath, scopePath);

helper.fixtures.populateComponents(1, false);
helper.command.tagAllWithoutBuild();
helper.command.export();
const mainWs = helper.scopeHelper.cloneLocalScope();

helper.bitJsonc.addDefaultScope(anotherRemote);
helper.command.createLane('lane-a');
helper.command.snapAllComponentsWithoutBuild('--unmodified');
helper.command.export();
helper.command.createLane('lane-b');
const laneBWs = helper.scopeHelper.cloneLocalScope();

helper.scopeHelper.getClonedLocalScope(mainWs);
helper.command.mergeLane(`${anotherRemote}/lane-a`, '-x');
helper.command.snapAllComponentsWithoutBuild('--unmodified');
helper.command.snapAllComponentsWithoutBuild('--unmodified');
helper.command.tagAllWithoutBuild('--unmodified');
helper.command.export();

helper.scopeHelper.getClonedLocalScope(laneBWs);
helper.command.snapAllComponentsWithoutBuild('--unmodified');
helper.command.mergeLane(`main ${helper.scopes.remote}/comp1`, '-x');
});
it('should not throw ComponentNotFound on export', () => {
expect(() => helper.command.export()).to.not.throw();
});
});
});