Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 6b8ba2f

Browse files
committed
test: Addex indexes to our test database
1 parent feb6d69 commit 6b8ba2f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

cypress/e2e/1-webui/database.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ describe('database page', () => {
8888

8989
// Size field
9090
it('Size field', () => {
91-
cy.get('[data-cy="size"]').should('contain', '56 KB')
91+
cy.get('[data-cy="size"]').should('contain', '72 KB')
9292
})
9393

9494
// Source URL
@@ -170,7 +170,7 @@ describe('database page', () => {
170170
// Simple sanity check of the downloaded file
171171
// TODO - Implement a better check. Maybe create a task that diffs the database to the original test data file?
172172
const db = path.join(downloadsFolder, 'Assembly Election 2017.sqlite')
173-
cy.readFile(db, 'binary', { timeout: 5000 }).should('have.length', 57344)
173+
cy.readFile(db, 'binary', { timeout: 5000 }).should('have.length', 73728)
174174
cy.task('rmFile', { path: db })
175175
})
176176

cypress/e2e/1-webui/logged-in-user-profile-page.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('logged-in user profile page', () => {
2020
it('assembly election 2017 database has expected details', () => {
2121
cy.get('[data-cy="pubexpand"]').click()
2222
cy.get('[data-cy="pubdbs"]').contains('Source:').next().should('contain', 'http://data.nicva.org/dataset/assembly-election-2017')
23-
cy.get('[data-cy="pubdbs"]').contains('Size:').next().should('contain', '56 KB')
23+
cy.get('[data-cy="pubdbs"]').contains('Size:').next().should('contain', '72 KB')
2424
cy.get('[data-cy="pubdbs"]').contains('Contributors:').next().should('contain', '1')
2525
cy.get('[data-cy="pubdbs"]').contains('Discussions:').next().should('contain', '0')
2626
cy.get('[data-cy="pubdbs"]').contains('Licence:').next().should('contain', 'CC-BY-SA-4.0')
@@ -56,7 +56,7 @@ describe('logged-in user profile page', () => {
5656
it('private database has expected details', () => {
5757
cy.get('[data-cy="privexpand"]').click()
5858
cy.get('[data-cy="privdbs"]').contains('Source:').next().should('contain', 'http://data.nicva.org/dataset/assembly-election-2017')
59-
cy.get('[data-cy="privdbs"]').contains('Size:').next().should('contain', '56 KB')
59+
cy.get('[data-cy="privdbs"]').contains('Size:').next().should('contain', '72 KB')
6060
cy.get('[data-cy="privdbs"]').contains('Contributors:').next().should('contain', '1')
6161
cy.get('[data-cy="privdbs"]').contains('Discussions:').next().should('contain', '0')
6262
cy.get('[data-cy="privdbs"]').contains('Licence:').next().should('contain', 'CC-BY-SA-4.0')

cypress/e2e/2-api/api.cy.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ describe('api tests', () => {
9696
expect(entries).to.have.property('entry_type', 'db')
9797
expect(entries).to.have.property('licence', '9348ddfd44da5a127c59141981954746a860ec8e03e0412cf3af7134af0f97e2')
9898
expect(entries).to.have.property('name', 'Assembly Election 2017.sqlite')
99-
expect(entries).to.have.property('sha256', '4244d55013359c6476d06c045700139629ecfd2752ffad141984ba14ecafd17e')
100-
expect(entries).to.have.property('size', 57344)
99+
expect(entries).to.have.property('sha256', '32e0815554a6fe4e3c17bda3c4abcddc47c0fa3e9291bdefd18effef08a16db8')
100+
expect(entries).to.have.property('size', 73728)
101101
expect(entries).to.include.keys(['last_modified'])
102102
}
103103
)
@@ -279,8 +279,8 @@ describe('api tests', () => {
279279
expect(entries).to.have.property('entry_type', 'db')
280280
expect(entries).to.have.property('licence', '9348ddfd44da5a127c59141981954746a860ec8e03e0412cf3af7134af0f97e2')
281281
expect(entries).to.have.property('name', 'Assembly Election 2017.sqlite')
282-
expect(entries).to.have.property('sha256', '4244d55013359c6476d06c045700139629ecfd2752ffad141984ba14ecafd17e')
283-
expect(entries).to.have.property('size', 57344)
282+
expect(entries).to.have.property('sha256', '32e0815554a6fe4e3c17bda3c4abcddc47c0fa3e9291bdefd18effef08a16db8')
283+
expect(entries).to.have.property('size', 73728)
284284
expect(entries).to.include.keys(['last_modified'])
285285
}
286286
)

cypress/test_data/Assembly Election 2017.sqlite

100644100755
16 KB
Binary file not shown.

0 commit comments

Comments
 (0)