Skip to content

620 bfl dataset card on dashboard highlights if dataset needs updating#644

Merged
GeorgeGoodall-GovUk merged 77 commits into
mainfrom
620-bfl-dataset-card-on-dashboard-highlights-if-dataset-needs-updating
Nov 21, 2024
Merged

620 bfl dataset card on dashboard highlights if dataset needs updating#644
GeorgeGoodall-GovUk merged 77 commits into
mainfrom
620-bfl-dataset-card-on-dashboard-highlights-if-dataset-needs-updating

Conversation

@GeorgeGoodall-GovUk
Copy link
Copy Markdown
Contributor

@GeorgeGoodall-GovUk GeorgeGoodall-GovUk commented Nov 8, 2024

What type of PR is this? (check all applicable)

  • Feature

Description

Adds notification banners for due and overdue datasets

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

Preview Link: https://submit-pr-644.herokuapp.com/

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above.

  • Yes

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced deadline notices for datasets, enhancing user awareness of submission deadlines.
    • Added new HTML templates and macros for rendering deadline notifications.
    • Implemented middleware functions for managing dataset submission deadlines and notices.
    • Enhanced SQL queries to provide additional data fields related to deadlines.
    • Improved dataset overview and organisation overview pages with conditional rendering for notices.
  • Bug Fixes

    • Improved error handling for dataset submission deadlines and notices.
  • Documentation

    • Updated schemas to include new notice fields for datasets.
  • Tests

    • Expanded test coverage for dataset notices and deadline handling functionalities, ensuring robust validation of new features.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 8, 2024

Walkthrough

This pull request introduces several enhancements across multiple middleware, utility, and view files, primarily focused on managing dataset deadlines and notices. New utility functions, such as setNoticesFromSourceKey and getDeadlineHistory, are added to facilitate deadline checks and notice management. The schema for notices is updated, and new HTML templates are introduced for rendering notification banners. Additionally, tests are enhanced to cover these new functionalities, ensuring comprehensive validation of the changes made.

Changes

File Path Change Summary
src/middleware/datasetOverview.middleware.js Added setNoticesFromSourceKey function; renamed specification to datasetSpecification; updated SQL queries.
src/middleware/overview.middleware.js Added datasetSubmissionDeadlineCheck and addNoticesToDatasets functions; updated aggregateOverviewData signature.
src/routes/schemas.js Introduced DeadlineNoticeField schema; added notice field to OrgDatasetOverview and OrgDatasetTaskList.
src/services/performanceDbApi.js Updated SQL queries to include new fields; refined getTaskMessage for better error handling.
src/utils/utils.js Added requiredDatasets constant and getDeadlineHistory function for deadline calculations.
src/views/check/results/errors.html Updated import paths for components to absolute paths.
src/views/components/deadlineNotice.html Created new HTML template for deadline notices.
src/views/components/deadlineNoticeContent.html Added multiple Jinja2 macros for rendering deadline notices.
src/views/organisations/dataset-overview.html Imported deadlineNotice component and integrated it into the dataset overview page.
src/views/organisations/overview.html Added imports for notice components and adjusted logic for displaying dataset status.
test/unit/errorsPage.test.js Updated Nunjucks template configuration paths.
test/unit/middleware/datasetOverview.middleware.test.js Added tests for setNoticesFromSourceKey and updated existing tests for new data structure.
test/unit/middleware/overview.middleware.test.js Restructured tests to integrate new middleware functions and added tests for deadline checks.
test/unit/util.test.js Added tests for getDeadlineHistory function under various conditions.
test/unit/views/organisations/dataset-overview.test.js Added tests for rendering notices based on provided parameters.
test/unit/views/organisations/get-startedPage.test.js Updated import paths due to directory restructuring.
test/unit/views/organisations/issueDetailsPage.test.js Adjusted import paths without changing test logic.
test/unit/views/organisations/lpaOverviewPage.test.js Enhanced error handling and added tests for notification banners based on dataset notices.

Assessment against linked issues

