Skip to content

Commit

Permalink
add ts spec files to the filter and make another test fail to verify …
Browse files Browse the repository at this point in the history
…logic is working properly in failing tests
  • Loading branch information
seaona committed May 20, 2024
1 parent 90690cd commit 65b3467
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion test/e2e/fetch-changed-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ async function fetchChangedE2eFiles() {
.filter(
(file) =>
file.filename.startsWith('test/e2e/') &&
file.filename.endsWith('.spec.js'),
(file.filename.endsWith('.spec.js') ||
file.filename.endsWith('.spec.ts')),
)
.map((file) => file.filename)
.join('\n');
Expand Down
7 changes: 6 additions & 1 deletion test/e2e/run-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,12 @@ async function main() {

console.log('My test list:', myTestList);

const changedOrNewTests = await fetchChangedE2eFiles();
let changedOrNewTests = '';
try {
changedOrNewTests = await fetchChangedE2eFiles();
} catch (error) {
console.error('Error fetching changed e2e files:', error);
}
console.log('Spec files that will be re-run:', changedOrNewTests);

// spawn `run-e2e-test.js` for each test in myTestList
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/tests/signature/eth-sign.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
const FixtureBuilder = require('../../fixture-builder');

describe('Eth sign', function () {
it('will detect if eth_sign is disabled', async function () {
it('CHANGED TO TEST CI -will detect if eth_sign is disabled', async function () {
await withFixtures(
{
dapp: true,
Expand All @@ -25,7 +25,7 @@ describe('Eth sign', function () {
await unlockWallet(driver);

await openDapp(driver);
await driver.clickElement('#ethSign');
await driver.clickElement('#BAD-ID-TO-FAIL-ON-PURPOSE');

await driver.delay(1000);
const ethSignButton = await driver.findElement('#ethSign');
Expand Down

0 comments on commit 65b3467

Please sign in to comment.