Skip to content

Commit

Permalink
Merge pull request Marklogic-retired#48 in PROD/explorer-ui from ~TIS…
Browse files Browse the repository at this point in the history
…ANGUL/explorer-ui:timur/DHFPROD-3218 to develop

* commit '71d64f8ab93ebe4f5a181507d575394c4f5768e5':
  modified gitignore
  uninstal cypress from the exprorer level
  removed *.xml
  change user to admin
  add test user1
  add test results directory
  fixed flows again
  fixed flows
  change test user
  fixed tests and added junit report
  • Loading branch information
Bruce An authored and Bruce An committed Oct 10, 2019
2 parents 8f8ef62 + 71d64f8 commit 2118112
Show file tree
Hide file tree
Showing 13 changed files with 720 additions and 988 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# testing
/coverage
/e2e/cypress/screenshots
/e2e/results/*

# production
/build
Expand Down
7 changes: 6 additions & 1 deletion e2e/cypress.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"video": false,
"baseUrl": "http://localhost:3000"
"baseUrl": "http://localhost:3000",
"reporter": "junit",
"reporterOptions": {
"mochaFile": "results/cypress-report.xml",
"toConsole": true
}
}
3 changes: 2 additions & 1 deletion e2e/cypress/integration/authorization.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ describe('login', () => {
//TODO doesn't work
});

it('navigates to /browse on seccessful login', () => {
it('navigates to /view on seccessful login', () => {
cy.fixture('users').then(user => {
cy.login(user.username, user.password)
.wait(500)
.url()
.should('include', '/view');
})
Expand Down
9 changes: 2 additions & 7 deletions e2e/cypress/integration/scenarios.json.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ViewPage from '../support/pages/view';
import BrowsePage from '../support/pages/browse';
import DetailPage from '../support/pages/detail';

const loginPage = new LoginPage();
const viewPage = new ViewPage();
const browsePage = new BrowsePage();
const detailPage = new DetailPage();
Expand All @@ -17,9 +16,7 @@ describe('json scenario on view entities page', () => {
cy.visit('/');
cy.contains('Sign In');
cy.fixture('users').then(user => {
cy.login(user.username, user.password)
.url()
.should('include', '/view');
cy.login(user.username, user.password);
})
});

Expand Down Expand Up @@ -54,9 +51,7 @@ describe('json scenario on browse documents page', () => {
cy.visit('/');
cy.contains('Sign In');
cy.fixture('users').then(user => {
cy.login(user.username, user.password)
.url()
.should('include', '/view');
cy.login(user.username, user.password);
})
cy.visit('/browse');
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/support/pages/browse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class BrowsePage {
return this.getFacetItems(facet).then(($el) => {
for (let i = 0; i < $el.length; i++) {
let $element = Cypress.$($el[i]);
if ($element.find('[data-cy=' + facet + '-facet-item-value]').text().trim() === str) {
if ($element.find("label > span:last-child").text().trim() === str) {
return cy.wrap($element);
}
}
Expand Down
Loading

0 comments on commit 2118112

Please sign in to comment.