mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
fixed set-env.ts, reverted unnecessary e2e changes, updated travis.yml
This commit is contained in:
64
.travis.yml
64
.travis.yml
@@ -1,10 +1,25 @@
|
||||
sudo: required
|
||||
dist: bionic
|
||||
language: node_js
|
||||
|
||||
# Enable caching for yarn & node_modules
|
||||
cache:
|
||||
yarn: true
|
||||
|
||||
node_js:
|
||||
- "10"
|
||||
- "12"
|
||||
|
||||
# Install latest chrome (for e2e headless testing). Run an update if needed.
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
update: true
|
||||
|
||||
env:
|
||||
# Install the latest docker-compose version for ci testing.
|
||||
# The default installation in travis is not compatible with the latest docker-compose file version.
|
||||
COMPOSE_VERSION: 1.24.1
|
||||
# The ci step will test the dspace-angular code against DSpace REST.
|
||||
# Direct that step to utilize a DSpace REST service that has been started in docker.
|
||||
DSPACE_REST_HOST: localhost
|
||||
@@ -12,46 +27,31 @@ env:
|
||||
DSPACE_REST_NAMESPACE: '/server/api'
|
||||
DSPACE_REST_SSL: false
|
||||
|
||||
services:
|
||||
- xvfb
|
||||
|
||||
before_install:
|
||||
# Docker Compose Install
|
||||
- curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
|
||||
- chmod +x docker-compose
|
||||
- sudo mv docker-compose /usr/local/bin
|
||||
# Check our versions of everything
|
||||
- echo "Check versions"
|
||||
- yarn -v
|
||||
- docker-compose -v
|
||||
- google-chrome-stable --version
|
||||
|
||||
install:
|
||||
# update chrome
|
||||
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
||||
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
|
||||
- sudo apt-get update
|
||||
- sudo apt-get install google-chrome-stable
|
||||
# Start up DSpace 7 using the entities database dump
|
||||
- docker-compose -f ./docker/docker-compose-travis.yml up -d
|
||||
# Use the dspace-cli image to populate the assetstore. Trigger a discovery and oai update
|
||||
# Use the dspace-cli image to populate the assetstore. Triggers a discovery and oai update
|
||||
- docker-compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
|
||||
- travis_retry yarn install
|
||||
|
||||
before_script:
|
||||
- echo "Check Docker containers"
|
||||
- docker container ls
|
||||
# The following line could be enabled to verify that the rest server is responding.
|
||||
# Currently, "yarn run build" takes enough time to run to allow the service to be available
|
||||
#- curl http://localhost:8080/
|
||||
|
||||
after_script:
|
||||
- docker-compose -f ./docker/docker-compose-travis.yml down
|
||||
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- "10"
|
||||
- "12"
|
||||
|
||||
cache:
|
||||
yarn: true
|
||||
|
||||
bundler_args: --retry 5
|
||||
#- echo "Check REST API available (via Docker)"
|
||||
#- curl http://localhost:8080/server/
|
||||
|
||||
script:
|
||||
- yarn run ci
|
||||
- cat coverage/dspace-angular-cli/lcov.info | ./node_modules/coveralls/bin/coveralls.js
|
||||
|
||||
after_script:
|
||||
# Shutdown docker after everything runs
|
||||
- docker-compose -f ./docker/docker-compose-travis.yml down
|
||||
|
@@ -33,7 +33,7 @@ exports.config = {
|
||||
'version': '',
|
||||
'platform': 'ANY',
|
||||
'chromeOptions': {
|
||||
args: ['--headless', '--no-sandbox', '--disable-gpu']
|
||||
'args': [ '--headless', '--disable-gpu' ]
|
||||
}
|
||||
},
|
||||
// -----------------------------------------------------------------
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { ProtractorPage } from './app.po';
|
||||
import { browser, by, element, protractor } from 'protractor';
|
||||
|
||||
describe('protractor App', () => {
|
||||
let page: ProtractorPage;
|
||||
@@ -9,19 +8,15 @@ describe('protractor App', () => {
|
||||
});
|
||||
|
||||
it('should display translated title "DSpace Angular :: Home"', () => {
|
||||
page.navigateTo()
|
||||
.then(() => page.waitUntilNotLoading())
|
||||
.then(() => {
|
||||
expect<any>(page.getPageTitleText()).toEqual('DSpace Angular :: Home');
|
||||
}
|
||||
)
|
||||
;
|
||||
page.navigateTo();
|
||||
page.waitUntilNotLoading();
|
||||
expect<any>(page.getPageTitleText()).toEqual('DSpace Angular :: Home');
|
||||
});
|
||||
|
||||
it('should contain a news section', () => {
|
||||
page.navigateTo()
|
||||
.then(() => page.waitUntilNotLoading())
|
||||
.then(() => page.getHomePageNewsText())
|
||||
.then((text) => expect<any>(text).toBeDefined());
|
||||
page.navigateTo();
|
||||
page.waitUntilNotLoading();
|
||||
const text = page.getHomePageNewsText();
|
||||
expect<any>(text).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
@@ -18,6 +18,6 @@ export class ProtractorPage {
|
||||
const loading = element(by.css('.loader'))
|
||||
const EC = protractor.ExpectedConditions;
|
||||
const notLoading = EC.not(EC.presenceOf(loading));
|
||||
return browser.wait(notLoading, 180000);
|
||||
return browser.wait(notLoading, 10000);
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { ProtractorPage } from './search-page.po';
|
||||
import { browser } from 'protractor';
|
||||
import { promise } from 'selenium-webdriver';
|
||||
|
||||
describe('protractor SearchPage', () => {
|
||||
let page: ProtractorPage;
|
||||
@@ -22,9 +21,9 @@ describe('protractor SearchPage', () => {
|
||||
page.navigateToSearch()
|
||||
.then(() => page.getRandomScopeOption())
|
||||
.then((scopeString: string) => {
|
||||
page.navigateToSearchWithScopeParameter(scopeString)
|
||||
.then(() => page.waitUntilNotLoading())
|
||||
.then(() => page.getCurrentScope())
|
||||
page.navigateToSearchWithScopeParameter(scopeString);
|
||||
page.waitUntilNotLoading();
|
||||
page.getCurrentScope()
|
||||
.then((s: string) => {
|
||||
expect<string>(s).toEqual(scopeString);
|
||||
})
|
||||
|
@@ -72,7 +72,7 @@ function createServerConfig(host?: string, port?: string, nameSpace?: string, s
|
||||
}
|
||||
|
||||
if (hasValue(nameSpace)) {
|
||||
result.host = nameSpace;
|
||||
result.nameSpace = nameSpace;
|
||||
}
|
||||
|
||||
if (hasValue(port)) {
|
||||
|
Reference in New Issue
Block a user