test(app): shell proof of the sheet list search, sort and dates
admin-sheets-list.spec.ts (sandbox, fr and en, desktop and 375 px): three
draft sheets of this run, the oldest saved last; search, count line against
the list answer of the same load, order by last modification then by name,
the Paris date format, a search cut at 100 characters and its clearing, axe
and no sideways scroll on the searched list, the empty state and
/app/admin; the home's latest changes. Teardown soft-deletes only the ids
this run created (D7).
allSheetsLink (e2e/support/admin.ts): the sheets card link named
admin.home.all_sheets or admin.home.see_all with any number.
R-24, locators rewritten (assertions unchanged):
- admin.spec.ts A1: areaCard(...).getByRole('link', { name:
dict['admin.home.all_sheets'] }) -> allSheetsLink(areaCard(...), dict)
- admin.spec.ts access per right: sheets.getByRole('link', { name:
dict['admin.home.all_sheets'] }) -> allSheetsLink(sheets, dict)
- editor-journey.spec.ts createSheetFromAdmin: section locator
.getByRole('link', { name: dict['admin.home.all_sheets'] }) ->
allSheetsLink(section locator, dict)
This commit is contained in:
1 parent
2326e1cb15
commit
b4a5254068
4 files changed
+353
-11
No files matched your search
@@ -11,6 +11,7 @@ import {
|
||||
test,
|
||||
} from '../support/browser'
|
||||
import {
|
||||
allSheetsLink,
|
||||
assignRole,
|
||||
enrolVerifiedFactor,
|
||||
enterCode,
|
||||
@@ -457,9 +458,7 @@ for (const [locale, dict] of LANGUAGES) {
|
||||
requests.forbid(account.email, account.password, account.displayName)
|
||||
await openAdmin(page, dict, info, account, secret)
|
||||
|
||||
await areaCard(page, 'admin-sheets-title')
|
||||
.getByRole('link', { name: dict['admin.home.all_sheets'] })
|
||||
.click()
|
||||
await allSheetsLink(areaCard(page, 'admin-sheets-title'), dict).click()
|
||||
await expect(heading(page, dict['admin.sheets.title'])).toBeVisible()
|
||||
await main(page)
|
||||
.getByRole('link', { name: dict['admin.sheets.new'] })
|
||||
@@ -668,9 +667,7 @@ for (const [locale, dict] of LANGUAGES) {
|
||||
page.getByRole('button', { name: dict['admin.working_copy.create'] }),
|
||||
).toHaveCount(0)
|
||||
await expect(areaCard(page, 'admin-access-title')).toHaveCount(0)
|
||||
await sheets
|
||||
.getByRole('link', { name: dict['admin.home.all_sheets'] })
|
||||
.click()
|
||||
await allSheetsLink(sheets, dict).click()
|
||||
await expect(heading(page, dict['admin.sheets.title'])).toBeVisible()
|
||||
await expect(
|
||||
page.getByRole('link', { name: dict['admin.sheets.new'] }),
|
||||
|
||||
Reference in new issue
Block a user