Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wire-Filter e2e #648

Merged
merged 3 commits into from
Nov 23, 2023
Merged

Wire-Filter e2e #648

merged 3 commits into from
Nov 23, 2023

Conversation

dzonidoo
Copy link
Contributor

NHUB-433

import {setup, addDefaultResources, addResources, addAllWireItems} from '../../support/e2e';
import {NewshubLayout} from '../../support/pages/layout';

export const WIRE_ITEMS = {
Copy link
Member

Choose a reason for hiding this comment

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

are those any different to those ?

Copy link
Contributor Author

@dzonidoo dzonidoo Nov 2, 2023

Choose a reason for hiding this comment

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

yep... in created date...

@@ -5,7 +5,7 @@ export default function FilterItem({bucket, group, toggleFilter, groupFilter}: a
const isActive = groupFilter.indexOf(bucket.key) !== -1;

return (
<div className="form-check">
<div className="form-check" data-test-id="checkbox" data-test-value={bucket.key}>
Copy link
Member

Choose a reason for hiding this comment

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

not sure if we need that, is checkbox really an id if it's used many times?
something like

data-test-id={`filter-${bucket.key}`}

might be better

/**
SEARCH
*/
cy.get('[data-test-id="sidenav-link-wire"]').click();
Copy link
Member

Choose a reason for hiding this comment

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

would be good to extend the wire page helper and add methods like:

wirePage.openSideNav();
wirePage.search('Sydney');

this would make it more readable in general


cy.url().should('include', 'Sydney');

cy.get(`[data-test-id="wire-item"][data-test-value="${WIRE_ITEMS.syd_weather_1._id}"]`).should('exist');
cy.get(`[data-test-id="wire-item"][data-test-value="${WIRE_ITEMS.bris_traffic_1._id}"]`).should('not.exist');
cy.get(`[data-test-id="wire-item"][data-test-value="${WireItems.item_1._id}"]`).should('exist');
Copy link
Member

Choose a reason for hiding this comment

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

you could also make a helper for this like WirePage.item(WireItems.item_1).should('exist');

@petrjasek petrjasek added this to the v2.6 milestone Nov 6, 2023
@petrjasek petrjasek merged commit a3b1af0 into superdesk:develop Nov 23, 2023
7 checks passed
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.

2 participants