-
Notifications
You must be signed in to change notification settings - Fork 193
[full-ci][tests-only] test: convert tiles.feature test to playwright #13396
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,76 @@ | ||
| import { test } from '@playwright/test' | ||
| import { config } from './../../../e2e/config.js' | ||
| import { ActorsEnvironment, UsersEnvironment } from '../../../e2e/support/environment' | ||
| import { setAccessAndRefreshToken } from '../../helpers/setAccessAndRefreshToken' | ||
| import * as api from '../../steps/api/api' | ||
| import * as ui from '../../steps/ui/index' | ||
|
|
||
| test.describe('tiles view', { tag: '@predefined-users' }, () => { | ||
| let actorsEnvironment: ActorsEnvironment | ||
| const usersEnvironment = new UsersEnvironment() | ||
|
|
||
| test.beforeEach(async ({ browser }) => { | ||
| actorsEnvironment = new ActorsEnvironment({ | ||
| context: { | ||
| acceptDownloads: config.acceptDownloads, | ||
| reportDir: config.reportDir, | ||
| tracingReportDir: config.tracingReportDir, | ||
| reportHar: config.reportHar, | ||
| reportTracing: config.reportTracing, | ||
| reportVideo: config.reportVideo, | ||
| failOnUncaughtConsoleError: config.failOnUncaughtConsoleError | ||
| }, | ||
| browser: browser | ||
| }) | ||
|
|
||
| await setAccessAndRefreshToken(usersEnvironment) | ||
|
|
||
| // Given "Admin" creates following user using API | ||
| await api.userHasBeenCreated({ usersEnvironment, stepUser: 'Admin', userToBeCreated: 'Alice' }) | ||
| // And "Alice" logs in | ||
| await ui.logInUser({ usersEnvironment, actorsEnvironment, stepUser: 'Alice' }) | ||
| // And "Alice" creates the following resources | ||
| await api.userHasCreatedFolder({ | ||
| usersEnvironment, | ||
| stepUser: 'Alice', | ||
| folderName: 'tile_folder' | ||
| }) | ||
| }) | ||
|
|
||
| test.afterEach(async () => { | ||
| await api.deleteUser({ usersEnvironment, stepUser: 'Admin', targetUser: 'Alice' }) | ||
| }) | ||
|
|
||
| test('Users can navigate web via tiles', async () => { | ||
| // When "Alice" switches to the tiles-view | ||
| await ui.switchToTilesViewMode({ | ||
| actorsEnvironment, | ||
| stepUser: 'Alice' | ||
| }) | ||
| // Then "Alice" sees the resources displayed as tiles | ||
| await ui.shouldSeeResourcesAsTiles({ | ||
| actorsEnvironment, | ||
| stepUser: 'Alice' | ||
| }) | ||
| // And "Alice" opens folder "tile_folder" | ||
| await ui.openFolder({ | ||
| actorsEnvironment, | ||
| stepUser: 'Alice', | ||
| resource: 'tile_folder' | ||
| }) | ||
| // And "Alice" creates the following resources | ||
| await ui.createResource({ | ||
| actorsEnvironment, | ||
| stepUser: 'Alice', | ||
| type: 'folder', | ||
| resource: 'tile_folder/tile_folder2' | ||
| }) | ||
| // And "Alice" sees the resources displayed as tiles | ||
| await ui.shouldSeeResourcesAsTiles({ | ||
| actorsEnvironment, | ||
| stepUser: 'Alice' | ||
| }) | ||
| // And "Alice" logs out | ||
| await ui.logOutUser({ actorsEnvironment, stepUser: 'Alice' }) | ||
| }) | ||
| }) |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.