@@ -34,16 +34,20 @@ describe("manage queries modal scenarios, developer role", () => {
3434 } ) ;
3535 it ( "Create Queries" , ( ) => {
3636 cy . waitUntil ( ( ) => toolbar . getExploreToolbarIcon ( ) ) . click ( ) ;
37+ browsePage . clickTableView ( ) ;
3738 browsePage . waitForSpinnerToDisappear ( ) ;
3839 browsePage . waitForHCTableToLoad ( ) ;
39- entitiesSidebar . getBaseEntityDropdown ( ) . click ( ) ;
40+ entitiesSidebar . openBaseEntityDropdown ( ) ;
4041 entitiesSidebar . selectBaseEntityOption ( "Customer" ) ;
42+ entitiesSidebar . getBaseEntityOption ( "Customer" ) . should ( "be.visible" ) ;
43+ entitiesSidebar . openBaseEntityFacets ( "Customer" ) ;
4144 browsePage . getFacetItemCheckbox ( "name" , "Adams Cole" ) . click ( ) ;
4245 browsePage . getSelectedFacets ( ) . should ( "exist" ) ;
4346 browsePage . getGreySelectedFacets ( "Adams Cole" ) . should ( "exist" ) ;
4447 browsePage . getFacetApplyButton ( ) . click ( ) ;
4548 browsePage . clickColumnTitle ( 2 ) ;
4649 browsePage . waitForSpinnerToDisappear ( ) ;
50+ entitiesSidebar . backToMainSidebar ( ) . click ( ) ;
4751 browsePage . getSaveModalIcon ( ) . click ( ) ;
4852 browsePage . waitForSpinnerToDisappear ( ) ;
4953 browsePage . getSaveQueryName ( ) . should ( "be.visible" ) ;
@@ -61,6 +65,7 @@ describe("manage queries modal scenarios, developer role", () => {
6165 } ) ;
6266 it ( "manage queries, edit, apply, delete query" , ( ) => {
6367 cy . waitUntil ( ( ) => toolbar . getExploreToolbarIcon ( ) ) . click ( ) ;
68+ browsePage . clickTableView ( ) ;
6469 browsePage . waitForSpinnerToDisappear ( ) ;
6570 browsePage . waitForHCTableToLoad ( ) ;
6671 //edit query
@@ -82,14 +87,16 @@ describe("manage queries modal scenarios, developer role", () => {
8287 queryComponent . getManageQueryModal ( ) . should ( "not.exist" ) ;
8388 browsePage . getSelectedQuery ( ) . should ( "contain" , "select a query" ) ;
8489 browsePage . getSelectedQueryDescription ( ) . should ( "contain" , "" ) ;
85- browsePage . getResetQueryButton ( ) . should ( "be.visible " ) ;
90+ browsePage . getResetQueryButton ( ) . should ( "exist " ) ;
8691
8792 browsePage . getSaveQueriesDropdown ( ) . click ( ) ;
8893 browsePage . getQueryOption ( "editedQuery" ) . should ( "not.exist" ) ;
8994 browsePage . getSaveQueriesDropdown ( ) . click ( ) ;
9095 browsePage . waitForSpinnerToDisappear ( ) ;
91- entitiesSidebar . getBaseEntityDropdown ( ) . click ( ) ;
96+ entitiesSidebar . removeSelectedBaseEntity ( ) ;
97+ entitiesSidebar . openBaseEntityDropdown ( ) ;
9298 entitiesSidebar . selectBaseEntityOption ( "Person" ) ;
99+ entitiesSidebar . getBaseEntityOption ( "Person" ) . should ( "be.visible" ) ;
93100 cy . waitUntil ( ( ) => browsePage . getDetailInstanceViewIcon ( "/json/persons/last-name-dob-custom1.json" ) , { timeout : 10000 } ) . click ( { force : true } ) ;
94101 browsePage . waitForSpinnerToDisappear ( ) ;
95102 } ) ;
@@ -137,21 +144,25 @@ describe("manage queries modal scenarios, developer role", () => {
137144 queryComponent . getManageQueryModal ( ) . should ( "not.exist" ) ;
138145 } ) ;
139146
140- //THIS FAILS UNTIL ENTITY SPECIFIC FACETS PR IS IN (DHFPROD-7950), needs to use entity specific panel facets instead entity properties panel
141- it . skip ( "verify manage queries modal visibility and removing query scenario on the detail page" , ( ) => {
147+ it ( "verify manage queries modal visibility and removing query scenario on the detail page" , ( ) => {
142148 //create a query
143149 cy . waitUntil ( ( ) => toolbar . getExploreToolbarIcon ( ) ) . click ( ) ;
150+ browsePage . clickTableView ( ) ;
144151 browsePage . waitForSpinnerToDisappear ( ) ;
145- entitiesSidebar . getBaseEntityDropdown ( ) . click ( "right" ) ;
152+ browsePage . waitForHCTableToLoad ( ) ;
153+ entitiesSidebar . openBaseEntityDropdown ( ) ;
146154 entitiesSidebar . selectBaseEntityOption ( "All Entities" ) ;
147- browsePage . waitForSpinnerToDisappear ( ) ;
148- entitiesSidebar . getBaseEntityDropdown ( ) . click ( ) ;
155+ entitiesSidebar . getBaseEntityOption ( "All Entities" ) . should ( "be.visible" ) ;
156+ entitiesSidebar . openBaseEntityDropdown ( ) ;
149157 entitiesSidebar . selectBaseEntityOption ( "Person" ) ;
158+ entitiesSidebar . getBaseEntityOption ( "Person" ) . should ( "be.visible" ) ;
159+ entitiesSidebar . openBaseEntityFacets ( "Person" ) ;
150160 browsePage . getShowMoreLink ( "fname" ) . click ( ) ;
151161 browsePage . getFacetItemCheckbox ( "fname" , "Alice" ) . click ( ) ;
152162 browsePage . getSelectedFacets ( ) . should ( "exist" ) ;
153163 browsePage . getFacetApplyButton ( ) . click ( ) ;
154164 browsePage . waitForSpinnerToDisappear ( ) ;
165+ entitiesSidebar . backToMainSidebar ( ) . click ( ) ;
155166 browsePage . getSaveModalIcon ( ) . click ( ) ;
156167 browsePage . waitForSpinnerToDisappear ( ) ;
157168 browsePage . getSaveQueryName ( ) . should ( "be.visible" ) ;
@@ -187,16 +198,18 @@ describe("manage queries modal scenarios, developer role", () => {
187198 browsePage . getTotalDocuments ( ) . should ( "not.be.equal" , 0 ) ;
188199 } ) ;
189200
190- //THIS FAILS UNTIL ENTITY SPECIFIC FACETS PR IS IN (DHFPROD-7950), needs to use entity specific panel facets instead entity properties panel
191- it . skip ( "verify query selection from All Data view page, doesn't stay on card view" , ( ) => {
201+ it ( "verify query selection from All Data view page, doesn't stay on card view" , ( ) => {
202+ browsePage . getClearAllFacetsButton ( ) . click ( ) ;
192203 //create a query first
193- entitiesSidebar . getBaseEntityDropdown ( ) . click ( ) ;
204+ entitiesSidebar . openBaseEntityDropdown ( ) ;
194205 entitiesSidebar . selectBaseEntityOption ( "Person" ) ;
195- browsePage . getShowMoreLink ( "fname" ) . click ( ) ;
206+ entitiesSidebar . getBaseEntityOption ( "Person" ) . should ( "be.visible" ) ;
207+ entitiesSidebar . openBaseEntityFacets ( "Person" ) ;
196208 browsePage . getFacetItemCheckbox ( "fname" , "Alice" ) . click ( ) ;
197209 browsePage . getSelectedFacets ( ) . should ( "exist" ) ;
198210 browsePage . getFacetApplyButton ( ) . click ( ) ;
199211 browsePage . waitForSpinnerToDisappear ( ) ;
212+ entitiesSidebar . backToMainSidebar ( ) . click ( ) ;
200213 browsePage . getSaveModalIcon ( ) . click ( ) ;
201214 browsePage . waitForSpinnerToDisappear ( ) ;
202215 browsePage . getSaveQueryName ( ) . should ( "be.visible" ) ;
@@ -217,7 +230,7 @@ describe("manage queries modal scenarios, developer role", () => {
217230 //check table rows
218231 browsePage . getHCTableRows ( ) . should ( "have.length" , 1 ) ;
219232 //check table columns
220- browsePage . getTableColumns ( ) . should ( "have.length" , 6 ) ;
233+ browsePage . getTableColumns ( ) . should ( "have.length" , 9 ) ;
221234 //Check query facet is applied
222235 browsePage . getSelectedFacet ( "Alice" ) . should ( "exist" ) ;
223236
@@ -228,14 +241,18 @@ describe("manage queries modal scenarios, developer role", () => {
228241 queryComponent . getManageQueryModal ( ) . should ( "not.exist" ) ;
229242 } ) ;
230243
231- //THIS FAILS UNTIL ENTITY SPECIFIC FACETS PR IS IN (DHFPROD-7950), needs to use entity specific panel facets instead entity properties panel
232- it . skip ( "verify applying previously saved query scenario on the detail page" , ( ) => {
244+ it ( "verify applying previously saved query scenario on the detail page" , ( ) => {
245+ entitiesSidebar . toggleEntitiesView ( ) ;
246+ entitiesSidebar . openBaseEntityDropdown ( ) ;
247+ entitiesSidebar . selectBaseEntityOption ( "Person" ) ;
248+ entitiesSidebar . getBaseEntityOption ( "Person" ) . should ( "be.visible" ) ;
233249 //create a query
234- browsePage . getShowMoreLink ( "fname" ) . click ( ) ;
250+ entitiesSidebar . openBaseEntityFacets ( "Person" ) ;
235251 browsePage . getFacetItemCheckbox ( "fname" , "Alice" ) . click ( ) ;
236252 browsePage . getSelectedFacets ( ) . should ( "exist" ) ;
237253 browsePage . getFacetApplyButton ( ) . click ( ) ;
238254 browsePage . waitForSpinnerToDisappear ( ) ;
255+ entitiesSidebar . backToMainSidebar ( ) . click ( ) ;
239256 browsePage . getSaveModalIcon ( ) . click ( ) ;
240257 browsePage . waitForSpinnerToDisappear ( ) ;
241258 browsePage . getSaveQueryName ( ) . should ( "be.visible" ) ;
@@ -245,8 +262,11 @@ describe("manage queries modal scenarios, developer role", () => {
245262 browsePage . getManageQueryCloseIcon ( ) . click ( ) ;
246263
247264 //open record instance view for a document of a different entity
248- entitiesSidebar . getBaseEntityDropdown ( ) . click ( ) ;
265+ entitiesSidebar . removeSelectedBaseEntity ( ) ;
266+ browsePage . getClearAllFacetsButton ( ) . click ( ) ;
267+ entitiesSidebar . openBaseEntityDropdown ( ) ;
249268 entitiesSidebar . selectBaseEntityOption ( "Customer" ) ;
269+ entitiesSidebar . getBaseEntityOption ( "Customer" ) . should ( "be.visible" ) ;
250270 cy . get ( "#instance" ) . first ( ) . click ( { force : true } ) ;
251271 cy . waitForAsyncRequest ( ) ;
252272 browsePage . waitForSpinnerToDisappear ( ) ;
@@ -264,14 +284,16 @@ describe("manage queries modal scenarios, developer role", () => {
264284 cy . waitForAsyncRequest ( ) ;
265285 browsePage . waitForSpinnerToDisappear ( ) ;
266286 browsePage . getTotalDocuments ( ) . should ( "not.be.equal" , 0 ) ;
287+ entitiesSidebar . openBaseEntityFacets ( "Person" ) ;
267288 browsePage . getFacetItemCheckbox ( "fname" , "Alice" ) . should ( "be.checked" ) ;
268289 browsePage . getAppliedFacets ( "Alice" ) . should ( "exist" ) ;
290+ entitiesSidebar . backToMainSidebar ( ) . click ( ) ;
269291 browsePage . getSelectedQuery ( ) . should ( "contain" , "personQuery" ) ;
270292 } ) ;
271293
272- //This builds upon the skipped tests above, unskip when DHFPROD-7950 is merged and above tests are reworked to use entity specific panel facets
273- it . skip ( "verify editing previously saved query, updates the currently applied query name in browse page" , ( ) => {
294+ it ( "verify editing previously saved query, updates the currently applied query name in browse page" , ( ) => {
274295 cy . waitUntil ( ( ) => toolbar . getExploreToolbarIcon ( ) ) . click ( ) ;
296+ browsePage . clickTableView ( ) ;
275297 browsePage . waitForSpinnerToDisappear ( ) ;
276298 browsePage . waitForHCTableToLoad ( ) ;
277299 browsePage . getSaveQueriesDropdown ( ) . should ( "be.visible" ) ;
0 commit comments