Skip to content

Commit

Permalink
Back to the data-test statistics-label settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea-Guevara committed Oct 23, 2024
1 parent 9efa90f commit 941cb99
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/collection-statistics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Collection Statistics Page', () => {

// Verify / wait until "Total Visits" table's label is non-empty
// (This table loads these labels asynchronously, so we want to wait for them before analyzing page)
cy.get('table[data-test="TotalVisits"] td[data-test="statistics-label"]').should('have.length.greaterThan', 0).contains(REGEX_MATCH_NON_EMPTY_TEXT);
cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').contains(REGEX_MATCH_NON_EMPTY_TEXT);

// Analyze <ds-collection-statistics-page> for accessibility issues
testA11y('ds-collection-statistics-page');
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/community-statistics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Community Statistics Page', () => {

// Verify / wait until "Total Visits" table's label is non-empty
// (This table loads these labels asynchronously, so we want to wait for them before analyzing page)
cy.get('table[data-test="TotalVisits"] td[data-test="statistics-label"]').contains(REGEX_MATCH_NON_EMPTY_TEXT);
cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').contains(REGEX_MATCH_NON_EMPTY_TEXT);

// Analyze <ds-community-statistics-page> for accessibility issues
testA11y('ds-community-statistics-page');
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/homepage-statistics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Site Statistics Page', () => {

// Verify / wait until "Total Visits" table's *last* label is non-empty
// (This table loads these labels asynchronously, so we want to wait for them before analyzing page)
cy.get('table[data-test="TotalVisits"] td[data-test="statistics-label"]').last().contains(REGEX_MATCH_NON_EMPTY_TEXT);
cy.get('table[data-test="TotalVisits"] th[data-test="statistics-label"]').last().contains(REGEX_MATCH_NON_EMPTY_TEXT);
// Wait an extra 500ms, just so all entries in Total Visits have loaded.
cy.wait(500);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ <h2 class="m-1">

<tr *ngFor="let point of report.points"
class="{{point.id}}-data">
<td scope="row" data-test="statistics-label">
<th scope="row" data-test="statistics-label">
{{ getLabel(point) | async }}
</td>
</th>
<td *ngFor="let header of headers"
class="{{point.id}}-{{header}}-data">
{{ point.values[header] }}
Expand Down

0 comments on commit 941cb99

Please sign in to comment.