Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More ā†’
Socket
Sign inDemoInstall
Socket

codeceptjs

Package Overview
Dependencies
Maintainers
2
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codeceptjs - npm Package Versions

1
ā€¦
ā€¦
24

3.5.5

Diff

Changelog

Source

3.5.5

šŸ› Bug Fixes

  • fix(browserstack): issue with vendor prefix (#3845) - by @KobeNguyenT
export const caps = {
    androidCaps: {
        appiumV2: true,
        host: "hub-cloud.browserstack.com",
        port: 4444,
        user: process.env.BROWSERSTACK_USER,
        key: process.env.BROWSERSTACK_KEY,
        'app': `bs://c700ce60cf13ae8ed97705a55b8e022f1hjhkjh3c5827c`,
        browser: '',
        desiredCapabilities: {
            'appPackage': data.packageName,
            'deviceName': process.env.DEVICE || 'Google Pixel 3',
            'platformName': process.env.PLATFORM || 'android',
            'platformVersion': process.env.OS_VERSION || '10.0',
            'automationName': process.env.ENGINE || 'UIAutomator2',
            'newCommandTimeout': 300000,
            'androidDeviceReadyTimeout': 300000,
            'androidInstallTimeout': 90000,
            'appWaitDuration': 300000,
            'autoGrantPermissions': true,
            'gpsEnabled': true,
            'isHeadless': false,
            'noReset': false,
            'noSign': true,
            'bstack:options' : {
                "appiumVersion" : "2.0.1",
            },
        }
    },
}
  • switchTo/within now supports strict locator (#3847) - by @KobeNguyenT
I.switchTo({ css: 'iframe[id^=number-frame]' }) // support the strict locator

I.amOnPage('/iframe');
within({
  frame: { css: '#number-frame-1234' }, // support the strict locator
}, () => {
  I.fillField('user[login]', 'User');
  I.fillField('user[email]', 'user@user.com');
  I.fillField('user[password]', 'user@user.com');
  I.click('button');
});
  • Improve the IntelliSense when using other languages (#3848) - by @andonary
  include: {
    Je: './steps_file.js'
  }
  • bypassCSP support for Playwright helper (#3865) - by @sammeel
  helpers: {
    Playwright: {
      bypassCSP: true
    }
  • fix: missing requests when recording network (#3834) - by @KobeNguyenT

šŸ›©ļø Features and Improvements

  • Show environment info in verbose mode (#3858) - by @KobeNguyenT
Environment information:-

codeceptVersion:  "3.5.4"
nodeInfo:  18.16.0
osInfo:  macOS 13.5
cpuInfo:  (8) arm64 Apple M1 Pro
chromeInfo:  116.0.5845.179
edgeInfo:  116.0.1938.69
firefoxInfo:  Not Found
safariInfo:  16.6
helpers:  {
"Playwright": {
"url": "https://github.com",
"show": false,
"browser": "chromium",
"waitForNavigation": "load",
"waitForTimeout": 30000,
"trace": false,
"keepTraceForPassedTests": true
},
"CDPHelper": {
"require": "./helpers/CDPHelper.ts"
},
"OpenAI": {
"chunkSize": 8000
},
"ExpectHelper": {
"require": "codeceptjs-expect"
},
"REST": {
"endpoint": "https://reqres.in",
"timeout": 20000
},
"AllureHelper": {
"require": "./helpers/AllureHelper.ts"
}
}
plugins:  {
"screenshotOnFail": {
"enabled": true
},
"tryTo": {
"enabled": true
},
"retryFailedStep": {
"enabled": true
},
"retryTo": {
"enabled": true
},
"eachElement": {
"enabled": true
},
"pauseOnFail": {}
}
***************************************
If you have questions ask them in our Slack: http://bit.ly/chat-codeceptjs
Or ask them on our discussion board: https://codecept.discourse.group/
Please copy environment info when you report issues on GitHub: https://github.com/Codeception/CodeceptJS/issues
***************************************
CodeceptJS v3.5.4 #StandWithUkraine
  • some typings improvements (#3855) - by @nikzupancic
  • support the puppeteer 21.1.1 (#3856) - by @KobeNguyenT
  • fix: support secret value for some methods (#3837) - by @KobeNguyenT
await I.amOnPage('/form/field_values');
await I.dontSeeInField('checkbox[]', secret('not seen one'));
await I.seeInField('checkbox[]', secret('see test one'));
await I.dontSeeInField('checkbox[]', secret('not seen two'));
await I.seeInField('checkbox[]', secret('see test two'));
await I.dontSeeInField('checkbox[]', secret('not seen three'));
await I.seeInField('checkbox[]', secret('see test three'));

šŸ›©ļø Several bugfixes and improvements for Codecept-UI

  • Mask the secret value in UI
  • Improve UX/UI
  • PageObjects are now showing in UI
davert
published 3.5.4 ā€¢

Changelog

Source

3.5.4

šŸ› Bug Fixes:

  • [Playwright] When passing userDataDir, it throws error after test execution (#3814) - by @KobeNguyenT
  • [CodeceptJS-CLI] Improve command to generate types (#3788) - by @KobeNguyenT
  • Heal plugin fix (#3820) - by @davert
  • Fix for error in using all with run-workers (#3805) - by @KobeNguyenT
  helpers: {
    Playwright: {
      url: 'https://github.com',
      show: false,
      browser: 'chromium',
      waitForNavigation: 'load',
      waitForTimeout: 30_000,
      trace: true,
      keepTraceForPassedTests: true
    },
  },
  multiple: {
    profile1: {
      browsers: [
        {
          browser: "chromium",
        }
      ]
    },
  },
  • Highlight elements issues (#3779) (#3778) - by @philkas
  • Support &nbsp symbol in I.see method (#3815) - by @KobeNguyenT
// HTML code uses   instead of space
<div class="dJHe_" style="color: rgb(255, 255, 255);">My&nbsp;Text!</div>

I.see("My Text!") // this test would work with both &nbsp; and space

šŸ“– Documentation

  • Improve the configuration of electron testing when the app is build with electron-forge (#3802) - by @KobeNguyenT
const path = require("path");

exports.config = {
  helpers: {
    Playwright: {
      browser: "electron",
      electron: {
        executablePath: require("electron"),
        args: [path.join(__dirname, ".webpack/main/index.js")],
      },
    },
  },
  // rest of config
}

šŸ›©ļø Features

[Playwright] new features and improvements
  • Parse the response in recording network steps (#3771) - by @KobeNguyenT
      const traffics = await I.grabRecordedNetworkTraffics();
      expect(traffics[0].url).to.equal('https://reqres.in/api/comments/1');
      expect(traffics[0].response.status).to.equal(200);
      expect(traffics[0].response.body).to.contain({ name: 'this was mocked' });

      expect(traffics[1].url).to.equal('https://reqres.in/api/comments/1');
      expect(traffics[1].response.status).to.equal(200);
      expect(traffics[1].response.body).to.contain({ name: 'this was another mocked' });
  • Grab metrics (#3809) - by @KobeNguyenT
const metrics = await I.grabMetrics();

// returned metrics

[
  { name: 'Timestamp', value: 1584904.203473 },
  { name: 'AudioHandlers', value: 0 },
  { name: 'AudioWorkletProcessors', value: 0 },
  { name: 'Documents', value: 22 },
  { name: 'Frames', value: 10 },
  { name: 'JSEventListeners', value: 366 },
  { name: 'LayoutObjects', value: 1240 },
  { name: 'MediaKeySessions', value: 0 },
  { name: 'MediaKeys', value: 0 },
  { name: 'Nodes', value: 4505 },
  { name: 'Resources', value: 141 },
  { name: 'ContextLifecycleStateObservers', value: 34 },
  { name: 'V8PerContextDatas', value: 4 },
  { name: 'WorkerGlobalScopes', value: 0 },
  { name: 'UACSSResources', value: 0 },
  { name: 'RTCPeerConnections', value: 0 },
  { name: 'ResourceFetchers', value: 22 },
  { name: 'AdSubframes', value: 0 },
  { name: 'DetachedScriptStates', value: 2 },
  { name: 'ArrayBufferContents', value: 1 },
  { name: 'LayoutCount', value: 0 },
  { name: 'RecalcStyleCount', value: 0 },
  { name: 'LayoutDuration', value: 0 },
  { name: 'RecalcStyleDuration', value: 0 },
  { name: 'DevToolsCommandDuration', value: 0.000013 },
  { name: 'ScriptDuration', value: 0 },
  { name: 'V8CompileDuration', value: 0 },
  { name: 'TaskDuration', value: 0.000014 },
  { name: 'TaskOtherDuration', value: 0.000001 },
  { name: 'ThreadTime', value: 0.000046 },
  { name: 'ProcessTime', value: 0.616852 },
  { name: 'JSHeapUsedSize', value: 19004908 },
  { name: 'JSHeapTotalSize', value: 26820608 },
  { name: 'FirstMeaningfulPaint', value: 0 },
  { name: 'DomContentLoaded', value: 1584903.690491 },
  { name: 'NavigationStart', value: 1584902.841845 }
]
  • Grab WebSocket (WS) messages (#3789) - by @KobeNguyenT
    • flushWebSocketMessages
    • grabWebSocketMessages
    • startRecordingWebSocketMessages
    • stopRecordingWebSocketMessages
await I.startRecordingWebSocketMessages();
I.amOnPage('https://websocketstest.com/');
I.waitForText('Work for You!');
I.flushNetworkTraffics();
const wsMessages = I.grabWebSocketMessages();
expect(wsMessages.length).to.equal(0);
await I.startRecordingWebSocketMessages();
await I.amOnPage('https://websocketstest.com/');
I.waitForText('Work for You!');
const wsMessages = I.grabWebSocketMessages();
expect(wsMessages.length).to.greaterThan(0);
await I.startRecordingWebSocketMessages();
await I.amOnPage('https://websocketstest.com/');
I.waitForText('Work for You!');
const wsMessages = I.grabWebSocketMessages();
await I.stopRecordingWebSocketMessages();
await I.amOnPage('https://websocketstest.com/');
I.waitForText('Work for You!');
const afterWsMessages = I.grabWebSocketMessages();
expect(wsMessages.length).to.equal(afterWsMessages.length);
  • Move from ElementHandle to Locator. This change is quite major, but it happened under hood, so should not affect your code. (#3738) - by @KobeNguyenT
davert
published 3.5.4-beta.1 ā€¢

davert
published 3.5.3 ā€¢

Changelog

Source

3.5.3

šŸ›©ļø Features

  • [Playwright] Added commands to check network traffic #3748 - by @ngraf @KobeNguyenT
    • startRecordingTraffic
    • grabRecordedNetworkTraffics
    • blockTraffic
    • mockTraffic
    • flushNetworkTraffics
    • stopRecordingTraffic
    • seeTraffic
    • grabTrafficUrl
    • dontSeeTraffic

Examples:

// recording traffics and verify the traffic
  await I.startRecordingTraffic();
  I.amOnPage('https://codecept.io/');
  await I.seeTraffic({ name: 'traffics', url: 'https://codecept.io/img/companies/BC_LogoScreen_C.jpg' });
// block the traffic
  I.blockTraffic('https://reqres.in/api/comments/*');
  await I.amOnPage('/form/fetch_call');
  await I.startRecordingTraffic();
  await I.click('GET COMMENTS');
  await I.see('Can not load data!');
// check the traffic with advanced params
  I.amOnPage('https://openai.com/blog/chatgpt');
  await I.startRecordingTraffic();
  await I.seeTraffic({
    name: 'sentry event',
    url: 'https://images.openai.com/blob/cf717bdb-0c8c-428a-b82b-3c3add87a600',
    parameters: {
      width: '1919',
      height: '1138',
    },
  });

šŸ› Bugfix

  • [retryStepPlugin] Fix retry step when using global retry #3768 - by @KobeNguyenT

šŸ—‘ Deprecated

  • Nightmare and Protractor helpers have been deprecated
davert
published 3.5.2 ā€¢

Changelog

Source

3.5.2

šŸ› Bug Fixes

  • [Playwright] reverted clearField to previous implementation
  • [OpenAI] fixed running helper in pause mode. #3755 by @KobeNguyenT
davert
published 3.5.1 ā€¢

Changelog

Source

3.5.1

šŸ›©ļø Features

  • [Puppeteer][WebDriver][TestCafe] Added methods by @KobeNguyenT in #3737
    • blur
    • focus
  • Improved BDD output to print steps without I. commands` by @davertmik #3739
  • Improved codecept init setup for Electron tests by @KobeNguyenT. See #3733

šŸ› Bug Fixes

  • Fixed serializing of custom errors making tests stuck. Fix #3739 by @davertmik.

šŸ“– Documentation

  • Fixed Playwright docs by @Horsty80
  • Fixed ai docs by @ngraf
  • Various fixes by @KobeNguyenT
davert
published 3.5.0 ā€¢

Changelog

Source

3.5.0

šŸ›©ļø Features

  • šŸŖ„ AI Powered Test Automation - use OpenAI as a copilot for test automation. #3713 By @davertmik

  • [Playwright][Puppeteer][WebDriver] Highlight the interacting elements in debug mode or with highlightElement option set (#3672) - by @KobeNguyenT

  • [Playwright] Support for APIs in Playwright (#3665) - by Egor Bodnar

    • clearField replaced to use new Playwright API
    • blur added
    • focus added
  • Added support for multiple browsers in run-workers (#3606) by @karanshah-browserstack :

Multiple browsers configured as profiles:

exports.config = {
  helpers: {
    WebDriver: {
      url: 'http://localhost:3000',
    }
  },
  multiple: {
    profile1: {
      browsers: [
        {
          browser: "firefox",
        },
        {
          browser: "chrome",
        }
      ]
    }, 

And executed via run-workers with all argument

npx codeceptjs run-workers 2 all
  • [Appium] Add Appium v2 support (#3622) - by @KobeNguyenT
  • Improve gpo command to create page objects as modules or as classes (#3625) - by @KobeNguyenT
  • Added emptyOutputFolder config to clean up output before running tests (#3604) - by @KobeNguyenT
  • Add secret() function support to append() and type() (#3615) - by @anils92
  • [Playwright] Add bypassCSP option to helper's config (#3641) - by @KobeNguyenT
  • Print number of tests for each suite in dryRun (#3620) - by @KobeNguyenT

šŸ› Bug Fixes

  • Support --grep in dry-run command (#3673) - by @KobeNguyenT
  • Fix typings improvements in playwright (#3650) - by @KobeNguyenT
  • Fixed global retry #3667 by @KobeNguyenT
  • Fixed creating JavaScript test using "codeceptjs gt" (#3611) - by Jaromir Obr
davert
published 3.4.1 ā€¢

Changelog

Source

3.4.1

  • Updated mocha to v 10.2. Fixes #3591
  • Fixes executing a faling Before hook. Resolves #3592
davert
published 3.4.0 ā€¢

Changelog

Source

3.4.0

  • Updated to latest mocha and modern Cucumber
  • Allure plugin moved to @codeceptjs/allure-legacy package. This happened because allure-commons package v1 was not updated and caused vulnarabilities. Fixes #3422. We don't plan to maintain allure v2 plugin so it's up to community to take this initiative. Current allure plugin will print a warning message without interfering the run, so it won't accidentally fail your builds.
  • Added ability to retry Before, BeforeSuite, After, AfterSuite hooks by @davertmik:
Feature('flaky Before & BeforeSuite', { retryBefore: 2, retryBeforeSuite: 3 })
retry: [
  {
    // enable this config only for flaky tests
    grep: '@flaky', 
    Before: 3 // retry Before 3 times
    Scenario: 3 // retry Scenario 3 times
  }, 
  {
    // retry less when running slow tests
    grep: '@slow' 
    Scenario: 1
    Before: 1
  }, {
    // retry all BeforeSuite 3 times
    BeforeSuite: 3
  }
]
timeout: [
  10, // default timeout is 10secs  
  {   // but increase timeout for slow tests
    grep: '@slow',
    Feature: 50
  },
]
  • JsDoc: Removed promise from I.say. See #3535 by @danielrentz
  • [Playwright] handleDownloads requires now a filename param. See #3511 by @PeterNgTr
  • [WebDriver] Added support for v8, removed support for webdriverio v5 and lower. See #3578 by @PeterNgTr
davert
published 3.4.0-beta.1 ā€¢

1
ā€¦
ā€¦
24
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc