Skip to content

Commit

Permalink
chore: resolve apply github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jungeun-cho committed May 26, 2020
1 parent f9b2b15 commit 5ee950a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/detectRuntimeError.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: detect runtime error

on:
schedule:
- cron: "0 22 * * *"
- cron: "*/5 * * * *"
jobs:
detectError:
runs-on: ubuntu-latest
Expand All @@ -21,11 +21,16 @@ jobs:
run: |
url=`cat ./url.txt`
echo ::set-env name=URLS::$url
- name: set browser list
run: |
browserList=`cat ./browserList.txt`
echo ::set-env name=BROWSER_LIST::$$browserList
- name: detect runtime error
uses: nhn/[email protected]
with:
global-error-log-variable: ${{ env.ERROR_VARIABLE }}
urls: ${{ env.URLS }}
browserlist: ${{ env.BROWSER_LIST }}
env:
BROWSERSTACK_USERNAME: ${{secrets.BROWSERSTACK_USERNAME}}
BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}}
10 changes: 10 additions & 0 deletions createConfigVariable.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,15 @@ function getGlobalVariable() {
fs.writeFileSync('errorVariable.txt', globalErrorLogVariable);
}

/**
* Get Supported Browser List
*/
function getBrowserList() {
var browsers = ['ie9', 'ie10', 'ie11', 'safari', 'edge', 'firefox', 'chrome'];

fs.writeFileSync('browserList.txt', browsers.join(', '));
}

getTestUrls();
getGlobalVariable();
getBrowserList();
2 changes: 1 addition & 1 deletion examples/example14-template-for-month.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
}

// register templates
const templates = {
var templates = {
milestone: function(schedule) {
return getGridCategoryTemplate('milestone', schedule);
},
Expand Down
20 changes: 17 additions & 3 deletions examples/example15-template-for-timegrid.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@
<script src="../dist/tui-calendar.js"></script>
<script src="./js/data/calendars.js"></script>
<script src="./js/data/schedules.js"></script>
<script type="text/javascript">
function padStart(value, targetLength, padString) {
targetLength = targetLength >> 0; //floor if number or convert non-number to 0;
padString = String(typeof padString !== 'undefined' ? padString : ' ');
if (this.length > targetLength) {
return String(this);
} else {
targetLength = targetLength - this.length;
if (targetLength > padString.length) {
padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed
}
return padString.slice(0, targetLength) + String(this);
}
};
</script>
<script type="text/javascript" class="code-js">
function getTimeTemplate(schedule, isAllDay) {
var html = [];
Expand Down Expand Up @@ -106,11 +121,11 @@
function getPadStart(value) {
value = value.toString();

return value.padStart(2, '0');
return padStart.call(value, 2, '0');
}

// register templates
const templates = {
var templates = {
weekDayname: function(model) {
return '<span class="tui-full-calendar-dayname-date">' + model.date + '</span>&nbsp;&nbsp;<span class="tui-full-calendar-dayname-name">' + model.dayName + '</span>';
},
Expand Down Expand Up @@ -149,7 +164,6 @@
minutes = Math.abs(timezoneOffset % 60);
displayLabel = gmt + getPadStart(hour) + ':' + getPadStart(minutes);
}

return displayLabel;
},
timegridDisplayPrimayTime: function(time) {
Expand Down
2 changes: 1 addition & 1 deletion examples/example16-template-for-popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<script src="./js/data/schedules.js"></script>
<script type="text/javascript" class="code-js">
// register templates
const templates = {
var templates = {
popupIsAllDay: function() {
return 'All Day';
},
Expand Down
1 change: 1 addition & 0 deletions examples/js/default.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
function init() {
cal.setCalendars(CalendarList);

Expand Down

0 comments on commit 5ee950a

Please sign in to comment.