Skip to content

Commit a32a8ef

Browse files
authored
Merge pull request #750 from bcgov/bcwat-748-watershed-report-style-changes
Bcwat 748 watershed report style changes
2 parents f3d6fbd + f9b7633 commit a32a8ef

40 files changed

+860
-532
lines changed

charts/okd/airflow/values.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ extraSecrets:
1010
type: Opaque
1111
stringData: |
1212
fernet-key: "{{ .Values.secrets.fernet.key }}"
13-
airflow-database-connection:
14-
type: Opaque
15-
stringData: |
16-
connection: {{ index ((lookup "v1" "Secret" .Release.Namespace "bcwat-db-pguser-airflow-metadata-admin").data) "uri" | b64dec | quote }}
17-
airflow-conn-bcwat-db:
18-
type: Opaque
19-
stringData: |
20-
uri: {{ index ((lookup "v1" "Secret" .Release.Namespace "bcwat-db-pguser-bcwat-airflow-read-write").data) "pgbouncer-uri" | b64dec | quote }}
2113
airflow-sendgrid-default:
2214
type: Opaque
2315
stringData: |
@@ -107,17 +99,17 @@ webserver:
10799
- name: FLYWAY_URL
108100
valueFrom:
109101
secretKeyRef:
110-
name: bcwat-db-pguser-bcwat-api-admin
102+
name: bcwat-api-admin-credentials
111103
key: jdbc-uri
112104
- name: FLYWAY_USER
113105
valueFrom:
114106
secretKeyRef:
115-
name: bcwat-db-pguser-bcwat-api-admin
107+
name: bcwat-api-admin-credentials
116108
key: user
117109
- name: FLYWAY_PASSWORD
118110
valueFrom:
119111
secretKeyRef:
120-
name: bcwat-db-pguser-bcwat-api-admin
112+
name: bcwat-api-admin-credentials
121113
key: password
122114
resources:
123115
requests:

charts/okd/app/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ backend:
1717
name: bcwat-api
1818
image: foundrymainregistry.azurecr.io/bcwat/api:latest
1919
imagePullSecret: acr-pull-secret
20-
secret: bcwat-db-pguser-bcwat-api-read-only
20+
secret: bcwat-api-credentials
2121
env:
2222
FLASK_ENV: Development
2323
CLIENT_URL: http://bcwatertool.fspatial

charts/okd/crunchy/PostgresCluster.yaml

Lines changed: 0 additions & 94 deletions
This file was deleted.

charts/okd/crunchy/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

client/cypress/component/climate/ClimatePage.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('<ClimatePage />', () => {
2424
}
2525
});
2626
portalHandler.updateViewType('climate');
27-
cy.get('.map-points-list > .q-virtual-scroll__content')
27+
cy.get('.map-points-list > div')
2828
.children()
2929
.first()
3030
.click();

client/cypress/component/groundwater-level/GroundwaterLevel.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('<GroundwaterLevel />', () => {
3131
}
3232
});
3333
portalHandler.updateViewType('wells');
34-
cy.get('.q-virtual-scroll__content > .q-item:nth-child(1)').click();
34+
cy.get('.map-points-list > div:nth-child(1) > .q-item').click();
3535
// details are displayed
3636
cy.get('.selected-point > pre:nth-child(1)').should('not.be.empty');
3737
cy.get('.q-btn > span > span').contains('View More').click();

client/cypress/component/groundwater/Groundwater.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ describe('<GroundWaterQuality />', () => {
4040
});
4141
portalHandler.updateViewType('ground');
4242
cy.wait(1000);
43-
cy.get('.map-points-list > .q-virtual-scroll__content')
43+
cy.get('.map-points-list > div')
4444
.children()
4545
.first()
4646
.click();
4747
cy.wait(1000);
48-
cy.get('.q-virtual-scroll__content > .q-item:first').click();
48+
cy.get('.map-points-list > div:nth-child(1) > .q-item').click();
4949
// details are displayed
5050
cy.get('.selected-point').should('not.be.empty');
5151
// open report

