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 - topic e2e test #617

Merged
merged 3 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/components/SidebarFolder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function SidebarFolder({folder, children}) {

return (
<div className={`collapsible-box collapsible-box--active-within ${open ? 'collapsible-box--open' : 'collapsible-box--closed'}`}>
<div className="collapsible-box__header" onClick={() => setOpen(!open)} role='button'>
<div className="collapsible-box__header" onClick={() => setOpen(!open)} role='button' data-test-id="toggle-box-button">
<h4 className="collapsible-box__header-title">{folder.name}</h4>
<div className="collapsible-box__header-caret">
<i className="icon--arrow-start"></i>
Expand All @@ -24,4 +24,4 @@ export function SidebarFolder({folder, children}) {
SidebarFolder.propTypes = {
folder: PropTypes.object,
children: PropTypes.node,
};
};
2 changes: 1 addition & 1 deletion assets/search/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class SearchBar extends React.Component<any, any> {
<path clipRule="evenodd" d="m9 18c4.9706 0 9-4.0294 9-9 0-4.97056-4.0294-9-9-9-4.97056 0-9 4.02944-9 9 0 4.9706 4.02944 9 9 9zm4.9884-12.58679-3.571 3.57514 3.5826 3.58675-1.4126 1.4143-3.58252-3.5868-3.59233 3.5965-1.41255-1.4142 3.59234-3.59655-3.54174-3.54592 1.41254-1.41422 3.54174 3.54593 3.57092-3.57515z" fill="var(--color-text)" fillRule="evenodd" opacity="1"/>
</svg>
</button>
<button className='search__button-submit' type='submit' aria-label={gettext('Search')}>
<button className='search__button-submit' type='submit' aria-label={gettext('Search')} data-test-id="search-submit-button">
<i className="icon--search"></i>
</button>
</div>
Expand Down
12 changes: 9 additions & 3 deletions assets/search/components/TopicFolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export function TopicFolder({
<div
key={folder._id}
className="simple-card__group"
data-test-id={`folder-card--${folder.name}`}
data-test-id="folder-card"
data-test-value={folder.name}
ref={setNodeRef}
>
{editing ? (
Expand All @@ -95,12 +96,15 @@ export function TopicFolder({
<button
type="button"
className="icon-button icon-button--tertiary"
data-test-id="collapse"
title={gettext('Close')}
onClick={() => setOpened(false)}
><i className="icon--minus"></i></button>
) : (
<button
type="button" className="icon-button icon-button--tertiary"
type="button"
className="icon-button icon-button--tertiary"
data-test-id="expand"
title={gettext('Open')}
onClick={() => setOpened(true)}
disabled={topics.length === 0}
Expand All @@ -121,7 +125,9 @@ export function TopicFolder({
}}
ref={buttonRef}
className="icon-button icon-button--tertiary"
aria-label={gettext('Folder Actions')}>
aria-label={gettext('Folder Actions')}
data-test-id="menu"
>
<i className='icon--more'></i>
</button>
{
Expand Down
2 changes: 2 additions & 0 deletions assets/search/components/TopicFolderActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export function TopicFolderActions({folder, toggleFolderPopover, folderPopover,
toggle(e);
action.callback();
}}
data-test-id="action-folder"
data-test-value={action.name}
>
<i className={'icon--' + action.icon} />
{action.name}
Expand Down
1 change: 1 addition & 0 deletions assets/search/components/TopicFolderEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function TopicFolderEditor ({folder, onSave, onCancel, error}) {
type="button"
className="icon-button icon-button--secondary icon-button--bordered icon-button--small"
aria-label={gettext('Cancel')}
data-test-id="create-folder--cancel-btn"
title={gettext('Cancel')}
onClick={() => onCancel()}
>
Expand Down
2 changes: 1 addition & 1 deletion assets/search/components/TopicItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';

export function TopicItem({topic, isActive, onClick, newItems}: any) {
return (
<li className="topic-list__item">
<li className="topic-list__item" data-test-id="topic-list-item" data-test-value={topic.label}>
<a className={`topic-list__item-link ${isActive ? 'topic-list__item-link--active' : ''}`}
aria-selected={isActive} href=""
onClick={(event) => onClick(event, topic)}
Expand Down
2 changes: 1 addition & 1 deletion assets/user-profile/components/UserProfileApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class UserProfileApp extends React.Component<any, any> {
<h5 className="profile__profile-content-title">
{links.find((link: any) => link.active).label}
</h5>
<button className="profile__profile-content-close" aria-label={gettext('Close')} role="button" onClick={this.hideModal}>
<button className="profile__profile-content-close" aria-label={gettext('Close')} role="button" onClick={this.hideModal} data-test-id="profile-page-close">
<i className="icon--close-thin" />
</button>
</section>
Expand Down
Loading
Loading