Skip to content

Commit

Permalink
synchronized with docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Dec 10, 2024
1 parent 7df2a78 commit db00cab
Show file tree
Hide file tree
Showing 38 changed files with 3,785 additions and 4,133 deletions.
2 changes: 1 addition & 1 deletion docs/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ ai: {
* `maxLength`: the size of HTML to cut to not reach the token limit. 50K is the current default but you may try to increase it or even set it to null.
* `simplify`: should we process HTML before sending to GPT. This will remove all non-interactive elements from HTML.
* `minify`: shold HTML be additionally minified. This removed empty attributes, shortens notations, etc.
* `minify`: should HTML be additionally minified. This removed empty attributes, shortens notations, etc.
* `interactiveElements`: explicit list of all elements that are considered interactive.
* `textElements`: elements that contain text which can be used for test automation.
* `allowedAttrs`: explicit list of attributes that may be used to construct locators. If you use special `data-` attributes to enable locators, add them to the list.
Expand Down
1 change: 1 addition & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ REST helper can send GET/POST/PATCH/etc requests to REST API endpoint:
* [`I.sendPutRequest()`](/helpers/REST#sendPutRequest)
* [`I.sendPatchRequest()`](/helpers/REST#sendPatchRequest)
* [`I.sendDeleteRequest()`](/helpers/REST#sendDeleteRequest)
* [`I.sendDeleteRequestWithPayload()`](/helpers/REST#sendDeleteRequestWithPayload)
* ...

Authentication headers can be set in [helper's config](https://codecept.io/helpers/REST/#configuration) or per test with headers or special methods like `I.amBearerAuthenticated`.
Expand Down
4 changes: 2 additions & 2 deletions docs/build/AI.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const ai = require('../ai')
const standardActingHelpers = require('../plugin/standardActingHelpers')
const Container = require('../container')
const { splitByChunks, minifyHtml } = require('../html')
const { beautify } = require('../utils.js')
const output = require('../output.js')
const { beautify } = require('../utils')
const output = require('../output')
const { registerVariable } = require('../pause')

const gtpRole = {
Expand Down
2 changes: 1 addition & 1 deletion docs/build/ApiDataFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const REST = require('./REST')
*
* module.exports = new Factory()
* // no need to set id, it will be set by REST API
* .attr('author', () => faker.name.findName())
* .attr('author', () => faker.person.findName())
* .attr('title', () => faker.lorem.sentence())
* .attr('body', () => faker.lorem.paragraph());
* ```
Expand Down
19 changes: 8 additions & 11 deletions docs/build/Appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ class Appium extends Webdriver {
async runOnIOS(caps, fn) {
if (this.platform !== 'ios') return
recorder.session.start('iOS-only actions')
await this._runWithCaps(caps, fn)
await recorder.add('restore from iOS session', () => recorder.session.restore())
this._runWithCaps(caps, fn)
recorder.add('restore from iOS session', () => recorder.session.restore())
return recorder.promise()
}

Expand Down Expand Up @@ -476,8 +476,8 @@ class Appium extends Webdriver {
async runOnAndroid(caps, fn) {
if (this.platform !== 'android') return
recorder.session.start('Android-only actions')
await this._runWithCaps(caps, fn)
await recorder.add('restore from Android session', () => recorder.session.restore())
this._runWithCaps(caps, fn)
recorder.add('restore from Android session', () => recorder.session.restore())
return recorder.promise()
}

Expand All @@ -491,19 +491,17 @@ class Appium extends Webdriver {
* });
* ```
*
* @param {*} fn
*/
/* eslint-disable */
async runInWeb(fn) {

async runInWeb() {
if (!this.isWeb) return
recorder.session.start('Web-only actions')

recorder.add('restore from Web session', () => recorder.session.restore(), true)
return recorder.promise()
}
/* eslint-enable */

async _runWithCaps(caps, fn) {
_runWithCaps(caps, fn) {
if (typeof caps === 'object') {
for (const key in caps) {
// skip if capabilities do not match
Expand Down Expand Up @@ -1077,7 +1075,7 @@ class Appium extends Webdriver {
*
* Appium: support Android and iOS
*/
/* eslint-disable */

async swipe(locator, xoffset, yoffset, speed = 1000) {
onlyForApps.call(this)
const res = await this.browser.$(parseLocator.call(this, locator))
Expand All @@ -1087,7 +1085,6 @@ class Appium extends Webdriver {
y: (await res.getLocation()).y + yoffset,
})
}
/* eslint-enable */

/**
* Perform a swipe on the screen.
Expand Down
2 changes: 1 addition & 1 deletion docs/build/ExpectHelper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const output = require('../output.js')
const output = require('../output')

let expect

Expand Down
2 changes: 1 addition & 1 deletion docs/build/FileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require('path')
const fs = require('fs')

const Helper = require('@codeceptjs/helper')
const { fileExists } = require('../utils.js')
const { fileExists } = require('../utils')
const { fileIncludes } = require('../assert/include')
const { fileEquals } = require('../assert/equal')

Expand Down
2 changes: 1 addition & 1 deletion docs/build/GraphQLDataFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const GraphQL = require('./GraphQL')
* input: { ...buildObj },
* }))
* // 'attr'-id can be left out depending on the GraphQl resolvers
* .attr('name', () => faker.name.findName())
* .attr('name', () => faker.person.findName())
* .attr('email', () => faker.interact.email())
* ```
* For more options see [rosie documentation](https://github.com/rosiejs/rosie).
Expand Down
2 changes: 1 addition & 1 deletion docs/build/Mochawesome.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let currentTest
let currentSuite

const Helper = require('@codeceptjs/helper')
const { clearString } = require('../utils.js')
const { clearString } = require('../utils')

class Mochawesome extends Helper {
constructor(config) {
Expand Down
Loading

0 comments on commit db00cab

Please sign in to comment.