[tests-only][full-ci] test: backport fix for flaky e2e test (#12779)
* test: slow down test run Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com> * test: scope temp upload path per Playwright worker Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com> * test: login user after creating resources via API Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com> --------- Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
This commit is contained in:
1 parent
b7d887527b
commit
544ebe5cad
3 files changed
+13
-4
No files matched your search
@@ -3,7 +3,10 @@ const withHttp = (url) => (/^https?:\/\//i.test(url) ? url : `https://${url}`)
|
||||
export const config = {
|
||||
// environment
|
||||
assets: './tests/e2e/filesForUpload',
|
||||
tempAssetsPath: './tests/e2e/filesForUpload/temp',
|
||||
// scoped per Playwright worker so that parallel workers never share/clean up each other's temp upload files
|
||||
get tempAssetsPath() {
|
||||
return `./tests/e2e/filesForUpload/temp-${process.env.TEST_WORKER_INDEX ?? '0'}`
|
||||
},
|
||||
baseUrlOcis: process.env.BASE_URL_OCIS ?? 'host.docker.internal:9200',
|
||||
basicAuth: process.env.BASIC_AUTH === 'true',
|
||||
testType: process.env.TEST_TYPE ?? 'playwright',
|
||||
|
||||
@@ -231,6 +231,11 @@ test.describe('link', () => {
|
||||
'public link for folder and file (by authenticated user)',
|
||||
{ tag: '@predefined-users' },
|
||||
async () => {
|
||||
// This journey opens/authenticates/views/downloads 6 public links for each of
|
||||
// 3 users (Brian, Carol, Anonymous), each cycling a11y scans
|
||||
// it consistently runs beyond the default 180s budget.
|
||||
test.slow()
|
||||
|
||||
// Given "Admin" creates following user using API
|
||||
// | id |
|
||||
// | Brian |
|
||||
|
||||
@@ -10,9 +10,6 @@ test.describe('Users can use web to organize tags', () => {
|
||||
// | Alice |
|
||||
// | Brian |
|
||||
await api.usersHaveBeenCreated({ stepUser: 'Admin', users: ['Alice', 'Brian'] })
|
||||
|
||||
// Given "Alice" logs in
|
||||
await ui.userLogsIn({ stepUser: 'Alice' })
|
||||
})
|
||||
|
||||
test('Tag management', { tag: '@predefined-users' }, async () => {
|
||||
@@ -23,6 +20,7 @@ test.describe('Users can use web to organize tags', () => {
|
||||
stepUser: 'Alice',
|
||||
files: [{ pathToFile: 'lorem.txt', content: 'lorem ipsum' }]
|
||||
})
|
||||
await ui.userLogsIn({ stepUser: 'Alice' })
|
||||
// And "Alice" adds the following tags for the following resources using the sidebar panel
|
||||
// | resource | tags |
|
||||
// | lorem.txt | tag 1, tag 2 |
|
||||
@@ -77,6 +75,7 @@ test.describe('Users can use web to organize tags', () => {
|
||||
stepUser: 'Alice',
|
||||
files: [{ pathToFile: 'lorem.txt', content: 'lorem ipsum' }]
|
||||
})
|
||||
await ui.userLogsIn({ stepUser: 'Alice' })
|
||||
// When "Alice" tries to add the following tag for the following resources using the sidebar panel
|
||||
// | resource | tags |
|
||||
// | lorem.txt | Loremipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore |
|
||||
@@ -115,6 +114,7 @@ test.describe('Users can use web to organize tags', () => {
|
||||
{ pathToFile: 'textfile.txt', content: 'test file' }
|
||||
]
|
||||
})
|
||||
await ui.userLogsIn({ stepUser: 'Alice' })
|
||||
// And "Alice" adds the following tags for the following resources using the sidebar panel
|
||||
// | resource | tags |
|
||||
// | lorem.txt | tag1, tag2 |
|
||||
@@ -161,6 +161,7 @@ test.describe('Users can use web to organize tags', () => {
|
||||
stepUser: 'Alice',
|
||||
files: [{ pathToFile: 'folder_to_shared/lorem.txt', content: 'lorem ipsum' }]
|
||||
})
|
||||
await ui.userLogsIn({ stepUser: 'Alice' })
|
||||
// And "Alice" adds the following tags for the following resources using the sidebar panel
|
||||
// | resource | tags |
|
||||
// | folder_to_shared/lorem.txt | tag 1, tag 2 |
|
||||
|
||||
Reference in new issue
Block a user