skip building test harness in docker image (#551)

A small test harness bundle was recently added that is breaking the docker image build. It could be added to the docker image, but that would introduce a bunch of extraneous test file dependencies. So this tweaks the build to simply skip the test bundle if its primary source file is not found.

Also added some other test fixes along the way:
  * make a custom widget test more reliable
  * update a localization test now that `pt` exists
  * store more log info in artifact on error
This commit is contained in:
Paul Fitzpatrick
2023-06-30 10:50:40 +01:00
committed by GitHub
parent 2d636c5890
commit 70935a4fa4
5 changed files with 40 additions and 30 deletions

View File

@@ -4,28 +4,30 @@
const urlParams = new URLSearchParams(window.location.search);
const ready = urlParams.get('ready') ? JSON.parse(urlParams.get('ready')) : undefined;
if (ready && ready.onEditOptions) {
ready.onEditOptions = () => {
document.getElementById('configure').innerHTML = 'called';
};
function setup() {
if (ready && ready.onEditOptions) {
ready.onEditOptions = () => {
document.getElementById('configure').innerHTML = 'called';
};
}
grist.ready(ready);
grist.onOptions(data => {
document.getElementById('onOptions').innerHTML = JSON.stringify(data);
});
grist.onRecord((data, mappings) => {
document.getElementById('onRecord').innerHTML = JSON.stringify(data);
document.getElementById('onRecordMappings').innerHTML = JSON.stringify(mappings);
});
grist.onRecords((data, mappings) => {
document.getElementById('onRecords').innerHTML = JSON.stringify(data);
document.getElementById('onRecordsMappings').innerHTML = JSON.stringify(mappings);
});
}
grist.ready(ready);
grist.onOptions(data => {
document.getElementById('onOptions').innerHTML = JSON.stringify(data);
});
grist.onRecord((data, mappings) => {
document.getElementById('onRecord').innerHTML = JSON.stringify(data);
document.getElementById('onRecordMappings').innerHTML = JSON.stringify(mappings);
});
grist.onRecords((data, mappings) => {
document.getElementById('onRecords').innerHTML = JSON.stringify(data);
document.getElementById('onRecordsMappings').innerHTML = JSON.stringify(mappings);
});
async function run(handler) {
try {
document.getElementById('output').innerText = 'waiting...';
@@ -66,6 +68,7 @@ async function configure() {
}
window.onload = () => {
setup();
document.getElementById('ready').innerText = 'ready';
document.getElementById('access').innerHTML = urlParams.get('access');
document.getElementById('readonly').innerHTML = urlParams.get('readonly');