Objective Addressed Explanation
Notify LPAs that their brownfield land data needs updating (#616)
Add notice banners to the top of the notice's dataset's details page (#616)
Update the LPA overview to include on the BFL card if their data is overdue (#638)

Possibly related PRs

  • 551 cookie banner #592: The changes in this PR introduce a cookie banner that is essential for compliance with regulations regarding user consent for cookie usage, which is directly related to the new middleware function setNoticesFromSourceKey in the main PR that processes notices based on dataset deadlines.
  • Add GA Support for Submit and update service #532: This PR integrates Google Analytics support, which is relevant to the main PR's changes as both involve handling user interactions and data processing, particularly in relation to notices and deadlines.
  • segment datasets into mandated and ODP on org overview page #645: The modifications in this PR segment datasets into mandated and ODP categories, which relates to the main PR's updates in processing dataset notices and their associated logic.
  • fix link #661: This PR fixes a broken link that could affect user navigation, which is indirectly related to the main PR's focus on enhancing user experience through improved middleware functions and data handling.

Suggested reviewers

  • DilwoarH

Poem

🐰 In the meadow where deadlines loom,
A notice hops, dispelling gloom.
With banners bright, it guides the way,
For datasets due, don’t delay!
Update your records, let none be missed,
For in the garden of data, all must exist! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

…dataset-card-on-dashboard-highlights-if-dataset-needs-updating
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 8, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 69.09% 4721 / 6833
🔵 Statements 69.09% 4721 / 6833
🔵 Functions 67.59% 194 / 287
🔵 Branches 82.28% 590 / 717
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/middleware/datasetOverview.middleware.js 68.48% 61.76% 28.57% 68.48% 11-31, 44-91, 112-116, 127-132, 194
src/middleware/overview.middleware.js 88.65% 84.61% 60% 88.65% 11-13, 25, 33, 41-43, 56-60, 106-108, 114-116, 151-153, 163-165, 203-204, 254-263
src/routes/schemas.js 100% 100% 100% 100%
src/services/performanceDbApi.js 64.3% 92.59% 35.71% 64.3% 49-77, 114-116, 179-183, 234-240, 251-265, 274-294, 298-306, 315-327, 338-365, 375-380
src/utils/utils.js 100% 100% 100% 100%
Generated in workflow #323 for commit 0a634cc by the Vitest Coverage Report Action

…dataset-card-on-dashboard-highlights-if-dataset-needs-updating
…on-dashboard-highlights-if-dataset-needs-updating
…dataset-card-on-dashboard-highlights-if-dataset-needs-updating
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Outside diff range and nitpick comments (7)
test/unit/views/organisations/lpaOverviewPage.test.js (2)

Line range hint 81-107: Improve maintainability of hint logic

The nested if-else conditions for determining hints make the code harder to maintain. Consider extracting this logic into a separate function using a more declarative approach.

Here's a suggested refactor:

+const getExpectedHint = (dataset) => {
+  const hintMap = {
+    'due': (dataset) => `You must update this dataset by ${dataset.notice.deadline}`,
+    'overdue': (dataset) => `Your ${datasetSlugToReadableName(dataset.dataset)} dataset is overdue`,
+    'Not submitted': () => 'Data URL not submitted',
+    'Needs fixing': () => 'in this dataset',
+    'Error': (dataset) => {
+      if (dataset.error) return dataset.error
+      const count = dataset.issue_count
+      if (count === 0) return `There are ${count} issues in this dataset`
+      if (count === 1) return `There is ${count} issue in this dataset`
+      return `There are ${count} issues in this dataset`
+    }
+  }
+
+  if (dataset.notice) {
+    if (!(dataset.notice.type in hintMap)) {
+      throw new Error('Notice type not recognised')
+    }
+    return hintMap[dataset.notice.type](dataset)
+  }
+
+  return hintMap[dataset.status]?.(dataset) ?? 'Data URL submitted'
+}

 it(`dataset cards are rendered with correct hints for dataset='${dataset.dataset}'`, () => {
-  let expectedHint = 'Data URL submitted'
-  if (dataset.notice) {
-    if (dataset.notice.type === 'due') {
-      expectedHint = `You must update this dataset by ${dataset.notice.deadline}`
-    } else if (dataset.notice.type === 'overdue') {
-      expectedHint = `Your ${datasetSlugToReadableName(dataset.dataset)} dataset is overdue`
-    } else {
-      throw new Error('Notice type not recognised')
-    }
-  } else if (dataset.status === 'Not submitted') {
-    expectedHint = 'Data URL not submitted'
-  } else if (dataset.status === 'Needs fixing') {
-    expectedHint = 'in this dataset'
-  } else if (dataset.status === 'Error') {
-    expectedHint = dataset.error || ''
-  } else if (dataset.status === 'Error' && dataset.issue_count === 0) {
-    expectedHint = `There are ${dataset.issue_count} issues in this dataset`
-  } else if (dataset.status === 'Error' && dataset.issue_count === 1) {
-    expectedHint = `There is ${dataset.issue_count} issue in this dataset`
-  } else if (dataset.status === 'Error' && dataset.issue_count > 1) {
-    expectedHint = `There are ${dataset.issue_count} issues in this dataset`
-  }
+  const expectedHint = getExpectedHint(dataset)
   const datasetCard = document.querySelector(`[data-dataset="${dataset.dataset}"]`)
   expect(datasetCard.querySelector('.govuk-task-list__hint').textContent.trim()).toContain(expectedHint)
 })

160-181: Improve notification banner test implementation

The current implementation uses mutable state and contains duplicated logic for determining notice text.

Consider this improved implementation:

+const getNoticeText = (dataset) => {
+  const baseText = `${datasetSlugToReadableName(dataset.dataset)} dataset`
+  
+  switch (dataset.notice.type) {
+    case 'due':
+      return {
+        header: `You must update your ${baseText} by ${dataset.notice.deadline}`
+      }
+    case 'overdue':
+      return {
+        header: `Your ${baseText} is overdue`,
+        hint: `It was due on ${dataset.notice.deadline}`
+      }
+    default:
+      throw new Error(`Unexpected notice type: ${dataset.notice.type}`)
+  }
+}

 it(`Renders the notice for dataset ${dataset.dataset}`, () => {
-  let expectedHeader
-  let expectedHint
-
-  if (dataset.notice.type === 'due') {
-    expectedHeader = `You must update your ${datasetSlugToReadableName(dataset.dataset)} dataset by ${dataset.notice.deadline}`
-  } else if (dataset.notice.type === 'overdue') {
-    expectedHeader = `Your ${datasetSlugToReadableName(dataset.dataset)} dataset is overdue`
-    expectedHint = `It was due on ${dataset.notice.deadline}`
-  }
+  const { header: expectedHeader, hint: expectedHint } = getNoticeText(dataset)
   const expectedLinkHref = `/organisations/${params.organisation.organisation}/${dataset.dataset}/get-started`

   expect(banner.textContent).toContain(expectedHeader)
   if (expectedHint) {
     expect(banner.textContent).toContain(expectedHint)
   }

   const link = banner.querySelector('.govuk-notification-banner__link')
   expect(link.getAttribute('href')).toEqual(expectedLinkHref)
 })
src/middleware/overview.middleware.js (2)

68-80: Consider enhancing type safety and documentation of the accumulator array

The orgStatsReducer function uses a numeric array for accumulation without clear indication of what each index represents.

Consider this enhancement:

-const orgStatsReducer = (accumulator, dataset) => {
+/**
+ * Reduces dataset information into counts of endpoints, issues, and errors
+ * @param {[number, number, number]} accumulator - Array of [endpointCount, needsFixingCount, errorCount]
+ * @param {{ endpoint?: string, status: string }} dataset - Dataset information
+ * @returns {[number, number, number]} Updated counts
+ */
+const orgStatsReducer = (accumulator, dataset) => {
   if (dataset.endpoint) accumulator[0]++
   if (dataset.status === 'Needs fixing') accumulator[1]++
   if (dataset.status === 'Error') accumulator[2]++
   return accumulator
 }

Line range hint 200-240: Add input validation and handle potential undefined values

The function needs additional validation to prevent runtime errors.

Apply these enhancements:

 export function aggregateOverviewData (req, res, next) {
   const { lpaOverview } = req
   if (!Array.isArray(lpaOverview)) {
     throw new Error('lpaOverview should be an array')
   }
+  if (lpaOverview.some(item => typeof item !== 'object' || !item.dataset)) {
+    throw new Error('Invalid lpaOverview item structure')
+  }
   const grouped = _.groupBy(lpaOverview, 'dataset')
   const datasets = []
   for (const [dataset, rows] of Object.entries(grouped)) {
     let numIssues = 0
     for (const row of rows) {
       if (row.status !== 'Needs fixing') {
         continue
       }
       if (row.issue_count) {
         const numFields = (row.fields ?? '').split(',').length
         if (row.issue_count >= row.entity_count) numIssues += numFields
         else numIssues += row.issue_count
       }
     }
+    const maxStatusRow = _.maxBy(rows, row => statusOrdering.get(row.status ?? 'Not submitted'))
     const info = {
       dataset,
       issue_count: numIssues,
-      endpoint: rows[0].endpoint,
-      error: rows[0].error,
-      status: _.maxBy(rows, row => statusOrdering.get(row.status)).status
+      endpoint: rows[0]?.endpoint,
+      error: rows[0]?.error,
+      status: maxStatusRow?.status ?? 'Not submitted'
     }
     datasets.push(info)
   }

   requiredDatasets.forEach(requiredDataset => {
     const hasDataset = datasets.findIndex(dataset => dataset.dataset === requiredDataset.dataset) >= 0
     if (!hasDataset) {
       datasets.push({
         dataset: requiredDataset.dataset,
         status: 'Not submitted'
       })
     }
   })

   req.datasets = datasets
   next()
 }
test/unit/middleware/overview.middleware.test.js (3)

147-147: Fix typo in test description

Change should't to shouldn't in the test description.


88-153: Consider adding edge cases to dataset aggregation tests

The test suite would benefit from additional edge cases:

  • Dataset with empty fields string
  • Dataset with duplicate field names
  • Dataset with very large number of fields

211-211: Consider timezone-safe date testing

The use of explicit timestamps in vi.setSystemTime could make tests fragile across different timezones. Consider using relative time offsets from a base date to make tests more robust.

-vi.setSystemTime(new Date('1996-03-03T00:00:00.000Z'))
+const baseDate = new Date('1996-04-17T10:00:00.000Z') // from mock
+vi.setSystemTime(new Date(baseDate.getTime() - (45 * 24 * 60 * 60 * 1000))) // 45 days before deadline

Also applies to: 227-227, 243-243, 254-254, 265-265

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between f64a5d6 and 5871cb3.

📒 Files selected for processing (5)
  • src/middleware/overview.middleware.js (8 hunks)
  • src/routes/schemas.js (2 hunks)
  • src/views/organisations/overview.html (2 hunks)
  • test/unit/middleware/overview.middleware.test.js (5 hunks)
  • test/unit/views/organisations/lpaOverviewPage.test.js (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/routes/schemas.js
  • src/views/organisations/overview.html
🧰 Additional context used
📓 Learnings (1)
test/unit/views/organisations/lpaOverviewPage.test.js (1)
Learnt from: GeorgeGoodall-GovUk
PR: digital-land/submit#510
File: test/unit/views/organisations/dataset-overview.test.js:3-3
Timestamp: 2024-11-12T10:13:49.419Z
Learning: Ensure to verify import paths in all relevant test files before flagging inconsistencies.
🪛 GitHub Check: test
test/unit/views/organisations/lpaOverviewPage.test.js

[failure] 155-155: test/unit/views/organisations/lpaOverviewPage.test.js
TypeError: params.datasets.forEach is not a function
❯ test/unit/views/organisations/lpaOverviewPage.test.js:155:19

🔇 Additional comments (1)
src/middleware/overview.middleware.js (1)

319-321: LGTM! Middleware chain order is correct

The middleware functions are arranged in the correct order to ensure proper data flow:

  1. aggregateOverviewData processes the overview data first
  2. datasetSubmissionDeadlineCheck checks deadlines using the processed data
  3. addNoticesToDatasets adds notices based on the deadline checks

Comment thread test/unit/views/organisations/lpaOverviewPage.test.js Outdated
Comment thread test/unit/views/organisations/lpaOverviewPage.test.js
Comment thread src/middleware/overview.middleware.js
Comment thread src/middleware/overview.middleware.js
Comment thread test/unit/middleware/overview.middleware.test.js
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
test/unit/views/organisations/lpaOverviewPage.test.js (1)

83-90: Improve notice type handling

The current if-else structure for notice types could be improved:

  1. The error message doesn't specify which notice type was received
  2. The code could be more maintainable using a lookup object

Consider this refactor:

-if (dataset.notice) {
-  if (dataset.notice.type === 'due') {
-    expectedHint = `You must update this dataset by ${dataset.notice.deadline}`
-  } else if (dataset.notice.type === 'overdue') {
-    expectedHint = `Your ${datasetSlugToReadableName(dataset.dataset)} dataset is overdue`
-  } else {
-    throw new Error('Notice type not recognised')
-  }
-}
+if (dataset.notice) {
+  const noticeHints = {
+    due: (deadline) => `You must update this dataset by ${deadline}`,
+    overdue: (_, dataset) => `Your ${datasetSlugToReadableName(dataset)} dataset is overdue`
+  };
+  const hintFn = noticeHints[dataset.notice.type];
+  if (!hintFn) {
+    throw new Error(`Unrecognised notice type: ${dataset.notice.type}`);
+  }
+  expectedHint = hintFn(dataset.notice.deadline, dataset.dataset);
+}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 5871cb3 and 8e2706e.

📒 Files selected for processing (1)
  • test/unit/views/organisations/lpaOverviewPage.test.js (6 hunks)
🧰 Additional context used
📓 Learnings (1)
test/unit/views/organisations/lpaOverviewPage.test.js (1)
Learnt from: GeorgeGoodall-GovUk
PR: digital-land/submit#510
File: test/unit/views/organisations/dataset-overview.test.js:3-3
Timestamp: 2024-11-12T10:13:49.419Z
Learning: Ensure to verify import paths in all relevant test files before flagging inconsistencies.
🪛 GitHub Check: test
test/unit/views/organisations/lpaOverviewPage.test.js

[failure] 173-173: test/unit/views/organisations/lpaOverviewPage.test.js > LPA Overview Page (seed: 1732031027266) > Renders the notice for dataset fugiat sunt dolore
TypeError: Cannot read properties of undefined (reading 'textContent')
❯ test/unit/views/organisations/lpaOverviewPage.test.js:173:23

🔇 Additional comments (1)
test/unit/views/organisations/lpaOverviewPage.test.js (1)

Line range hint 13-13: Fix non-deterministic test seed

Using new Date().getTime() as the seed will make tests non-deterministic, potentially causing flaky tests that pass sometimes and fail others.

Apply this diff to ensure consistent test results:

-const seed = new Date().getTime()
+const seed = 1731493378197

Comment thread test/unit/views/organisations/lpaOverviewPage.test.js Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
src/views/organisations/overview.html (2)

29-32: Consider defensive programming for notice access

The notice check could benefit from more robust validation. Consider using optional chaining or nullish coalescing.

-{% if dataset.notice %}
+{% if dataset.notice and dataset.notice.length %}

82-92: Consider consolidating duplicate notification loops

The notification loops for statutory and other datasets are identical. Consider extracting this into a reusable macro to reduce code duplication.

{% macro renderDatasetNotices(datasets) %}
  {% for dataset in datasets %}
    {% if dataset.notice %}
      {{ deadlineNotice(dataset.dataset, dataset.notice, organisation) }}
    {% endif %}
  {% endfor %}
{% endmacro %}

Then use it like:

{{ renderDatasetNotices(datasets.statutory) }}
{{ renderDatasetNotices(datasets.other) }}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 8e2706e and 4ff16d2.

📒 Files selected for processing (2)
  • src/views/organisations/overview.html (3 hunks)
  • test/unit/views/organisations/lpaOverviewPage.test.js (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/unit/views/organisations/lpaOverviewPage.test.js
🔇 Additional comments (3)
src/views/organisations/overview.html (3)

5-6: LGTM: Component imports are properly structured

The new imports for deadline notice components align well with the PR's objective of implementing notification banners.


13-13: Verify URL structure changes

The change from dataset.slug to dataset.dataset in URLs and data attributes appears intentional. Please verify this change is consistent with your routing configuration.

Also applies to: 18-18, 23-23


135-140: LGTM: Clear membership status presentation

The addition of organisation membership status provides valuable context for users, clearly indicating whether the organisation is part of the Open Digital Planning programme.

Copy link
Copy Markdown
Contributor

@DilwoarH DilwoarH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor changes to test file structure. The most comment method is the Arrange-Act-Assert Pattern:

https://learn.microsoft.com/en-us/visualstudio/test/unit-test-basics?view=vs-2022#write-your-tests

it('should return the correct sum when adding two numbers', () => {
    // Arrange
    const a = 2, b = 3;

    // Act
    const result = add(a, b);

    // Assert
    expect(result).toBe(5);
});

Comment thread src/views/components/deadlineNotice.html Outdated
Comment thread test/unit/views/organisations/dataset-overview.test.js
Comment thread test/unit/views/organisations/dataset-overview.test.js
Comment thread test/unit/views/organisations/lpaOverviewPage.test.js
GeorgeGoodall-GovUk and others added 4 commits November 21, 2024 09:32
Co-authored-by: Dilwoar Hussain <DilwoarH@users.noreply.github.com>
Co-authored-by: Dilwoar Hussain <DilwoarH@users.noreply.github.com>
Co-authored-by: Dilwoar Hussain <DilwoarH@users.noreply.github.com>
Co-authored-by: Dilwoar Hussain <DilwoarH@users.noreply.github.com>
@DilwoarH
Copy link
Copy Markdown
Contributor

Code looks all good now - over to product and design sign off

@CharliePatterson @alextea

@alextea
Copy link
Copy Markdown
Contributor

alextea commented Nov 21, 2024

Looks good to me 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BfL dataset card on dashboard highlights if dataset needs updating Notify LPAs that their brownfield land data needs updating

7 participants