-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c94519b
commit 5699618
Showing
16 changed files
with
267 additions
and
206 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import {expect} from '@e2e-support/test_fixture'; | ||
|
||
import PluginPage from '../pages/legal_hold_plugin'; | ||
|
||
export async function createLegalHold( | ||
pluginPage: PluginPage, | ||
name: string, | ||
usernames: string[], | ||
startDate: string, | ||
includePublicChannels = false, | ||
endDate = '', | ||
) { | ||
// Click create new button and check that modal is displayed | ||
await pluginPage.createNewButton.click(); | ||
await pluginPage.createModal.toBeVisible(); | ||
|
||
// Enter name | ||
await pluginPage.createModal.nameInput.fill(name); | ||
|
||
// Select users | ||
for (const username of usernames) { | ||
await pluginPage.createModal.usernameInput.fill(username); | ||
await pluginPage.selectUsername(username); | ||
} | ||
|
||
// Enter start and end date | ||
await pluginPage.createModal.startingFromInput.fill(startDate); | ||
|
||
if (endDate) { | ||
await pluginPage.createModal.endingAtInput.fill(endDate); | ||
} | ||
|
||
// Set wether to include public channels | ||
if (includePublicChannels) { | ||
await pluginPage.createModal.includePublicChannelsCheckbox.check(); | ||
} else { | ||
await pluginPage.createModal.includePublicChannelsCheckbox.uncheck(); | ||
} | ||
|
||
// Click create and check that modal is not visible | ||
await expect(pluginPage.createModal.createButton).toBeEnabled(); | ||
await pluginPage.createModal.createButton.click(); | ||
await pluginPage.createModal.container.waitFor({state: 'hidden'}); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.