Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/content-rendering.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 | ||||
*/ | */ | ||||
import {checkLanguageHighlighting} from '../utils'; | import {checkLanguageHighlighting, describeSlowTests} from '../utils'; | ||||
describe('Code highlighting tests', function() { | describeSlowTests('Code highlighting tests', function() { | ||||
const extensions = require('../fixtures/source-file-extensions.json'); | const extensions = require('../fixtures/source-file-extensions.json'); | ||||
extensions.forEach(ext => { | extensions.forEach(ext => { | ||||
it(`should highlight source files with extension ${ext}`, function() { | it(`should highlight source files with extension ${ext}`, function() { | ||||
cy.request(this.Urls.tests_content_code_extension(ext)).then(response => { | cy.request(this.Urls.tests_content_code_extension(ext)).then(response => { | ||||
const data = response.body; | const data = response.body; | ||||
cy.visit(`${this.Urls.browse_content(data.sha1)}?path=file.${ext}`); | cy.visit(`${this.Urls.browse_content(data.sha1)}?path=file.${ext}`); | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |