Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0a4760

Browse files
committed
fix: get all CoderAuthForm tests passing
1 parent 34f027f commit e0a4760

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

plugins/backstage-plugin-coder/src/components/CoderAuthForm/CoderAuthForm.test.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe(`${CoderAuthForm.name}`, () => {
7777

7878
const user = userEvent.setup();
7979
const ejectButton = await screen.findByRole('button', {
80-
name: /Eject token/,
80+
name: /Unlink Coder account/,
8181
});
8282

8383
await user.click(ejectButton);
@@ -87,7 +87,6 @@ describe(`${CoderAuthForm.name}`, () => {
8787

8888
describe('Token submission form', () => {
8989
it("Is displayed when the token either doesn't exist or is definitely not valid", async () => {
90-
const tokenFormMatcher = /Please enter a new token/;
9190
const statusesForInvalidUser: readonly CoderAuthStatus[] = [
9291
'invalid',
9392
'tokenMissing',
@@ -96,7 +95,7 @@ describe(`${CoderAuthForm.name}`, () => {
9695
for (const authStatus of statusesForInvalidUser) {
9796
const { unmount } = await renderAuthWrapper({ authStatus });
9897
const form = screen.getByRole('form', {
99-
name: tokenFormMatcher,
98+
name: /Authenticate with Coder/,
10099
});
101100

102101
expect(form).toBeInTheDocument();

0 commit comments

Comments
 (0)