-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test-visibility] Update test code owners extraction logic to use tes…
…t source file (#4560)
- Loading branch information
1 parent
f32deff
commit ce92d59
Showing
22 changed files
with
364 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# CODEOWNERS for testing purposes | ||
ci-visibility/subproject @datadog-dd-trace-js |
9 changes: 9 additions & 0 deletions
9
integration-tests/ci-visibility/subproject/cypress-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"video": false, | ||
"screenshotOnRunFailure": false, | ||
"pluginsFile": "cypress/plugins-old/index.js", | ||
"supportFile": "cypress/support/e2e.js", | ||
"integrationFolder": "cypress/e2e", | ||
"defaultCommandTimeout": 100, | ||
"nodeVersion": "system" | ||
} |
11 changes: 11 additions & 0 deletions
11
integration-tests/ci-visibility/subproject/cypress.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
defaultCommandTimeout: 100, | ||
e2e: { | ||
setupNodeEvents (on, config) { | ||
return require('dd-trace/ci/cypress/plugin')(on, config) | ||
}, | ||
specPattern: process.env.SPEC_PATTERN || 'cypress/e2e/**/*.cy.js' | ||
}, | ||
video: false, | ||
screenshotOnRunFailure: false | ||
} |
8 changes: 8 additions & 0 deletions
8
integration-tests/ci-visibility/subproject/cypress/e2e/spec.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* eslint-disable */ | ||
describe('context', () => { | ||
it('passes', () => { | ||
cy.visit('/') | ||
.get('.hello-world') | ||
.should('have.text', 'Hello World') | ||
}) | ||
}) |
1 change: 1 addition & 0 deletions
1
integration-tests/ci-visibility/subproject/cypress/plugins-old/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('dd-trace/ci/cypress/plugin') |
2 changes: 2 additions & 0 deletions
2
integration-tests/ci-visibility/subproject/cypress/support/e2e.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// eslint-disable-next-line | ||
require('dd-trace/ci/cypress/support') |
4 changes: 4 additions & 0 deletions
4
integration-tests/ci-visibility/subproject/features/greetings.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Feature: Greetings | ||
Scenario: Say greetings | ||
When the greeter says greetings | ||
Then I should have heard "greetings" |
15 changes: 15 additions & 0 deletions
15
integration-tests/ci-visibility/subproject/features/support/steps.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const assert = require('assert') | ||
const { When, Then } = require('@cucumber/cucumber') | ||
class Greeter { | ||
sayGreetings () { | ||
return 'greetings' | ||
} | ||
} | ||
|
||
When('the greeter says greetings', function () { | ||
this.whatIHeard = new Greeter().sayGreetings() | ||
}) | ||
|
||
Then('I should have heard {string}', function (expectedResponse) { | ||
assert.equal(this.whatIHeard, expectedResponse) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "subproject", | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "app within repo" | ||
} |
13 changes: 13 additions & 0 deletions
13
integration-tests/ci-visibility/subproject/playwright-tests/landing-page-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { test, expect } = require('@playwright/test') | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto(process.env.PW_BASE_URL) | ||
}) | ||
|
||
test.describe('playwright', () => { | ||
test('should work with passing tests', async ({ page }) => { | ||
await expect(page.locator('.hello-world')).toHaveText([ | ||
'Hello World' | ||
]) | ||
}) | ||
}) |
18 changes: 18 additions & 0 deletions
18
integration-tests/ci-visibility/subproject/playwright.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Playwright config file for integration tests | ||
const { devices } = require('@playwright/test') | ||
|
||
const config = { | ||
baseURL: process.env.PW_BASE_URL, | ||
testDir: './playwright-tests', | ||
timeout: 30000, | ||
reporter: 'line', | ||
projects: [ | ||
{ | ||
name: 'chromium', | ||
use: devices['Desktop Chrome'] | ||
} | ||
], | ||
testMatch: '**/*-test.js' | ||
} | ||
|
||
module.exports = config |
9 changes: 9 additions & 0 deletions
9
integration-tests/ci-visibility/subproject/subproject-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// eslint-disable-next-line | ||
const { expect } = require('chai') | ||
|
||
describe('subproject-test', () => { | ||
it('can run', () => { | ||
// eslint-disable-next-line | ||
expect(1).to.equal(1) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { describe, test, expect } from 'vitest' | ||
|
||
describe('context', () => { | ||
test('can report passed test', () => { | ||
expect(1 + 2).to.equal(3) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.