Skip to content

Commit

Permalink
Merge branch 'hotfix/2019.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
PenghaiZhang committed Feb 19, 2020
2 parents 2bad3ac + c885ba5 commit cb65777
Show file tree
Hide file tree
Showing 90 changed files with 1,636 additions and 948 deletions.
105 changes: 79 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ branches:
- master
- /^release\/.+/
- /^stable-.+/
- /^travis\/.+/
env:
global:
### AWS START ###
Expand All @@ -27,10 +28,9 @@ services:
- postgresql
addons:
postgresql: "9.6"
chrome: beta
apt:
packages:
- chromium-browser
- chromium-chromedriver
- ffmpeg
- libimage-exiftool-perl
- openjdk-8-jdk
Expand All @@ -51,6 +51,10 @@ before_install:
- sudo ln -s /usr/bin/ffplay /usr/bin/avplay
- sudo ln -s /usr/bin/ffprobe /usr/bin/avprobe
install:
- curl -OL https://chromedriver.storage.googleapis.com/80.0.3987.16/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip
- sudo apt-get purge google-chrome-stable # have to delete the stable version to force chromedriver to use the beta
- echo `google-chrome --version`
# retrieve full git history for automatic versioning
- git fetch --unshallow
before_script:
Expand All @@ -65,7 +69,6 @@ before_script:
stages:
- name: build and check
- name: functional test
if: false # Currently disabled due to Travis now running with Chromium 79 which is having issues headless
- name: finalise
if: fork = false # No access to S3, so skip for forks

Expand All @@ -90,6 +93,15 @@ jobs:
- ci/s3cp.sh Installer/target/equella-installer*.zip $S3_DEST_BUILD
- ci/s3cp.sh target/reference-language-pack.zip $S3_DEST_BUILD
- ci/s3cp.sh target/scriptingapi-javadoc-*.zip $S3_DEST_BUILD
- stage: build and check
script: sbt "project IntegTester" package
workspaces:
create:
name: prebuilt-integtester
paths:
- autotest/IntegTester/target/
- autotest/IntegTester/ps/
name: Pre-build IntegTester
- stage: build and check
script: sbt test
name: Unit test
Expand All @@ -101,33 +113,42 @@ jobs:
name: Build the Import/Export tool

- stage: functional test
script: sbt -jvm-opts autotest/.jvmopts "project autotest" \
installEquella startEquella configureInstall setupForTests \
Tests/test dumpCoverage
script:
- sbt -jvm-opts autotest/.jvmopts "project autotest" \
installEquella startEquella configureInstall setupForTests \
Tests/test dumpCoverage
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: Scalacheck
after_script: ci/scalacheck-save-results.sh Tests
- stage: functional test
script: sbt -jvm-opts autotest/.jvmopts "project autotest" \
installEquella startEquella configureInstall setupForTests \
Tests/Serial/test dumpCoverage
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: Scalacheck Serial
after_script: ci/scalacheck-save-results.sh Tests-Serial
# Admin
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (admin)
env: OLD_TEST_SUITE=admin
after_script: ci/oldtests-save-results.sh
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (admin - new UI)
env:
- OLD_TEST_SUITE=admin
Expand All @@ -137,14 +158,18 @@ jobs:
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (advanced script controls - ASC)
env: OLD_TEST_SUITE=asc
after_script: ci/oldtests-save-results.sh
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (advanced script controls - ASC - new UI)
env:
- OLD_TEST_SUITE=asc
Expand All @@ -154,14 +179,18 @@ jobs:
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (contribution)
env: OLD_TEST_SUITE=contribution
after_script: ci/oldtests-save-results.sh
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (contribution - new UI)
env:
- OLD_TEST_SUITE=contribution
Expand All @@ -171,14 +200,18 @@ jobs:
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (controls)
env: OLD_TEST_SUITE=controls
after_script: ci/oldtests-save-results.sh
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (controls - new UI)
env:
- OLD_TEST_SUITE=controls
Expand All @@ -188,14 +221,18 @@ jobs:
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (searching)
env: OLD_TEST_SUITE=searching
after_script: ci/oldtests-save-results.sh
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (searching - new UI)
env:
- OLD_TEST_SUITE=searching
Expand All @@ -205,14 +242,18 @@ jobs:
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (users)
env: OLD_TEST_SUITE=users
after_script: ci/oldtests-save-results.sh
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (users - new UI)
env:
- OLD_TEST_SUITE=users
Expand All @@ -222,14 +263,18 @@ jobs:
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (viewing)
env: OLD_TEST_SUITE=viewing
after_script: ci/oldtests-save-results.sh
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (viewing - new UI)
env:
- OLD_TEST_SUITE=viewing
Expand All @@ -239,14 +284,18 @@ jobs:
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (webservices)
env: OLD_TEST_SUITE=webservices
after_script: ci/oldtests-save-results.sh
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (webservices - new UI)
env:
- OLD_TEST_SUITE=webservices
Expand All @@ -256,14 +305,18 @@ jobs:
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (workflow)
env: OLD_TEST_SUITE=workflow
after_script: ci/oldtests-save-results.sh
- stage: functional test
script: ci/oldtests-run.sh
workspaces:
use: oeq-installer
use:
- oeq-installer
- prebuilt-integtester
name: TestNG (workflow - new UI)
env:
- OLD_TEST_SUITE=workflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ public class TagRenderer extends AbstractWrappedElementId
@Nullable protected Set<String> styleClasses;
private String tag;

