Skip to content

Commit

Permalink
Merge pull request #1918 from bcgov/1917-rfp-year-2024
Browse files Browse the repository at this point in the history
Add 2024 to the funding stream rfp table
  • Loading branch information
BCerki committed May 31, 2024
2 parents 18eaa1a + 4501366 commit 12fcc84
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ describe("when creating a project, the project page", () => {

it("allows an admin user to create an EP project", () => {
//add new
cy.fillAndCheckNewProjectForm("Emissions Performance", "2020");
cy.fillAndCheckNewProjectForm("Emissions Performance", "2024");
cy.happoAndAxe("EP Project New Form", "filled", "main");
cy.findByRole("button", { name: /^confirm/i }).click();

// add overview
cy.url().should("include", "/form/0");
cy.findByText("Emissions Performance - 2020");
cy.findByText("Emissions Performance - 2024");
cy.fillOverviewForm(
"first operator legal name (AB1234567)",
"Cement",
Expand Down Expand Up @@ -176,7 +176,7 @@ describe("when creating a project, the project page", () => {
// project overview section
cy.findByText(/RFP Year ID/i)
.next()
.should("have.text", "Emissions Performance - 2020");
.should("have.text", "Emissions Performance - 2024");
cy.findByText(/Operator Name/i)
.next()
.should("have.text", "first operator legal name (AB1234567)");
Expand Down
2 changes: 1 addition & 1 deletion app/cypress/e2e/cif/project-revision/undo-changes.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe("when undoing, the project revision page", () => {
}).click();
cy.addOrEditEmissionIntensityReport(
"2022-01-01",
"2022-02-02",
"2022-04-02",
"tCO",
"1",
"2",
Expand Down
9 changes: 9 additions & 0 deletions schema/deploy/tables/funding_stream_rfp_002.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Deploy cif:tables/funding_stream_rfp_002 to pg


begin;

insert into cif.funding_stream_rfp (year, funding_stream_id) values
(2024, 1), (2024, 2);

commit;
7 changes: 7 additions & 0 deletions schema/revert/tables/funding_stream_rfp_002.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- Revert cif:tables/funding_stream_rfp_002 from pg

begin;

delete from cif.funding_stream_rfp where year = 2024;

commit;
2 changes: 2 additions & 0 deletions schema/sqitch.plan
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,5 @@ mutations/commit_form_change [mutations/commit_form_change@1.15.0] 2023-11-22T19
@1.16.4 2024-05-15T17:36:42Z Mike Vesprini <mike@button.is> # release v1.16.4
@1.16.5 2024-05-22T23:00:27Z Mike Vesprini <mike@button.is> # release v1.16.5
@1.17.0 2024-05-24T21:29:42Z Mike Vesprini <mike@button.is> # release v1.17.0

tables/funding_stream_rfp_002 2024-05-28T22:41:57Z Brianna Cerkiewicz <briannacerkiewicz@pop-os> # Add 2024 funding streams values to funding_stream_rfp table
2 changes: 1 addition & 1 deletion schema/test/unit/tables/funding_stream_rfp_test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ select results_eq(
$$
select count(*) from cif.funding_stream_rfp
$$,
ARRAY['10'::bigint],
ARRAY['12'::bigint],
'cif_internal can view all data from funding_stream_rfp'
);

Expand Down
13 changes: 13 additions & 0 deletions schema/verify/tables/funding_stream_rfp_002.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Verify cif:tables/funding_stream_rfp_002 on pg

begin;

do $$
begin
assert (
(select count(*) from cif.funding_stream_rfp where year = 2024) = 2
), 'EP and IA streams have been added for 2024';
end;
$$;

rollback;

0 comments on commit 12fcc84

Please sign in to comment.