[clean up][xs]: removed hard-coded dataset and resource pages.

This commit is contained in:
anuveyatsu 2020-06-12 15:24:13 +06:00
parent 8f25a77653
commit 2f8707a6d4
6 changed files with 0 additions and 654 deletions

View File

@ -1,222 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`showcase page renders a snapshot 1`] = `
<div
className="container mx-auto"
>
<div
className="my-16"
>
<div
className="showcase-page-header"
>
<h1
className="text-4xl"
>
Remuneración octubre 2017
</h1>
<p
className="publisher flex"
>
<img
className="rounded-full w-6 mr-2"
src="https://www.gravatar.com/avatar/none?d=https%3A%2F%2Ftesting.datahub.io%2Fstatic%2Fimg%2Flogo-cube03.png"
/>
<a
className="text-orange-400"
href="#"
>
Datos Abiertos Municipio Loja Ecuador
</a>
</p>
<table
className="table-auto my-6"
>
<thead>
<tr>
<th
className="pr-10 py-2"
>
Files
</th>
<th
className="px-10 py-2"
>
Size
</th>
<th
className="px-10 py-2"
>
Format
</th>
<th
className="px-10 py-2"
>
Created
</th>
<th
className="px-10 py-2"
>
Updated
</th>
<th
className="px-10 py-2"
>
License
</th>
<th
className="px-10 py-2"
>
Source
</th>
</tr>
</thead>
<tbody>
<tr>
<td
className="pr-10 py-2"
>
3
</td>
<td
className="px-10 py-2"
>
N/A
</td>
<td
className="px-10 py-2"
>
text xls
</td>
<td
className="px-10 py-2"
>
2020-05-27
</td>
<td
className="px-10 py-2"
>
a few seconds ago
</td>
<td
className="px-10 py-2 text-orange-500"
>
cc-by
</td>
<td
className="px-10 py-2"
>
Datos Abiertos Municipio Loja Ecuador
</td>
</tr>
</tbody>
</table>
<div
className="mb-10"
>
Contiene información sobre las remuneraciones de los servidores de la institución, correspondiente al mes de octubre del año 2017.
</div>
<a
className="bg-black text-white py-4 px-4 rounded-sm mr-2 hover:border-0 hover:border-black hover:text-black hover:bg-transparent"
href="#data"
>
Download
</a>
<a
className="border border-black text-black py-4 px-4 rounded-sm"
href="#data-cli"
>
Developers
</a>
</div>
<div
className="my-16"
>
<h2
className="text-3xl pb-2"
id="data"
>
Data Files
</h2>
<p>
Download files in this dataset
</p>
<table
className="table-auto"
>
<thead>
<th
className="pr-10 text-left py-4"
>
File
</th>
<th
className="px-10 text-left py-4"
>
Description
</th>
<th
className="px-10 text-left py-4"
>
Size
</th>
<th
className="px-10 text-left py-4"
>
Last changed
</th>
<th
className="px-10 text-left py-4"
>
Download
</th>
</thead>
<tbody>
<tr
className="bg-gray-100 text-sm"
>
<td
className="pr-10 py-4 text-orange-500"
>
<i
className="far fa-file-alt"
/>
<a
className="anchor-link"
href="/@myorg/myDataset/r/myresource"
>
Remuneración octubre 2017
</a>
</td>
<td
className="px-10 py-4"
>
Remuneración octubre 2017
</td>
<td
className="px-10 py-4"
title="{{ item.resource.sizeFormatted }}"
/>
<td
className="px-10 py-4"
title="{{ item.resource.modified }}"
>
Invalid Date
</td>
<td
className="px-10 py-4 text-orange-500"
>
<a
href="#"
>
Text
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
`;

View File

@ -1,15 +0,0 @@
import React from 'react'
import { render } from '@testing-library/react'
import renderer from 'react-test-renderer'
import Index from '../../../../pages/@myorg/myDataset/index'
test('showcase page renders a snapshot', () => {
const tree = renderer.create(<Index />).toJSON()
expect(tree).toMatchSnapshot()
})
test('render data package page successfully', () => {
const { getByText } = render(<Index />)
const element = getByText('Download files in this dataset')
expect(element).toBeInTheDocument()
})

View File

