Skip to content
Snippets Groups Projects

assets/utils: Validate sub-projects in isGitRepoUrl function

Compare and
2 files
+ 16
3
Compare changes
  • Side-by-side
  • Inline
Files
2
/**
* Copyright (C) 2019 The Software Heritage developers
* Copyright (C) 2019-2020 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
@@ -88,6 +88,19 @@ describe('Origin Save Tests', function() {
});
});
it('should validate gitlab subproject url', function() {
const gitlabSubProjectUrl = 'https://gitlab.com/user/project/sub/';
const originSaveUrl = this.Urls.origin_save_request('git', gitlabSubProjectUrl);
stubSaveRequest(originSaveUrl, 'git', 'accepted',
gitlabSubProjectUrl, 'not yet scheduled');
makeOriginSaveRequest('git', gitlabSubProjectUrl);
cy.wait('@saveRequest').then(() => {
checkAlertVisible('success', saveCodeMsg['success']);
});
});
it('should display warning message when pending', function() {
stubSaveRequest(this.originSaveUrl, origin.type, 'pending',
origin.url, 'not created');
Loading