Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/revision-diff.spec.js
/** | /** | ||||
* Copyright (C) 2019 The Software Heritage developers | * Copyright (C) 2019 The Software Heritage developers | ||||
* See the AUTHORS file at the top-level directory of this distribution | * See the AUTHORS file at the top-level directory of this distribution | ||||
* License: GNU Affero General Public License version 3, or any later version | * License: GNU Affero General Public License version 3, or any later version | ||||
* See top-level LICENSE file for more information | * See top-level LICENSE file for more information | ||||
*/ | */ | ||||
let origin; | let origin; | ||||
let diffData; | let diffData; | ||||
describe('Test Diffs View', function() { | describe('Test Diffs View', function() { | ||||
before(function() { | before(function() { | ||||
origin = this.origin[0]; | origin = this.origin[0]; | ||||
const url = this.Urls.browse_revision(origin.revision) + `?origin=${origin.url}`; | const url = this.Urls.browse_revision(origin.revision[0]) + `?origin=${origin.url}`; | ||||
cy.visit(url).window().then(win => { | cy.visit(url).window().then(win => { | ||||
cy.request(win.diffRevUrl) | cy.request(win.diffRevUrl) | ||||
.then(res => { | .then(res => { | ||||
diffData = res.body; | diffData = res.body; | ||||
}); | }); | ||||
}); | }); | ||||
}); | }); | ||||
beforeEach(function() { | beforeEach(function() { | ||||
const url = this.Urls.browse_revision(origin.revision) + `?origin=${origin.url}`; | const url = this.Urls.browse_revision(origin.revision[0]) + `?origin=${origin.url}`; | ||||
cy.visit(url); | cy.visit(url); | ||||
cy.get('a[data-toggle="tab"]') | cy.get('a[data-toggle="tab"]') | ||||
.contains('Changes') | .contains('Changes') | ||||
.click(); | .click(); | ||||
}); | }); | ||||
it('should list all files with changes', function() { | it('should list all files with changes', function() { | ||||
let files = new Set([]); | let files = new Set([]); | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |