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
2 changes: 1 addition & 1 deletion frontend/e2e/smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test.describe('frontend smoke', () => {
await page.getByLabel('Page URL').fill('https://example.com/articles');
await page.getByRole('button', { name: 'Generate feed URL' }).click();

await expect(page.getByRole('heading', { name: 'Add access token' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Enter access token' })).toBeVisible();
await expect(page.getByRole('textbox', { name: 'Access token' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Save and continue' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Back' })).toBeVisible();
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/__tests__/App.contract.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('App contract', () => {
const token = 'contract-token';

const authenticate = () => {
window.localStorage.setItem('html2rss_access_token', token);
globalThis.localStorage.setItem('html2rss_access_token', token);
};

it('shows feed result when API responds with success', async () => {
Expand Down Expand Up @@ -64,7 +64,7 @@ describe('App contract', () => {
fireEvent.click(screen.getByRole('button', { name: 'Generate feed URL' }));

await waitFor(() => {
expect(screen.getByText('Your feed is ready')).toBeInTheDocument();
expect(screen.getByText('Feed ready')).toBeInTheDocument();
expect(screen.getByText('Example Feed')).toBeInTheDocument();
expect(screen.getByLabelText('Feed URL')).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Copy feed URL' })).toBeInTheDocument();
Expand Down Expand Up @@ -159,8 +159,8 @@ describe('App contract', () => {

await screen.findByText('Access token was rejected. Paste a valid token to continue.');

expect(screen.getByText('Add access token')).toBeInTheDocument();
expect(screen.queryByText('Feed generation failed')).not.toBeInTheDocument();
expect(window.localStorage.getItem('html2rss_access_token')).toBeNull();
expect(screen.getByText('Enter access token')).toBeInTheDocument();
expect(screen.queryByText('Could not create feed link')).not.toBeInTheDocument();
expect(globalThis.localStorage.getItem('html2rss_access_token')).toBeNull();
});
});
Loading
Loading