diff --git a/.github/actions/acceptance-test/action.yml b/.github/actions/acceptance-test/action.yml index 03500ce..4e7a928 100644 --- a/.github/actions/acceptance-test/action.yml +++ b/.github/actions/acceptance-test/action.yml @@ -17,10 +17,6 @@ runs: echo "Set timeouts: ${{ inputs.timeouts }}" shell: bash - - name: Append hosts file to enable "pass.local" on localhost - shell: bash - run: echo "127.0.0.1 pass.local" | sudo tee -a /etc/hosts - - name: Checkout pass-docker uses: actions/checkout@v3 with: diff --git a/tests/baseCaseTests.js b/tests/baseCaseTests.js index c9dc19b..492f152 100644 --- a/tests/baseCaseTests.js +++ b/tests/baseCaseTests.js @@ -1,7 +1,7 @@ import { fixture, Selector, test } from 'testcafe'; import { currLocation, TIMEOUT_LENGTH, login } from './commonTest'; -fixture`Acceptance Testing`.page`https://pass.local`; +fixture`Acceptance Testing`.page`http://localhost:8080`; test('can walk through an nih submission workflow and make a submission - base case', async (t) => { // Log in @@ -14,7 +14,7 @@ test('can walk through an nih submission workflow and make a submission - base c await t.expect(submissionsButton.exists).ok(); await t.click(submissionsButton); - await t.expect(currLocation()).eql('https://pass.local/app/submissions'); + await t.expect(currLocation()).eql('http://localhost:8080/app/submissions'); // Start new Submission const startNewSubmissionButton = Selector( @@ -25,7 +25,7 @@ test('can walk through an nih submission workflow and make a submission - base c await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/basics'); + .eql('http://localhost:8080/app/submissions/new/basics'); // Input DOI const doiInput = Selector('#doi'); @@ -67,7 +67,7 @@ test('can walk through an nih submission workflow and make a submission - base c await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/grants'); + .eql('http://localhost:8080/app/submissions/new/grants'); // Select a Grant const nihGrant = Selector('#grants-selection-table a').withText('QQDV123P7'); @@ -91,7 +91,7 @@ test('can walk through an nih submission workflow and make a submission - base c await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/policies'); + .eql('http://localhost:8080/app/submissions/new/policies'); // Check selected Policy const currPolicy = Selector('input').withAttribute( @@ -108,7 +108,7 @@ test('can walk through an nih submission workflow and make a submission - base c await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/repositories'); + .eql('http://localhost:8080/app/submissions/new/repositories'); // Check Required Repositories const requiredRepositories = Selector('ul') @@ -134,7 +134,7 @@ test('can walk through an nih submission workflow and make a submission - base c await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/metadata'); + .eql('http://localhost:8080/app/submissions/new/metadata'); // Check Article Title const articleTitle = Selector('textarea').withAttribute('name', 'title'); @@ -155,7 +155,7 @@ test('can walk through an nih submission workflow and make a submission - base c await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/files'); + .eql('http://localhost:8080/app/submissions/new/files'); // Get Browse Files button const browseFilesButton = Selector('#file-multiple-input'); @@ -181,7 +181,7 @@ test('can walk through an nih submission workflow and make a submission - base c await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/review'); + .eql('http://localhost:8080/app/submissions/new/review'); // Review Title const reviewTitle = Selector('.mb-1').withAttribute( diff --git a/tests/commonTest.js b/tests/commonTest.js index 78f34ad..4b3e8df 100644 --- a/tests/commonTest.js +++ b/tests/commonTest.js @@ -1,6 +1,6 @@ import { Selector, ClientFunction, t } from 'testcafe'; -const LOGIN_URL = 'https://pass.local/login/saml'; +const LOGIN_URL = 'http://localhost:8080/app/'; export const USER = { NIH_USER: 'nih-user', diff --git a/tests/noJournalTests.js b/tests/noJournalTests.js index 9772570..1b7dad8 100644 --- a/tests/noJournalTests.js +++ b/tests/noJournalTests.js @@ -1,7 +1,7 @@ import { fixture, Selector, test } from 'testcafe'; import { currLocation, TIMEOUT_LENGTH, login } from './commonTest'; -fixture`Acceptance Testing`.page`https://pass.local`; +fixture`Acceptance Testing`.page`http://localhost:8080`; test('can walk through an nih submission workflow and make a submission - without selecting a journal', async (t) => { // Log in @@ -14,7 +14,7 @@ test('can walk through an nih submission workflow and make a submission - withou await t.expect(submissionsButton.exists).ok(); await t.click(submissionsButton); - await t.expect(currLocation()).eql('https://pass.local/app/submissions'); + await t.expect(currLocation()).eql('http://localhost:8080/app/submissions'); // Start new Submission const startNewSubmissionButton = Selector( @@ -25,7 +25,7 @@ test('can walk through an nih submission workflow and make a submission - withou await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/basics'); + .eql('http://localhost:8080/app/submissions/new/basics'); // do not enter a DOI and enter a title manually const titleName = Selector('#title'); @@ -48,7 +48,7 @@ test('can walk through an nih submission workflow and make a submission - withou await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/grants'); + .eql('http://localhost:8080/app/submissions/new/grants'); // Select a Grant const nihGrant = Selector('#grants-selection-table a').withText('Z0650001'); @@ -72,7 +72,7 @@ test('can walk through an nih submission workflow and make a submission - withou await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/policies'); + .eql('http://localhost:8080/app/submissions/new/policies'); // Check that JHU policy exists const jhuRepository = Selector('h3') @@ -89,7 +89,7 @@ test('can walk through an nih submission workflow and make a submission - withou await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/repositories'); + .eql('http://localhost:8080/app/submissions/new/repositories'); // Check Required Repositories const requiredRepositories = Selector('ul') @@ -107,7 +107,7 @@ test('can walk through an nih submission workflow and make a submission - withou await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/metadata'); + .eql('http://localhost:8080/app/submissions/new/metadata'); // Check Article Title const articleTitle = Selector('textarea').withAttribute('name', 'title'); @@ -134,7 +134,7 @@ test('can walk through an nih submission workflow and make a submission - withou await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/files'); + .eql('http://localhost:8080/app/submissions/new/files'); // Get Browse Files button const browseFilesButton = Selector('#file-multiple-input'); @@ -160,7 +160,7 @@ test('can walk through an nih submission workflow and make a submission - withou await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/review'); + .eql('http://localhost:8080/app/submissions/new/review'); // Review Title const reviewTitle = Selector('.mb-1').withAttribute( diff --git a/tests/proxySubmissionTests.js b/tests/proxySubmissionTests.js index ae3cd65..950ba1f 100644 --- a/tests/proxySubmissionTests.js +++ b/tests/proxySubmissionTests.js @@ -1,7 +1,7 @@ import { fixture, Selector, test } from 'testcafe'; import { currLocation, TIMEOUT_LENGTH, login, logout } from './commonTest'; -fixture`Acceptance Testing`.page`https://pass.local`.afterEach(logout); +fixture`Acceptance Testing`.page`http://localhost:8080`.afterEach(logout); test('can walk through a proxy submission workflow and make a submission - with pass account', async (t) => { // use role @@ -15,7 +15,7 @@ test('can walk through a proxy submission workflow and make a submission - with await t.expect(submissionsButton.exists).ok(); await t.click(submissionsButton); - await t.expect(currLocation()).eql('https://pass.local/app/submissions'); + await t.expect(currLocation()).eql('http://localhost:8080/app/submissions'); // Start new Submission const startNewSubmissionButton = Selector( @@ -27,7 +27,7 @@ test('can walk through a proxy submission workflow and make a submission - with // Select Proxy Submission button await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/basics'); + .eql('http://localhost:8080/app/submissions/new/basics'); const proxyRadioButton = Selector('input').withAttribute( 'data-test-proxy-radio-button' ); @@ -77,7 +77,7 @@ test('can walk through a proxy submission workflow and make a submission - witho await t.expect(submissionsButton.exists).ok(); await t.click(submissionsButton); - await t.expect(currLocation()).eql('https://pass.local/app/submissions'); + await t.expect(currLocation()).eql('http://localhost:8080/app/submissions'); // Start new Submission const startNewSubmissionButton = Selector( @@ -89,7 +89,7 @@ test('can walk through a proxy submission workflow and make a submission - witho // Select Proxy Submission button await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/basics'); + .eql('http://localhost:8080/app/submissions/new/basics'); const proxyRadioButton = Selector('input').withAttribute( 'data-test-proxy-radio-button' ); @@ -159,7 +159,7 @@ async function walkThroughSubmissionFlow(t, hasAccount) { await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/grants'); + .eql('http://localhost:8080/app/submissions/new/grants'); if (hasAccount) { // Select a Grant @@ -202,7 +202,7 @@ async function walkThroughSubmissionFlow(t, hasAccount) { await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/policies'); + .eql('http://localhost:8080/app/submissions/new/policies'); // Nothing to select here, move to Repositories page const goToRepositoriesButton = Selector('button').withAttribute( @@ -212,7 +212,7 @@ async function walkThroughSubmissionFlow(t, hasAccount) { await t.click(goToRepositoriesButton); await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/repositories'); + .eql('http://localhost:8080/app/submissions/new/repositories'); // Check Required Repositories if (hasAccount) { @@ -244,7 +244,7 @@ async function walkThroughSubmissionFlow(t, hasAccount) { await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/metadata'); + .eql('http://localhost:8080/app/submissions/new/metadata'); // Check Article Title const articleTitle = Selector('textarea').withAttribute('name', 'title'); @@ -265,7 +265,7 @@ async function walkThroughSubmissionFlow(t, hasAccount) { await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/files'); + .eql('http://localhost:8080/app/submissions/new/files'); await t.expect(Selector('div[data-test-foundmss-component]').exists).ok(); @@ -287,7 +287,7 @@ async function walkThroughSubmissionFlow(t, hasAccount) { await t .expect(currLocation()) - .eql('https://pass.local/app/submissions/new/review'); + .eql('http://localhost:8080/app/submissions/new/review'); // Go to Review // Review Title