@ -1,204 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`showcase renders a snapshot 1`] = `
<div
className="container mx-auto"
>
<div
className="my-16"
>
<div
className="react-me tables"
id="datapackage-view-{{view.id}}"
/>
<p
className="notice"
>
This is a preview version. There might be more data in the original version.
</p>
<div
className="my-16"
>
<h2
className="text-3xl pb-2"
id="data"
>
Remuneración octubre 2017
</h2>
<p
className="text-2xl my-4 font-light"
>
Field Information
</p>
<table
className="table-auto border text-sm mb-2"
>
<thead>
<tr>
<th
className="px-5 w-2/5 text-left py-4 border"
>
Field Name
</th>
<th
className="px-5 w-1/5 text-left py-4 border"
>
Order
</th>
<th
className="px-5 w-1/6 text-left py-4 border"
>
Type(Format)
</th>
<th
className="px-5 w-1/5 text-left py-4 border"
>
Description
</th>
</tr>
</thead>
<tbody>
<tr
className="bg-gray-200 text-sm border"
>
<td
className="px-5 py-4 border font-bold"
>
No.
</td>
<td
className="px-5 py-4 border"
>
1
</td>
<td
className="px-5 py-4 border"
>
any
</td>
<td
className="px-5 py-4 border"
/>
</tr>
<tr
className="text-sm border"
>
<td
className="px-5 py-4 border font-bold"
>
Puesto institucional
</td>
<td
className="px-5 py-4 border"
>
2
</td>
<td
className="px-5 py-4 border"
>
string
</td>
<td
className="px-5 py-4 border"
/>
</tr>
<tr
className="bg-gray-200 text-sm border"
>
<td
className="px-5 py-4 border font-bold"
>
Régimen laboral al que pertenece
</td>
<td
className="px-5 py-4 border"
>
3
</td>
<td
className="px-5 py-4 border"
>
string
</td>
<td
className="px-5 py-4 border"
/>
</tr>
<tr
className="text-sm border"
>
<td
className="px-5 py-4 border font-bold"
>
Número de partida presupuestaria
</td>
<td
className="px-5 py-4 border"
>
4
</td>
<td
className="px-5 py-4 border"
>
string
</td>
<td
className="px-5 py-4 border"
/>
</tr>
<tr
className="bg-gray-200 text-sm border"
>
<td
className="px-5 py-4 border font-bold"
>
Grado jerárquico o escala al que pertenece el puesto
</td>
<td
className="px-5 py-4 border"
>
5
</td>
<td
className="px-5 py-4 border"
>
any
</td>
<td
className="px-5 py-4 border"
/>
</tr>
<tr
className="text-sm border"
>
<td
className="px-5 py-4 border font-bold"
>
Remuneración mensual unificacada
</td>
<td
className="px-5 py-4 border"
>
6
</td>
<td
className="px-5 py-4 border"
>
any
</td>
<td
className="px-5 py-4 border"
/>
</tr>
</tbody>
</table>
<a
className="text-orange-600 underline"
href="/@myorg/myDataset"
>
Go back
</a>
</div>
</div>
</div>
`;

View File

@ -1,17 +0,0 @@
import React from 'react'
import { render, screen } from '@testing-library/react'
import renderer from 'react-test-renderer'
import Resource from '../../../../../pages/@myorg/myDataset/r/myresource'
test('showcase renders a snapshot', () => {
const tree = renderer.create(<Resource />).toJSON()
expect(tree).toMatchSnapshot()
})
test('render resource page successfully', () => {
const { getByText } = render(<Resource />)
const element = getByText('This is a preview version. There might be more data in the original version.')
const message = 'this is not a preview version'
expect(element).toBeInTheDocument()
expect(screen.queryByText(message)).toBeNull()
})

View File

