Skip to content

Commit

Permalink
fix: conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Feb 8, 2024
2 parents 309c5f7 + 4b8f413 commit d6ea3de
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 31,401 deletions.
2 changes: 1 addition & 1 deletion lib/api/get-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ module.exports = (req, res) => {
file: codeceptjsFactory.getConfigFile(),
config: config.get(),
};

res.json(currentConfig);
};
12 changes: 5 additions & 7 deletions lib/api/list-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,18 @@ module.exports = (req, res) => {
const helper = helpers[name];
methodsOfObject(helper).forEach((action) => {

if(docFileList.includes(action)) {
if (docFileList.includes(action)) {
let filePath = path.join(docsWebApiFolderPath, action + '.mustache');
let fn = helper[action].toString().replace(/\n/g,' ').replace(/\{.*\}/gm,'{}');
try{
let fn = helper[action].toString().replace(/\n/g, ' ').replace(/\{.*\}/gm, '{}');
try {
let docData = fs.readFileSync(filePath, 'utf-8');
let params = parser.parse(fn);
actions[action] = { params: params, actionDoc: docData };
} catch(err) {
actions[action] = {params: params, actionDoc: docData};
} catch (err) {
debug('Error in fetching doc for file content', fn, err);
}
}

});
}

res.send({ actions });
};
31,382 changes: 17 additions & 31,365 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
],
"dependencies": {
"@codeceptjs/configure": "0.8.0",
"axios": "0.24.0",
"axios": "1.6.7",
"body-parser": "1.20.1",
"cheerio": "1.0.0-rc.12",
"chokidar": "3.5.3",
"commander": "8.3.0",
"core-js": "2.6.12",
"debug": "4.3.4",
"electron": "28.2.2",
"dayjs": "1.11.10",
"express": "4.18.2",
"lodash.clonedeep": "4.5.0",
"nanoid": "3.3.4",
Expand All @@ -56,7 +57,6 @@
"eslint-plugin-vue": "7.20.0",
"husky": "7.0.4",
"lint-staged": "11.2.6",
"moment": "2.29.4",
"playwright": "1.29",
"prismjs": "1.29.0",
"puppeteer": "10.4.0",
Expand Down
6 changes: 4 additions & 2 deletions src/components/Feature.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@

<script>
import axios from 'axios';
import moment from 'moment';
import EditorNotFound from './EditorNotFound';
import Scenario from './Scenario';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
dayjs.extend(relativeTime);
export default {
name: 'Feature',
Expand All @@ -69,7 +71,7 @@ export default {
},
methods: {
humanize(ts) {
return moment.unix(ts / 1000).fromNow();
return dayjs(ts).fromNow();
},
openInEditor(file) {
Expand Down
6 changes: 4 additions & 2 deletions src/components/Scenario.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
</template>

<script>
import moment from 'moment';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
dayjs.extend(relativeTime);
export default {
name: 'Scenario',
Expand Down Expand Up @@ -115,7 +117,7 @@ export default {
},
methods: {
humanize(ts) {
return moment.unix(ts / 1000).fromNow();
return dayjs(ts).fromNow();
},
selectScenario(scenario) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/SettingsMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class="fa-md fas fa-edit text-red-500 mr-2 fa-inverse"
v-if="!editor"
/>
</b-tooltip>
</b-tooltip>
<b-tooltip
label="Window Mode Enabled"
position="is-left"
Expand Down Expand Up @@ -153,7 +153,7 @@
<a
class="is-small"
@click="gotoSettingsPage()"
>Show Config</a> &nbsp; {{ config.file }}
>Show CodeceptJS Config</a>
</footer>
</div>
</form>
Expand Down
4 changes: 2 additions & 2 deletions src/components/SnapshotSource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default {
return (
this.$refs.contentDocument ||
(this.$refs.source.contentWindow &&
this.$refs.source.contentWindow.document)
this.$refs.source.contentWindow.document)
);
},
Expand All @@ -105,7 +105,7 @@ export default {
return (
this.$refs.source.contentWindow &&
(this.$props.snapshot.scrollPosition.x > 0 ||
this.$props.snapshot.scrollPosition.y > 0)
this.$props.snapshot.scrollPosition.y > 0)
);
},
Expand Down
6 changes: 4 additions & 2 deletions src/components/Test.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,13 @@
</template>

<script>
import moment from 'moment';
import relativeTime from 'dayjs/plugin/relativeTime';
import Pause from './Pause';
import Step from './Step';
import ScenarioSource from './ScenarioSource';
import TestResult from './TestResult';
import dayjs from 'dayjs';
dayjs.extend(relativeTime);
export default {
name: 'Test',
Expand Down Expand Up @@ -137,7 +139,7 @@ export default {
methods: {
humanize(ts) {
return moment.unix(ts / 1000).fromNow();
return dayjs(ts).fromNow();
},
indentLevel(step) {
Expand Down
12 changes: 6 additions & 6 deletions src/components/pages/NewTestPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
@run="runScenario(scenario)"
/>
<aside class="Sidebar">
<MonacoEditor
<MonacoEditor
class="editor"
v-model="code"
v-model="code"
@editorDidMount="editorDidMount"
language="javascript"
language="javascript"
/>

<button
v-if="!isRunning"
@click="runScenario(scenario)"
Expand Down Expand Up @@ -55,7 +55,7 @@
<a @click="enableWindowMode()">Force Window mode <i class="fas fa-window-maximize settings" /></a> to see the execution in actual browser
</li>
<li :class="{ 'line-through': isSingleSession }">
<a @click="enableSingleSession()">Enable Singleton Browser Session</a> to reuse one window accross test runs
<a @click="enableSingleSession()">Enable Singleton Browser Session</a> to reuse one window across test runs
</li>
<li :class="{ 'line-through': isRunning }">
Write the inital code and click <a @click="runScenario()">Launch Test</a>
Expand Down Expand Up @@ -109,7 +109,7 @@ export default {
created: async function () {
this.$store.dispatch('testRuns/clearTests');
if (localStorage.getItem('newTestCommand') !== null) {
this.code = localStorage.getItem('newTestCommand');
this.code = localStorage.getItem('newTestCommand');
}
},
beforeDestroy: function() {
Expand Down
25 changes: 15 additions & 10 deletions src/components/pages/PageObjectsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
<SettingsMenu />
</b-navbar-item>
</template>
<template slot="start">

</template>
<template slot="start" />

<template slot="end">
<b-navbar-item class="is-hidden-touch">
Expand All @@ -31,20 +29,27 @@
>
<aside class="Sidebar">
<div>
<h1 class="title is-size-4 has-text-grey-dark">Page Objects</h1>
<br />
<h1 class="title is-size-4 has-text-grey-dark">
Page Objects
</h1>
<br>
</div>
<ul style="overflow-y: scroll;">
<li v-for="(value,name) in pageObject">
<a class="Scenario-detailLink" @click="loadPageObjectSource(value.source)">{{ name }}
<i class="fas fa-angle-right"></i>
<a
class="Scenario-detailLink"
@click="loadPageObjectSource(value.source)"
>{{ name }}
<i class="fas fa-angle-right" />
</a>
</li>
</ul>

</aside>
<div class="Content" style="overflow-y: scroll;">
<pre v-highlightjs="pageObjectSource"><code class="javascript"/></pre>
<div
class="Content"
style="overflow-y: scroll;"
>
<pre v-highlightjs="pageObjectSource"><code class="javascript" /></pre>
</div>
</section>
</div>
Expand Down

0 comments on commit d6ea3de

Please sign in to comment.