mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-10-20 18:56:30 +00:00
Accounts, Contacts and Sidebar specs: follow the current table layout, run them
The three suites were skipped since the table rework. What changed under them: - An account or contact spans three rows (main, total balance, details), marked from isFirst; the helpers paired rows by two and filtered on a row class the rows no longer carry. A collapsed details row is hidden, so rows are read including hidden ones. - Accounts render one table per account group; the page object reads the rows of every group table in order, and the sorting fixture keeps its three accounts in one group, since sorting applies within a group. - The expand toggle is the row's expand column, not a row-toggle element. - useAccountInfo reads ownership from the keyring context, which the test page did not provide, so saving a name did nothing; the page now renders the real KeyringCtxRoot. The mock api gains consts.system.ss58Prefix. - Badge popups (react-tooltip v6) render only while hovered; the specs hover the badge first. The multisig badge needs the isMultisig flag. - Addresses are shown in full and shortened by css; the fixtures with shortened addresses are gone. - The total balance, transferable and locked cards are always shown, as placeholders without accounts; the specs check that instead of their absence. - Checks that needed matchers the runner lacks (not.toHaveLength, toHaveProperty, toThrow with a contained message) are written against the DOM directly.
This commit is contained in:
1 parent
61c681567d
commit
3767c819e3
11 files changed
+136
-107
No files matched your search
@@ -19,9 +19,7 @@ await mockAddressesPageHooks();
|
||||
|
||||
const { AddressesPage } = await import('../../test/pages/addressesPage.js');
|
||||
|
||||
// FIXME isSplit Table
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
describe.skip('Addresses page', () => {
|
||||
describe('Addresses page', () => {
|
||||
let addressesPage: InstanceType<typeof AddressesPage>;
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -133,7 +131,7 @@ describe.skip('Addresses page', () => {
|
||||
|
||||
assertHasClass(row.detailsRow, 'isCollapsed');
|
||||
|
||||
await row.expand();
|
||||
row.expand();
|
||||
|
||||
assertHasClass(row.detailsRow, 'isExpanded');
|
||||
});
|
||||
|
||||
@@ -16,8 +16,7 @@ const NOOP_CHANGE = () => undefined;
|
||||
export class AddressesPage extends Page {
|
||||
constructor () {
|
||||
super(
|
||||
<AddressOverview onStatusChange={NOOP_CHANGE} />,
|
||||
'Address-'
|
||||
<AddressOverview onStatusChange={NOOP_CHANGE} />
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user