client/cypress/component/surfacewater/SurfaceWater.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('<SurfaceWater />', () => {
3131
}
3232
});
3333
portalHandler.updateViewType('surface');
34-
cy.get('.q-virtual-scroll__content > .q-item:nth-child(1)').click();
34+
cy.get('.map-points-list > div:nth-child(1) > .q-item').click();
3535
// details are displayed
3636
cy.get('.selected-point > pre:nth-child(1)').should('not.be.empty');
3737
// open report

client/cypress/component/watershed/Watershed.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('<Watershed />', () => {
1212
});
1313
it('opens station details', () => {
1414
cy.mount(Watershed)
15-
cy.get('.q-virtual-scroll__content').children().first().click();
15+
cy.get('map-points-list').children().first().click();
1616
cy.get('.selected-point').should('exist').and('be.visible');
1717
});
1818
it('opens watershed report', () => {

client/cypress/component/watershed/report/Allocations.cy.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -45,50 +45,50 @@ describe('<Allocations />', () => {
4545
});
4646
const allocationRow = reportData.allocations[0];
4747
// check the test data matches the content displayed
48-
cy.get('.q-table > tbody > tr > td:nth-child(1) > p:nth-child(1)').should('have.text', allocationRow.licensee);
49-
cy.get('.q-table > tbody > tr > td:nth-child(1) > p:nth-child(2)').should('contain', allocationRow.purpose).and('contain', allocationRow.stream_name);
50-
cy.get('.q-table > tbody > tr > td:nth-child(2) > p:nth-child(2)').should('contain', 'File # ' + allocationRow.file_no)
51-
cy.get('.q-table > tbody > tr > td:nth-child(3) > p:nth-child(1)').should('contain', allocationRow.pod);
52-
cy.get('.q-table > tbody > tr > td:nth-child(3) > p:nth-child(2)').should('contain', allocationRow.well_tag_number);
53-
cy.get('.q-table > tbody > tr > td:nth-child(4) > p:nth-child(1)').then(text => {
48+
49+
cy.get('[data-cy="license"] > p:nth-child(1)').should('have.text', allocationRow.licensee);
50+
cy.get('[data-cy="license"] > p:nth-child(2)').should('contain', allocationRow.purpose).and('contain', allocationRow.stream_name);
51+
cy.get('[data-cy="number"] > p:nth-child(2)').should('contain', 'File # ' + allocationRow.file_no)
52+
cy.get('[data-cy="pod"] > p:nth-child(1)').should('contain', allocationRow.pod);
53+
cy.get('[data-cy="pod"] > p:nth-child(2)').should('contain', allocationRow.well_tag_number);
54+
cy.get('[data-cy="date"] > p:nth-child(1)').then(text => {
5455
assert(text[0].innerHTML.includes(formatDate(allocationRow.start_date, 'dd mmm yyyy', ' ')));
55-
})
56-
cy.get('.q-table > tbody > tr > td:nth-child(4) > p:nth-child(1)').should('contain', formatDate(allocationRow.start_date, 'dd mmm yyyy', ' '));
57-
cy.get('.q-table > tbody > tr > td:nth-child(4) > p:nth-child(2)').should('contain', formatDate(allocationRow.priority_date, 'dd mmm yyyy', ' '));
58-
cy.get('.q-table > tbody > tr > td:nth-child(4) > p:nth-child(3)').should('contain', formatDate(allocationRow.expiry_date, 'dd mmm yyyy', ' '));
59-
cy.get('.q-table > tbody > tr > td:nth-child(4) > p:nth-child(4)').should('contain', formatDate(allocationRow.lic_status_date, 'dd mmm yyyy', ' '));
60-
cy.get('.q-table > tbody > tr > td:nth-child(5)').should('contain', "1,234.0");
61-
cy.get('.q-table > tbody > tr > td:nth-child(6)').should('contain', allocationRow.qty_flag);
62-
cy.get('.q-table > tbody > tr > td:nth-child(7) > div').should('have.class', allocationRow.lic_type);
63-
cy.get('.q-table > tbody > tr > td:nth-child(7) > div').should('contain', allocationRow.lic_type);
64-
cy.get('.q-table > tbody > tr > td:nth-child(8) > .q-icon').should('have.class', 'mdi-check-circle').and('have.class', 'text-green-5')
56+
});
57+
cy.get('[data-cy="date"] > p:nth-child(1)').should('contain', formatDate(allocationRow.start_date, 'dd mmm yyyy', ' '));
58+
cy.get('[data-cy="date"] > p:nth-child(2)').should('contain', formatDate(allocationRow.priority_date, 'dd mmm yyyy', ' '));
59+
cy.get('[data-cy="date"] > p:nth-child(3)').should('contain', formatDate(allocationRow.expiry_date, 'dd mmm yyyy', ' '));
60+
cy.get('[data-cy="date"] > p:nth-child(4)').should('contain', formatDate(allocationRow.lic_status_date, 'dd mmm yyyy', ' '));
61+
cy.get('[data-cy="quantity"]').should('contain', "1,234.0");
62+
cy.get('[data-cy="flag"]').should('contain', allocationRow.qty_flag);
63+
cy.get('[data-cy="type"] > div').should('have.class', allocationRow.lic_type);
64+
cy.get('[data-cy="type"] > div').should('contain', allocationRow.lic_type);
65+
cy.get('[data-cy="status"] > .q-icon').should('have.class', 'mdi-check-circle').and('have.class', 'text-green-5')
6566
})
6667
it('sets and resets filters', () => {
6768
cy.mount(Allocations, {
6869
props: {
6970
reportContent: reportData
7071
}
7172
});
72-
const allocationRow = reportData.allocations[0];
7373
// check value exists before filtering
74-
cy.get('.q-table > tbody > tr > td:nth-child(5)').should('contain', "1,234.0");
74+
cy.get('[data-cy="quantity"]').should('contain', "1,234.0");
7575
cy.get('.mdi-filter').click()
7676
cy.get('.q-checkbox__label').contains('Surface Water').click()
77-
cy.get('.q-table > tbody > tr > td:nth-child(5)').should('not.exist');
77+
cy.get('[data-cy="quantity"]').should('not.exist');
7878
cy.get('.q-checkbox__label').contains('Surface Water').click()
79-
cy.get('.q-table > tbody > tr > td:nth-child(5)').should('contain', "1,234.0");
79+
cy.get('[data-cy="quantity"]').should('contain', "1,234.0");
8080
cy.get('.q-checkbox__label').contains('Application').click()
81-
cy.get('.q-table > tbody > tr > td:nth-child(5)').should('not.exist');
81+
cy.get('[data-cy="quantity"]').should('not.exist');
8282
cy.get('.q-checkbox__label').contains('Application').click();
8383
cy.get('.q-checkbox__label').contains('Agriculture').click();
84-
cy.get('.q-table > tbody > tr > td:nth-child(5)').should('not.exist');
84+
cy.get('[data-cy="quantity"]').should('not.exist');
8585
cy.get('.q-checkbox__label').contains('Agriculture').click();
86-
cy.get('.q-table > tbody > tr > td:nth-child(5)').should('contain', "1,234.0");
86+
cy.get('[data-cy="quantity"]').should('contain', "1,234.0");
8787
cy.get('input[placeholder="Text Search"]').type('TESTING')
88-
cy.get('.q-table > tbody > tr > td:nth-child(5)').should('not.exist');
88+
cy.get('[data-cy="quantity"]').should('not.exist');
8989
cy.get('input[placeholder="Text Search"]').clear()
9090
cy.get('input[placeholder="Text Search"]').type('Cypress')
91-
cy.get('.q-table > tbody > tr > td:nth-child(5)').should('contain', "1,234.0");
91+
cy.get('[data-cy="quantity"]').should('contain', "1,234.0");
9292
cy.get('span').contains('Reset Filters').click();
9393
cy.get('input[placeholder="Text Search"]').should('have.value', '');
9494
})

0 commit comments

Comments
 (0)