@ -1,83 +0,0 @@
import Head from 'next/head'
export default function Showcase() {
return (
<div className="container mx-auto">
<Head>
<title>Showcase</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<div className="my-16">
<div className="showcase-page-header">
<h1 className="text-4xl">
Remuneración octubre 2017
</h1>
<p className="publisher flex">
<img src="https://www.gravatar.com/avatar/none?d=https%3A%2F%2Ftesting.datahub.io%2Fstatic%2Fimg%2Flogo-cube03.png" className="rounded-full w-6 mr-2" />
<a href="#" className="text-orange-400">Datos Abiertos Municipio Loja Ecuador</a>
</p>
<table className="table-auto my-6">
<thead>
<tr>
<th className="pr-10 py-2">Files</th>
<th className="px-10 py-2">Size</th>
<th className="px-10 py-2">Format</th>
<th className="px-10 py-2">Created</th>
<th className="px-10 py-2">Updated</th>
<th className="px-10 py-2">License</th>
<th className="px-10 py-2">Source</th>
</tr>
</thead>
<tbody>
<tr>
<td className="pr-10 py-2">3</td>
<td className="px-10 py-2">N/A</td>
<td className="px-10 py-2">text xls</td>
<td className="px-10 py-2">2020-05-27</td>
<td className="px-10 py-2">a few seconds ago</td>
<td className="px-10 py-2 text-orange-500">cc-by</td>
<td className="px-10 py-2">Datos Abiertos Municipio Loja Ecuador</td>
</tr>
</tbody>
</table>
<div className="mb-10"> Contiene información sobre las remuneraciones de los servidores de la institución, correspondiente al mes de octubre del año 2017.</div>
<a href="#data" className="bg-black text-white py-4 px-4 rounded-sm mr-2 hover:border-0 hover:border-black hover:text-black hover:bg-transparent">Download</a>
<a href="#data-cli" className="border border-black text-black py-4 px-4 rounded-sm">Developers</a>
</div>
<div className="my-16">
<h2 className="text-3xl pb-2" id="data">Data Files</h2>
<p>Download files in this dataset</p>
<table className="table-auto">
<thead>
<th className="pr-10 text-left py-4">File</th>
<th className="px-10 text-left py-4">Description</th>
<th className="px-10 text-left py-4">Size</th>
<th className="px-10 text-left py-4">Last changed</th>
<th className="px-10 text-left py-4">Download</th>
</thead>
<tbody>
<tr className="bg-gray-100 text-sm">
<td className="pr-10 py-4 text-orange-500">
<i className="far fa-file-alt"></i> <a href="/@myorg/myDataset/r/myresource" className="anchor-link">Remuneración octubre 2017</a>
</td>
<td className="px-10 py-4">
Remuneración octubre 2017
</td>
<td className="px-10 py-4" title="{{ item.resource.sizeFormatted }}">
</td>
<td className="px-10 py-4" title="{{ item.resource.modified }}">
Invalid Date
</td>
<td className="px-10 py-4 text-orange-500">
<a href="#">
Text
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
)
}

View File

@ -1,113 +0,0 @@
import Head from 'next/head'
export default function Showcase() {
return (
<div className="container mx-auto">
<Head>
<title>Showcase</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<div className="my-16">
<div id="datapackage-view-{{view.id}}" className="react-me tables"></div>
<p className="notice">
This is a preview version. There might be more data in the original version.
</p>
<div className="my-16">
<h2 className="text-3xl pb-2" id="data">Remuneración octubre 2017</h2>
<p className="text-2xl my-4 font-light">Field Information</p>
<table className="table-auto border text-sm mb-2">
<thead>
<tr>
<th className="px-5 w-2/5 text-left py-4 border">Field Name</th>
<th className="px-5 w-1/5 text-left py-4 border">Order</th>
<th className="px-5 w-1/6 text-left py-4 border">Type(Format)</th>
<th className="px-5 w-1/5 text-left py-4 border">Description</th>
</tr>
</thead>
<tbody>
<tr className="bg-gray-200 text-sm border">
<td className="px-5 py-4 border font-bold">
No.
</td>
<td className="px-5 py-4 border">
1
</td>
<td className="px-5 py-4 border">
any
</td>
<td className="px-5 py-4 border">
</td>
</tr>
<tr className="text-sm border">
<td className="px-5 py-4 border font-bold">
Puesto institucional
</td>
<td className="px-5 py-4 border">
2
</td>
<td className="px-5 py-4 border">
string
</td>
<td className="px-5 py-4 border">
</td>
</tr>
<tr className="bg-gray-200 text-sm border">
<td className="px-5 py-4 border font-bold">
Régimen laboral al que pertenece
</td>
<td className="px-5 py-4 border">
3
</td>
<td className="px-5 py-4 border">
string
</td>
<td className="px-5 py-4 border">
</td>
</tr>
<tr className="text-sm border">
<td className="px-5 py-4 border font-bold">
Número de partida presupuestaria
</td>
<td className="px-5 py-4 border">
4
</td>
<td className="px-5 py-4 border">
string
</td>
<td className="px-5 py-4 border">
</td>
</tr>
<tr className="bg-gray-200 text-sm border">
<td className="px-5 py-4 border font-bold">
Grado jerárquico o escala al que pertenece el puesto
</td>
<td className="px-5 py-4 border">
5
</td>
<td className="px-5 py-4 border">
any
</td>
<td className="px-5 py-4 border">
</td>
</tr>
<tr className="text-sm border">
<td className="px-5 py-4 border font-bold">
Remuneración mensual unificacada
</td>
<td className="px-5 py-4 border">
6
</td>
<td className="px-5 py-4 border">
any
</td>
<td className="px-5 py-4 border">
</td>
</tr>
</tbody>
</table>
<a href="/@myorg/myDataset" className="text-orange-600 underline">Go back</a>
</div>
</div>
</div>
)
}