mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
Added Playwright test - remove labels from members
ref https://github.com/TryGhost/Team/issues/2371 - check that a fitered list of members can have a label removed from them at once.
This commit is contained in:
parent
559ca9d866
commit
e52f29231f
@ -236,6 +236,9 @@ test.describe('Admin', () => {
|
||||
expect(csvContents).toMatch(csvRegex);
|
||||
});
|
||||
|
||||
// saves time by going directly to the members page with the label filter applied
|
||||
let labelFilterUrl;
|
||||
|
||||
test('A filtered list of members can have a label added to them', async ({page}) => {
|
||||
await page.goto('/ghost');
|
||||
await page.locator('.gh-nav a[href="#/members/"]').click();
|
||||
@ -259,6 +262,19 @@ test.describe('Admin', () => {
|
||||
await page.waitForSelector('div[data-test-state="add-complete"]');
|
||||
const success = await page.locator('div[data-test-state="add-complete"] > div > p').innerText();
|
||||
expect(success).toEqual('Label added to 3 members successfully');
|
||||
labelFilterUrl = await page.url();
|
||||
});
|
||||
|
||||
test('A filtered list of members can have a label removed from them', async ({page}) => {
|
||||
await page.goto(labelFilterUrl);
|
||||
await page.waitForSelector('button[data-test-button="members-actions"]');
|
||||
await page.locator('button[data-test-button="members-actions"]').click();
|
||||
await page.waitForSelector('button[data-test-button="remove-label-selected"]');
|
||||
await page.locator('button[data-test-button="remove-label-selected"]').click();
|
||||
await page.locator('div[data-test-state="remove-label-unconfirmed"] > span > select').selectOption({label: 'old'});
|
||||
await page.locator('button[data-test-button="confirm"]').click();
|
||||
const success = await page.locator('div[data-test-state="add-complete"] > div > p').innerText();
|
||||
expect(success).toEqual('Label removed from 3 members successfully');
|
||||
});
|
||||
|
||||
test('A member can be granted a comp in admin', async ({page}) => {
|
||||
|
Loading…
Reference in New Issue
Block a user