-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: use github ci #640
base: master
Are you sure you want to change the base?
chore: use github ci #640
Conversation
b7d25f8
to
7400473
Compare
✅ Testplane run succeed |
7400473
to
969cec5
Compare
7efeb5c
to
aec1134
Compare
aec1134
to
8f14a0a
Compare
destination_dir: ${{ env.DEST_REPORTS_DIR }} | ||
keep_files: true | ||
|
||
- name: Construct failed PR comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't figure out smarter way to do this.
I tried constructing variables like STEP_TESTPLANE_TESTPLANE_COMMON_OUTCOME
and evaluating them, but it does not work
@@ -38,7 +38,7 @@ test.describe('failed describe', () => { | |||
test('test with successful assertView and error', async ({page, baseURL}) => { | |||
await page.goto(baseURL as string); | |||
|
|||
await expect(page.locator('header')).toHaveScreenshot('header-success.png'); | |||
await expect(page.locator('header')).toHaveScreenshot('header-success.png', {maxDiffPixelRatio: 1}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As its "test with successful assertView" (fixture), we can make this test 100% stable
@@ -8,6 +8,6 @@ describe('success describe', function() { | |||
it('test with screenshot', async ({browser}) => { | |||
await browser.url(browser.options.baseUrl); | |||
|
|||
await browser.assertView('header', 'header'); | |||
await browser.assertView('header', 'header', {ignoreDiffPixelCount: '100%'}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As its "success-describe" (fixture), we can make this test 100% stable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied from "testplane-gui"
}).on('error', err => { | ||
if (err.code === 'EADDRINUSE') { | ||
console.warn(`Skip running server, because port ${port} is busy`); | ||
} else { | ||
throw err; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We run Testplane (which uses this html-reporter-test-server and opens the server on SERVER_PORT)
- Testplane runs Testplane GUI (port GUI_PORT)
- Testplane GUI uses html-reporter-test-server and tries to run server on SERVER_PORT
- Testplane runs Testplane GUI (port GUI_PORT)
getTestStateByNameSelector('header') + | ||
getElementWithTextSelector('span', field) + '/..' | ||
); | ||
const errorMessage = await parentElement.$(getElementWithTextSelector('span', field) + '/..'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, it didn't work that way (though only for "name")
@@ -15,7 +15,7 @@ describe('Test redux plugin', function() { | |||
await browser.$(screenSelector).waitForDisplayed(); | |||
await browser.$(clickSelector).click(); | |||
// Letting browser handle re-renders | |||
await browser.pause(300); | |||
await browser.pause(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
500 wasn't enough either
- name: Leave failed comment to PR with link to Testplane HTML reports | ||
if: env.IS_FAILED | ||
id: leave-failed-comment-step | ||
uses: thollander/actions-comment-pull-request@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.