From c3ab6b8aca7fec620f2b15fdee691685740bfecc Mon Sep 17 00:00:00 2001
From: xgui3783 <xgui3783@gmail.com>
Date: Fri, 27 Mar 2020 10:59:39 +0100
Subject: [PATCH] fix e2e

---
 e2e/src/advanced/favDatasets.e2e-spec.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/e2e/src/advanced/favDatasets.e2e-spec.js b/e2e/src/advanced/favDatasets.e2e-spec.js
index 144b1f30b..1d3ebebe3 100644
--- a/e2e/src/advanced/favDatasets.e2e-spec.js
+++ b/e2e/src/advanced/favDatasets.e2e-spec.js
@@ -3,7 +3,7 @@ const { AtlasPage } = require('../util')
 const template = 'ICBM 2009c Nonlinear Asymmetric'
 const area = 'Area hOc1 (V1, 17, CalcS)'
 
-const receptorName = `Density measurements of different receptors for Area hOc1`
+const receptorName = `Density measurements of different receptors for Area hOc1 (V1, 17, CalcS) [human, v1.0]`
 const pmapName = `Probabilistic cytoarchitectonic map of Area hOc1 (V1, 17, CalcS) (v2.4)`
 
 // TODO finish writing tests
@@ -171,7 +171,7 @@ describe(`fav'ing dataset`, () => {
       expect(number2).toEqual(0)
     })
 
-    it('click unpin in dataset detail sheet unpins fav, but also allows user to undo', async () => {
+    it('> click unpin in dataset detail sheet unpins fav, but also allows user to undo', async () => {
 
       const datasets = await iavPage.getVisibleDatasets()
 
@@ -183,6 +183,9 @@ describe(`fav'ing dataset`, () => {
 
       const numberOfFav = await iavPage.getNumberOfFavDataset()
       expect(numberOfFav).toEqual(1)
+      
+      // this wait is unfortunately necessary, as the snack bar sometimes obscures the unpin this dataset button	
+      await iavPage.wait(5000)
 
       await iavPage.clickModalBtnByText(/unpin\ this\ dataset/i)
       await iavPage.wait(500)
-- 
GitLab