Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions cypress/integration/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('List Page', () => {

describe('Title', () => {
it('should show the correct title in the appBar', () => {
cy.get(ListPagePosts.elements.title).contains('Posts List');
cy.get(ListPagePosts.elements.title).contains('Posts');
});
});

Expand All @@ -24,7 +24,9 @@ describe('List Page', () => {
cy.viewport(1280, 500);

cy.scrollTo(0, 200);
cy.get(ListPagePosts.elements.headroomUnpinned).should('not.be.visible');
cy.get(ListPagePosts.elements.headroomUnpinned).should(
'not.be.visible'
);

cy.scrollTo(0, -100);
cy.get(ListPagePosts.elements.headroomUnfixed).should('be.visible');
Expand Down Expand Up @@ -223,13 +225,15 @@ describe('List Page', () => {
});
});

describe("Sorting", () => {
describe('Sorting', () => {
it('should display a sort arrow when clicking on a sortable column header', () => {
ListPagePosts.toggleColumnSort('id');
cy.get(ListPagePosts.elements.svg('id')).should('be.visible');

ListPagePosts.toggleColumnSort('tags.name');
cy.get(ListPagePosts.elements.svg('tags.name')).should('be.visible');
cy.get(ListPagePosts.elements.svg('tags.name')).should(
'be.visible'
);
});

it('should hide the sort arrow when clicking on another sortable column header', () => {
Expand All @@ -241,10 +245,20 @@ describe('List Page', () => {
it('should reverse the sort arrow when clicking on an already sorted column header', () => {
ListPagePosts.toggleColumnSort('published_at');
ListPagePosts.toggleColumnSort('tags.name');
cy.get(ListPagePosts.elements.svg('tags.name', '[class*=iconDirectionAsc]')).should('exist');
cy.get(
ListPagePosts.elements.svg(
'tags.name',
'[class*=iconDirectionAsc]'
)
).should('exist');

ListPagePosts.toggleColumnSort('tags.name');
cy.get(ListPagePosts.elements.svg('tags.name', '[class*=iconDirectionDesc]')).should('exist');
cy.get(
ListPagePosts.elements.svg(
'tags.name',
'[class*=iconDirectionDesc]'
)
).should('exist');
});
})
});
});
4 changes: 2 additions & 2 deletions packages/ra-language-english/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
dashboard: 'Dashboard',
edit: '%{name} #%{id}',
error: 'Something went wrong',
list: '%{name} List',
list: '%{name}',
loading: 'Loading',
not_found: 'Not Found',
show: '%{name} #%{id}',
Expand Down Expand Up @@ -105,7 +105,7 @@ module.exports = {
data_provider_error:
'dataProvider error. Check the console for details.',
canceled: 'Action cancelled',
logged_out: 'Your session has ended, please reconnect.'
logged_out: 'Your session has ended, please reconnect.',
},
validation: {
required: 'Required',
Expand Down
4 changes: 2 additions & 2 deletions packages/ra-language-french/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
dashboard: 'Tableau de bord',
edit: '%{name} #%{id}',
error: 'Un problème est survenu',
list: 'Liste des %{name}',
list: '%{name}',
loading: 'Chargement',
not_found: 'Page manquante',
show: '%{name} #%{id}',
Expand Down Expand Up @@ -108,7 +108,7 @@ module.exports = {
data_provider_error:
'Erreur dans le dataProvider. Plus de détails dans la console.',
canceled: 'Action annulée',
logged_out: 'Votre session a pris fin, veuillez-vous reconnectez.'
logged_out: 'Votre session a pris fin, veuillez-vous reconnectez.',
},
validation: {
required: 'Ce champ est requis',
Expand Down