Skip to content

Commit

Permalink
nth card feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
cea2aj committed Jun 11, 2021
1 parent f567488 commit 84787b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/acceptance/blocks/verticalresults.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class VerticalResults {
this._selector = Selector('.yxt-Results')
this._resultsWrapper = Selector('.Answers-resultsWrapper');
this._focusedCard = Selector('.yxt-Card--pinFocused');
this._firstCard = Selector('.yxt-Card');
this._getNthCard = index => Selector(`.yxt-Card[data-opts*="${index}"]`);
this._noResults = Selector('.yxt-AlternativeVerticals-noResultsInfo');
this._resultsCount = Selector('.yxt-VerticalResultsCount-total');
this._resultsCountStart = Selector('.yxt-VerticalResultsCount-start');
Expand Down Expand Up @@ -52,10 +52,10 @@ class VerticalResults {
}

/**
* Clicks the first result card
* Clicks the card specified by the card index
*/
async clickFirstCard () {
await t.click(this._firstCard);
async clickCard (cardIndex) {
await t.click(this._getNthCard(cardIndex));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/suites/vertical-full-page-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test('Default initial search works and is enabled by default', async t => {

test('Clicking off of a card removes the focus', async t => {
await SearchBar.submitQuery('virginia');
await VerticalResults.clickFirstCard();
await VerticalResults.clickCard(1);
const isCardFocused = await VerticalResults.isCardFocused();
await t.expect(isCardFocused).ok();
await ThemeMap.clickMap();
Expand Down

0 comments on commit 84787b0

Please sign in to comment.