()
| 924 | } |
| 925 | |
| 926 | const refreshAfterServerAction = async () => { |
| 927 | if (disableJavaScript) { |
| 928 | // browser.refresh() seems to automatically resubmit POST requests, |
| 929 | // so if we submitted an MPA action, it'll trigger the action again, |
| 930 | // which in this case will toggle draftMode again. |
| 931 | await browser.get(new URL(pathname, next.url).href) |
| 932 | } else { |
| 933 | await browser.refresh() |
| 934 | } |
| 935 | } |
| 936 | |
| 937 | expect(await browser.elementByCss('button#toggle').text()).toBe( |
| 938 | 'Enable Draft Mode' |
no test coverage detected