Skip to content

Commit

Permalink
remove broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
cea2aj committed Jun 14, 2021
1 parent a1e4711 commit 2e5874b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 57 deletions.
2 changes: 1 addition & 1 deletion tests/acceptance/blocks/thememap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ThemeMap {
constructor () {
this._pin = Selector('.yxt-Pin button');
this._pinCluster = Selector('.yxt-PinCluster button');
this._canvas = Selector('.Answers-mapWrapper');
this._canvas = Selector('.Answers-map');
this._searchThisAreaToggle = Selector('.Answers-searchThisAreaToggleLabel');
this._searchThisAreaButton = Selector('.js-searchThisAreaButton');
}
Expand Down
103 changes: 47 additions & 56 deletions tests/acceptance/suites/vertical-full-page-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,66 +7,57 @@ import Pagination from '../blocks/pagination';
fixture`Vertical Full Page Map`
.page(`http://localhost:${PORT}/locations_full_page_map`)

// test('Can search and get results', async t => {
// await SearchBar.submitQuery('virginia');
// const isResultsPresent = await VerticalResults.isResultsPresent();
// await t.expect(isResultsPresent).ok();
// });

// test('Clicking on a pin focuses on a results card', async t => {
// await SearchBar.submitQuery('virginia');
// let isCardFocused = await VerticalResults.isCardFocused();
// await t.expect(isCardFocused).notOk();
// await ThemeMap.selectPin();
// isCardFocused = await VerticalResults.isCardFocused();
// await t.expect(isCardFocused).ok();
// });
test('Can search and get results', async t => {
await SearchBar.submitQuery('virginia');
const isResultsPresent = await VerticalResults.isResultsPresent();
await t.expect(isResultsPresent).ok();
});

// test('Search when map moves works', async t => {
// await SearchBar.submitQuery('virginia');
// const resultsCountBeforeDrag = await VerticalResults.getNumResults();
// await ThemeMap.dragLeft();
// await ThemeMap.dragLeft();
// const resultsCountAfterDrag = await VerticalResults.getNumResults();
// await t.expect(resultsCountBeforeDrag !== resultsCountAfterDrag).ok();
// });
test('Clicking on a pin focuses on a results card', async t => {
await SearchBar.submitQuery('virginia');
let isCardFocused = await VerticalResults.isCardFocused();
await t.expect(isCardFocused).notOk();
await ThemeMap.selectPin();
isCardFocused = await VerticalResults.isCardFocused();
await t.expect(isCardFocused).ok();
});

// test('Search this area button works', async t => {
// await SearchBar.submitQuery('virginia');
// await ThemeMap.toggleSearchThisArea();
// const resultsCountBeforeDrag = await VerticalResults.getNumResults();
// await ThemeMap.dragLeft();
// await ThemeMap.clickSearchThisAreaButton();
// const resultsCountAfterDrag = await VerticalResults.getNumResults();
// await t.expect(resultsCountBeforeDrag !== resultsCountAfterDrag).ok();
// });
test('Search when map moves works', async t => {
await SearchBar.submitQuery('virginia');
const resultsCountBeforeDrag = await VerticalResults.getNumResults();
await ThemeMap.dragLeft();
await ThemeMap.dragLeft();
const resultsCountAfterDrag = await VerticalResults.getNumResults();
await t.expect(resultsCountBeforeDrag !== resultsCountAfterDrag).ok();
});

// test('Default initial search works and is enabled by default', async t => {
// const resultsCount = await VerticalResults.getNumResults();
// await t.expect(resultsCount).ok();
// });
test('Search this area button works', async t => {
await SearchBar.submitQuery('virginia');
await ThemeMap.toggleSearchThisArea();
const resultsCountBeforeDrag = await VerticalResults.getNumResults();
await ThemeMap.dragLeft();
await ThemeMap.clickSearchThisAreaButton();
const resultsCountAfterDrag = await VerticalResults.getNumResults();
await t.expect(resultsCountBeforeDrag !== resultsCountAfterDrag).ok();
});

test('Clicking off of a card removes the focus', async t => {
await VerticalResults.clickCard(0);
const isCardFocused = await VerticalResults.isCardFocused();
await t.expect(isCardFocused).ok();
await ThemeMap.clickMap();
const isCardFocusedAfterMapClick = await VerticalResults.isCardFocused();
await t.expect(isCardFocusedAfterMapClick).notOk();
test('Default initial search works and is enabled by default', async t => {
const resultsCount = await VerticalResults.getNumResults();
await t.expect(resultsCount).ok();
});

// test('Pagination works', async t => {
// const initialResultsOffset = await VerticalResults.getResultsOffset();
// await Pagination.nextResults();
// const updatedResultsOffset = await VerticalResults.getResultsOffset();
// await t.expect(initialResultsOffset).notEql(updatedResultsOffset);
// });
test('Pagination works', async t => {
const initialResultsOffset = await VerticalResults.getResultsOffset();
await Pagination.nextResults();
const updatedResultsOffset = await VerticalResults.getResultsOffset();
await t.expect(initialResultsOffset).notEql(updatedResultsOffset);
});

// test('Pagination scrolls the results to the top', async t => {
// await VerticalResults.scrollToBottom();
// const scrollTop = await VerticalResults.getScrollTop();
// await t.expect(scrollTop).notEql(0);
// await Pagination.nextResults();
// const scrollTopAfterPagination = await VerticalResults.getScrollTop();
// await t.expect(scrollTopAfterPagination).eql(0);
// });
test('Pagination scrolls the results to the top', async t => {
await VerticalResults.scrollToBottom();
const scrollTop = await VerticalResults.getScrollTop();
await t.expect(scrollTop).notEql(0);
await Pagination.nextResults();
const scrollTopAfterPagination = await VerticalResults.getScrollTop();
await t.expect(scrollTopAfterPagination).eql(0);
});

0 comments on commit 2e5874b

Please sign in to comment.