BigW Consortium Gitlab

Commit bf5248ac by Phil Hughes

Pull in fixture files from the repo

parent 31049557
require 'spec_helper'
describe 'Raw files', '(JavaScript fixtures)', type: :controller do
include JavaScriptFixturesHelpers
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
let(:project) { create(:project, namespace: namespace, path: 'raw-project') }
before(:all) do
clean_frontend_fixtures('blob/notebook/')
end
it 'blob/notebook/basic.json' do |example|
blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb')
store_frontend_fixture(blob.data, example.description)
end
it 'blob/notebook/worksheets.json' do |example|
blob = project.repository.blob_at('6d85bb69', 'files/ipython/worksheets.ipynb')
store_frontend_fixture(blob.data, example.description)
end
end
import Vue from 'vue';
import CodeComponent from '~/notebook/cells/code.vue';
import json from '../../fixtures/notebook/file.json';
const Component = Vue.extend(CodeComponent);
describe('Code component', () => {
let vm;
let json;
beforeEach(() => {
json = getJSONFixture('blob/notebook/basic.json');
});
describe('without output', () => {
beforeEach((done) => {
......
import Vue from 'vue';
import MarkdownComponent from '~/notebook/cells/markdown.vue';
import json from '../../fixtures/notebook/file.json';
const cell = json.cells[1];
const Component = Vue.extend(MarkdownComponent);
describe('Markdown component', () => {
let vm;
let cell;
let json;
beforeEach((done) => {
json = getJSONFixture('blob/notebook/basic.json');
cell = json.cells[1];
vm = new Component({
propsData: {
cell,
......
import Vue from 'vue';
import CodeComponent from '~/notebook/cells/output/index.vue';
import json from '../../../fixtures/notebook/file.json';
const Component = Vue.extend(CodeComponent);
describe('Output component', () => {
let vm;
let json;
const createComponent = (output) => {
vm = new Component({
......@@ -17,6 +17,10 @@ describe('Output component', () => {
vm.$mount();
};
beforeEach(() => {
json = getJSONFixture('blob/notebook/basic.json');
});
describe('text output', () => {
beforeEach((done) => {
createComponent(json.cells[2].outputs[0]);
......
import Vue from 'vue';
import Notebook from '~/notebook/index.vue';
import json from '../fixtures/notebook/file.json';
import jsonWithWorksheet from '../fixtures/notebook/worksheets.json';
const Component = Vue.extend(Notebook);
describe('Notebook component', () => {
let vm;
let json;
let jsonWithWorksheet;
beforeEach(() => {
json = getJSONFixture('blob/notebook/basic.json');
jsonWithWorksheet = getJSONFixture('blob/notebook/worksheets.json');
});
describe('without JSON', () => {
beforeEach((done) => {
......
......@@ -38,7 +38,8 @@ module TestEnv
'deleted-image-test' => '6c17798',
'wip' => 'b9238ee',
'csv' => '3dd0896',
'v1.1.0' => 'b83d6e3'
'v1.1.0' => 'b83d6e3',
'add-ipython-files' => '6d85bb69'
}.freeze
# gitlab-test-fork is a fork of gitlab-fork, but we don't necessarily
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment