forked from superdesk/superdesk-client-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into templates-e2e-test
- Loading branch information
Showing
38 changed files
with
3,533 additions
and
299 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,62 @@ | ||
import {test, expect} from '@playwright/test'; | ||
import {Monitoring} from './page-object-models/monitoring'; | ||
import {restoreDatabaseSnapshot, s} from './utils'; | ||
|
||
test.setTimeout(50000); | ||
|
||
/** | ||
* publish an item | ||
* correct it - change headline, body | ||
* send correction, open the item again and see if changes persist | ||
* | ||
* test added after discovering a bug SDESK-7248 | ||
*/ | ||
test('correcting with unsaved changes', async ({page}) => { | ||
const getHeadlineField = async () => await page.locator(s('authoring', 'field--headline')).getByRole('textbox'); | ||
const getBodyField = async () => | ||
await page.locator(s('authoring', 'authoring-field=body_html')).getByRole('textbox'); | ||
|
||
await restoreDatabaseSnapshot(); | ||
|
||
const monitoring = new Monitoring(page); | ||
|
||
await page.goto('/#/workspace/monitoring'); | ||
|
||
await monitoring.selectDeskOrWorkspace('Sports'); | ||
|
||
// publishing the article start | ||
|
||
await page.locator( | ||
s('monitoring-group=Sports / Working Stage', 'article-item=test sports story'), | ||
).dblclick(); | ||
|
||
await page.locator(s('authoring', 'open-send-publish-pane')).click(); | ||
await page.locator(s('authoring', 'publish')).click(); | ||
|
||
// publishing the article end | ||
|
||
// TODO: should be 'monitoring-group=Sports / output' | ||
await page.locator( | ||
s('monitoring-group=Sports', 'article-item=test sports story'), | ||
).dblclick({timeout: 10000}); // need to wait until published item appears in output | ||
|
||
await page.locator(s('authoring', 'authoring-topbar')).getByLabel('Correct').click(); | ||
|
||
await (await getHeadlineField()).clear(); | ||
await (await getHeadlineField()).fill('test sports story [corrected]'); | ||
|
||
await (await getBodyField()).clear(); | ||
await (await getBodyField()).fill('test sport story body [corrected]'); | ||
|
||
await page.locator(s('authoring', 'authoring-topbar')).getByRole('button', {name: 'Send Correction'}).click(); | ||
|
||
await page.locator( | ||
s('monitoring-group=Sports', 'article-item=test sports story [corrected]'), | ||
).dblclick({timeout: 10000}); // need to wait until published item appears in output | ||
|
||
// initialize correction only to make field editable and accessible using the same selector | ||
await page.locator(s('authoring', 'authoring-topbar')).getByLabel('Correct').click(); | ||
|
||
await expect((await getHeadlineField())).toHaveText('test sports story [corrected]'); | ||
await expect((await getBodyField())).toHaveText('test sport story body [corrected]'); | ||
}); |
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,28 @@ | ||
import {test, expect} from '@playwright/test'; | ||
import {Monitoring} from './page-object-models/monitoring'; | ||
import {restoreDatabaseSnapshot, s} from './utils'; | ||
|
||
test.setTimeout(50000); | ||
|
||
test.skip('item appearing in publish queue after publishing', async ({page}) => { | ||
const monitoring = new Monitoring(page); | ||
|
||
await restoreDatabaseSnapshot(); | ||
await page.goto('/#/workspace/monitoring'); | ||
|
||
await monitoring.executeActionOnMonitoringItem( | ||
page.locator(s('article-item=test sports story')), | ||
'Edit', | ||
); | ||
|
||
await page.locator(s('authoring', 'open-send-publish-pane')).click(); | ||
await page.locator(s('authoring', 'interactive-actions-panel', 'publish')).click(); | ||
|
||
await expect(page.locator( | ||
s('monitoring-group=Sports', 'article-item=test sports story'), | ||
)).toBeAttached({timeout: 10000}); | ||
|
||
await page.goto('/#/publish_queue'); | ||
|
||
await expect(page.locator(s('publish-queue-item=test sports story'))).toBeAttached({timeout: 10000}); | ||
}); |
Binary file removed
BIN
-866 Bytes
e2e/client/test-results/user-management-creating-a-new-user-chromium/trace.zip
Binary file not shown.
Binary file removed
BIN
-864 Bytes
e2e/client/test-results/user-profile-switching-system-language-chromium/trace.zip
Binary file not shown.
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.