public static final String ARIA_LABEL = "aria-label";
public static final String ARIA_CONTROL = "aria-controls";
public static final String ARIA_EXPANDED = "aria-expanded";
public static final String ARIA_HIDDEN = "aria-hidden";
public static final String ARIA_REQUIRED = "aria-required";
public static final String ARIA_LABELLEDBY = "aria-labelledby";
public static final String ARIA_DESCRIBEDBY = "aria-describedby";

public TagRenderer(String tag, TagState state) {
super(state);
this.tag = tag;
Expand Down Expand Up @@ -273,6 +281,12 @@ protected Map<String, String> prepareAttributes(SectionWriter writer) throws IOE
attrs.put("class", sbuf.toString());
}
attrs.put("style", getStyle());
if (this.attrs != null) {
String roleAttr = (String) this.attrs.get("role");
if (roleAttr != null) {
attrs.put("role", roleAttr);
}
}
final Map<String, String> allData = getData();
if (allData != null) {
for (Entry<String, String> d : allData.entrySet()) {
Expand All @@ -288,6 +302,11 @@ protected Map<String, String> prepareAttributes(SectionWriter writer) throws IOE
}
}
prepareLastAttributes(writer, attrs);

// Add aria-xxx attributes
if (tagState.getAccessibilityAttrs() != null) {
attrs.putAll(tagState.getAccessibilityAttrs());
}
return attrs;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class TagState extends AbstractWrappedElementId {
private List<PreRenderable> preRenderables;
private List<TagProcessor> processors;
private final HandlerMap handlerMap = new HandlerMap();
private Map<String, String> accessibilityAttrs;

public TagState() {
super(new PageUniqueId());
Expand Down Expand Up @@ -116,6 +117,17 @@ public <T> T getAttribute(Object key) {
return (T) attrs.get(key);
}

public void setAccessibilityAttr(String key, String value) {
if (accessibilityAttrs == null) {
accessibilityAttrs = new HashMap<String, String>();
}
accessibilityAttrs.put(key, value);
}

public Map<String, String> getAccessibilityAttrs() {
return accessibilityAttrs;
}

/**
* Used for data-xxx attributes. They should always be rendered.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
@Entity
@AccessType("field")
public class LtiConsumer extends BaseEntity {
public static final String ATT_CUSTOM_USER_ID = "ATT_CUSTOM_USER_ID";
public static final String ATT_CUSTOM_USERNAME = "ATT_CUSTOM_USERNAME";
public static final String ATT_CUSTOM_ENABLE_ID_PREFIX = "ATT_CUSTOM_ENABLE_ID_PREFIX";

@Index(name = "consumerKey")
@Column(length = 255, nullable = false)
private String consumerKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { makeStyles } from "@material-ui/styles";
import { IconButton, Popover } from "@material-ui/core";
import MoreVertIcon from "@material-ui/icons/MoreVert";
import JQueryDiv from "../legacycontent/JQueryDiv";
import { languageStrings } from "../util/langstrings";

const useStyles = makeStyles(t => ({
screenOptions: {
Expand All @@ -22,6 +23,7 @@ export default React.memo(function ScreenOptions(props: {
<IconButton
id="screenOptionsOpen"
onClick={e => setOptionsAnchor(e.currentTarget)}
aria-label={languageStrings.screenoptions.description}
>
<MoreVertIcon />
</IconButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,11 @@ export const Template = React.memo(function Template(props: TemplateProps) {
);
}}
key={ind}
button={true}
>
<ListItemIcon>
{item.iconUrl ? (
<img src={item.iconUrl} />
<img src={item.iconUrl} alt={item.title} />
) : (
<Icon color="inherit" className={classes.menuIcon}>
{item.systemIcon ? item.systemIcon : "folder"}
Expand Down Expand Up @@ -409,7 +410,7 @@ export const Template = React.memo(function Template(props: TemplateProps) {
const menuContent = React.useMemo(
() => (
<div className={classes.logo}>
<img role="presentation" src={logoURL} />
<img role="presentation" src={logoURL} alt={"Logo"} />
{hasMenu && (
<div id="menulinks">
{currentUser.menuGroups.map((group, ind) => (
Expand Down
Loading

0 comments on commit cb65777

Please sign in to comment.