Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/directory.spec.js
/** | /** | ||||
* Copyright (C) 2019-2020 The Software Heritage developers | * Copyright (C) 2019-2020 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 | ||||
*/ | */ | ||||
const $ = Cypress.$; | const $ = Cypress.$; | ||||
let origin; | let origin; | ||||
let url; | let url; | ||||
const dirSha1 = '2a9e0d6dee8dc7c87c22fd56731ab5c732282eab'; | |||||
const dirs = []; | const dirs = []; | ||||
const files = []; | const files = []; | ||||
describe('Directory Tests', function() { | describe('Directory Tests', function() { | ||||
before(function() { | before(function() { | ||||
origin = this.origin[0]; | origin = this.origin[0]; | ||||
url = `${this.Urls.browse_origin_directory()}?origin_url=${origin.url}`; | url = `${this.Urls.browse_directory(dirSha1)}?origin_url=${origin.url}`; | ||||
for (const entry of origin.dirContent) { | for (const entry of origin.dirContent) { | ||||
if (entry.type === 'file') { | if (entry.type === 'file') { | ||||
files.push(entry); | files.push(entry); | ||||
} else { | } else { | ||||
dirs.push(entry); | dirs.push(entry); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |